Dear all, i'm new in the forum and i looked for a similar topic without succeded in it before start to write this post.
i would like to develop my first Opta code using Arduino PLC IDE and Structured Text language. With my company we manage the drinking and waste water plants so we use adopt PLCs to automate the pumping routines.
I would like to deploy a program for manage 2 sewer pumps and i was able to create differente object with Type and Structure (yellow) and some functions with structured text (named FC_ ):
I started to have problems with the compiling (first) and the uploading (later) when i started to would like to bind the IO variables using references and memory addresses. I started and i was able to change the states of the DOs (RS485 extension) directly from the code of the Struct, in this way (and the code compiled and uploaded):
But the code stop uploading after i added this function at the beginning of the main code to be able to scale the analog input acquired from an RS485 extension and update the value inside every struct:
After this modification the upload process stoped when the IDE display the message "Waiting for the reboot.." and the reboot doesn't happen anymore.
Could you helmp me understand what i'm doing wrong? Have you a better way to bind the IO variable inside the elements/variables of the struct?