In the past I've used the arduino extension with ladder logic and Open PLC with the ESP Now protocol with great success. However, when trying to use it in v4 I'm having some weird issues I can't quite figure out.
The main error I'm getting is:
[12-03-26 10:00:02] [ERROR]: Compilation failed with code 1
[12-03-26 10:00:02] [ERROR]: C:\Users\bigbl\Desktop\OpenPLC Projects\Arcade Logic\Stepper Motor Test v4\build\ESP32 WROOM\examples\Baremetal\c_blocks_code.cpp:60:25: error: expected ')' before '->' token
[12-03-26 10:00:02] [ERROR]: 60 | #define HORZ_OUT (*(vars->HORZ_OUT))
[12-03-26 10:00:02] [ERROR]: | ~ ^~
What I've tried so far:
Updating to the latest OpenPLC version.
Adding the function block I/O variables into the global resources list.
Changing the name of the variable. (Thought I may have accidentally invoked something in the backend as a bug.)
Commenting out the variables to see if it makes a difference since I think I'm able to call the variable directly from the table.
What made it compile:
Removing the c++ function block altogether and try to compile. (This successfully compiled and uploaded to the controller)
I've also tried variations on these for the last two days and have gotten essentially nowhere.
I've attached the .zip file of my project and the and .txt of the console log. for reference.
If you or someone could take a look at the project I'd really appreciate it.
Also this is a work in progress, so the logic is still pretty messy and I apologize. I just need it to compile.