C to IEC 61131-3 IL compiler

I have a requirement to port some existing code to IEC 61131-3 corresponding to the PLC.

I have some options for dividing code into discrete function blocks and interlacing these blocks into a standard solution (Ladder, FB, Structured Text, etc.). But to create each function block, this will require cutting out the C code.

When reviewing the IEC specification, I decided that the IEC Instruction List form could be the target language for the compiler. The wikepedia article lists two development tools:

But they seem to be aimed at building IEC languages ​​in C, not C in IEC.

Another possible solution is to press the C code through the C translator on Pascal and use it as a starting point for Structured Text .

If none of them goes the way of breaking the code into functional blocks.

Edit

As mlieson's answer suggests, I should have mentioned that C code is an existing real-time control system. Thus, the program algorithms should already correspond to the PLC environment.

+3
source share
7 answers

Perhaps this answer comes too late, but because of the external library, you can call the C code from CoDeSys.

CoDeSys http://forum-en.3s-software.com/viewtopic.php?t=620

C . .

+3

, C Pascal , . Pascal, , .

, , . C main() main(). main() , 100: s , . - , C-.

C , .

+2

, , , .

, . DMS Software Reengineering Toolkit, RLL (PLC). DMS // C. C RLL.

. , 6-12 -, DMS , . , , .

+1

, C... , IEC-61131. . SOFTplc corp , , ... C..

Schneider C...

!! , , ! , , :)

+1

. : IL - 4GL (.. , IEC 61131-3 - ST, FBD, LD, SFC). C - 3GL.

, , IL ? , . ? ?

(, )

, Reflex, "C ". Reflex - 4GL C. C- Python-.

0
0

, , C ST. , , , , , , ST, .

0

Source: https://habr.com/ru/post/1706550/


All Articles