PLC Structure Text From C

1.2k Views Asked by At

I have some old C code that is used to perform tasks on top of the PLC. I am wanting to convert this code into Structure Text on GEs Proficy Machine Edition. Is there any special tools or etc. that can help me to better understand how to convert the C code into structure text? Is there any software that can find syntax errors or anything of that matter since there is no color changes in this to show I used a keyword or etc.? I am starting to translate my global double variables into real variables in structure text but I am not sure if this is correct since I have never used Structure Text before.

CONFIGURATION DefaultCfg
     VAR_GLOBAL
        variable : REAL;
     END_VAR

     PROGRAM MAIN : MAIN;
END_CONFIGURATION

PROGRAM MAIN
     VAR
        nonglobal : REAL;
     END_VAR
END_PROGRAM
1

There are 1 best solutions below

0
On

Structured text is for all intents and purposes Pascal. Newer PLC's which are IEC 61131 compatible support local variable scopes and since you mentioned GE Proficy ME that means it's not one of them. The newer I#XI processors are IEC 61131 compatible but the older ones predate this standard.

There is no "translator" and no real compatibility with anything else. Other than the older Logicmaster software which is DOS based, what you see is what you have to work with. This series of PLC's was originally rebranded Toyo PLC's until later when the GE/Fanuc joint venture began building their own.