简体   繁体   English

来自C的PLC结构文本

[英]PLC Structure Text From C

I have some old C code that is used to perform tasks on top of the PLC. 我有一些旧的C代码,用于在PLC顶部执行任务。 I am wanting to convert this code into Structure Text on GEs Proficy Machine Edition. 我想将此代码转换为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? 是否有任何特殊工具等可以帮助我更好地理解如何将C代码转换为结构文本? 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. 我开始将我的全局double变量转换为结构文本中的实变量,但是我不确定这是否正确,因为我之前从未使用过Structure Text。

CONFIGURATION DefaultCfg
     VAR_GLOBAL
        variable : REAL;
     END_VAR

     PROGRAM MAIN : MAIN;
END_CONFIGURATION

PROGRAM MAIN
     VAR
        nonglobal : REAL;
     END_VAR
END_PROGRAM

Structured text is for all intents and purposes Pascal. 结构化文本适用于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. 兼容IEC 61131的较新PLC支持局部变量范围,并且由于您提到GE Proficy ME,这意味着它不是其中之一。 The newer I#XI processors are IEC 61131 compatible but the older ones predate this standard. 较新的I#XI处理器兼容IEC 61131,但较旧的处理器早于该标准。

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. 除了基于DOS的旧版Logicmaster软件之外,您所看到的就是必须使用的软件。 This series of PLC's was originally rebranded Toyo PLC's until later when the GE/Fanuc joint venture began building their own. 该系列PLC最初被更名为东洋PLC,直到后来GE / Fanuc合资企业开始建立自己的公司。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM