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.
source
share