Dear OpenPLC community. When trying to start the PLC simulation (build my code) I get the following errors:
ompiling IEC Program into C code...
"C:\Users\rikvd\OpenPLC_Editor\matiec\iec2c.exe" -f -l -p -I "C:\Users\rikvd\OpenPLC_Editor\matiec\lib" -T "C:\CO2Zero\Programs\Main10CusFunTotlyDelt\build" "C:\CO2Zero\Programs\Main10CusFunTotlyDelt\build\plc.st"
exited with status 1 (pid 36556)
derivative_st.txt:17-7..17-17: error: invalid input variable(s) declaration.
in file included from file standard_FB.txt:37
included from file C:\Users\rikvd\OpenPLC_Editor\matiec\lib/ieclib.txt:32
derivative_st.txt:25-38..25-43: error: invalid parameter(s) defined in function invocation of ST expression.
in file included from file standard_FB.txt:37
included from file C:\Users\rikvd\OpenPLC_Editor\matiec\lib/ieclib.txt:32
integral_st.txt:17-7..17-17: error: invalid input variable(s) declaration.
in file included from file standard_FB.txt:39
included from file C:\Users\rikvd\OpenPLC_Editor\matiec\lib/ieclib.txt:32
integral_st.txt:25-53..25-58: error: invalid parameter(s) defined in function invocation of ST expression.
in file included from file standard_FB.txt:39
included from file C:\Users\rikvd\OpenPLC_Editor\matiec\lib/ieclib.txt:32
pid_st.txt:21-7..21-17: error: invalid input variable(s) declaration.
in file included from file standard_FB.txt:40
included from file C:\Users\rikvd\OpenPLC_Editor\matiec\lib/ieclib.txt:32
pid_st.txt:31-45..31-49: error: invalid expression in ST formal parameter assignment.
in file included from file standard_FB.txt:40
included from file C:\Users\rikvd\OpenPLC_Editor\matiec\lib/ieclib.txt:32
pid_st.txt:32-47..32-51: error: invalid expression in ST formal parameter assignment.
in file included from file standard_FB.txt:40
included from file C:\Users\rikvd\OpenPLC_Editor\matiec\lib/ieclib.txt:32
ramp_st.txt:16-7..16-17: error: invalid input variable(s) declaration.
in file included from file standard_FB.txt:41
included from file C:\Users\rikvd\OpenPLC_Editor\matiec\lib/ieclib.txt:32
ramp_st.txt:30-22..30-26: error: invalid expression after '+' in ST expression.
in file included from file standard_FB.txt:41
included from file C:\Users\rikvd\OpenPLC_Editor\matiec\lib/ieclib.txt:32
9 error(s) found in C:\Users\rikvd\OpenPLC_Editor\matiec\lib/ieclib.txt. Bailing out!
Error : IEC to C compiler returned 1
PLC code generation failed !
I have attempted many things to fix it:
- Removing all unconnected function blocks (which I usually place to mark things as todo), like the PID and RAMP block
- Making sure all actions refer to a variable instead of being inline after copying
- Removing the OSCAT custom functions
- Updated the file
- Making sure every function block has an input
- Removing the unconnected powerrails which I use to make the code neat
Unfortunately, to no prevail and I have no idea how to fix it besides starting all over again. I would be happy to get you guys input. I have attached the program here, sorry for the messy code in advance