tomdertech
Hi,

I am interested in the process of going from the ST file to the C file which is produced. I have been unable to find the file? Where is it so I can inspect it and which files actually do the ST parsing and actual production of the file which it ultimately executed.

Thanks,
Tom
Quote 0 0
thiagoralves
The piece of software responsible for "converting" (the correct term here should be "compiling") ST code into C is called MatIEC Compiler. The entire source code is available here: https://bitbucket.org/mjsousa/matiec/. Be aware, it is HUGE!!! [redface]

The source code is also available on the OpenPLC repository inside the folder matiec_src
Quote 0 0
tomdertech
Ok. But where does the compiled code reside. The code which interacts with the hardware-layer.cpp?
Quote 0 0
thiagoralves
Take a look at the server.js actions when you upload an ST file over the browser and all your questions will be answered. Basically, when a new ST file is uploaded, the server.js script calls iec2c to compile it to a bunch of .c files. Those files are moved to the /core folder and then compiled with everything else that is already there using GCC. At the end of the compilation process you will have a new openplc executable that has your ladder logic embedded on it.
Quote 0 0