reto
Hi
wow OpenPLC is just great! Thank a lot for this!
I'm working from time to time in Eritrea on a technical school and for teaching PLC, OpenPLC with Arduinos and Raspis is just the best.

My question is: Is it possible in LD to set a whole Port (8 bit, one byte) for a Arduino Mega? I tried with "move", but when I want to download the prog. it says: "plc_prog.st:15-5..15-23: error: Bit size of data type is incompatible with bit size of location.".
Maybe I use a wrond datatype for the variable for the outputs (Name:xy; Class: Local; Type: Byte; Location: %Q0)? Or ist the location wrong?

Thanks again for the cool Program

reto
Reply 0 0
thiagoralves
There is no such location as %Q0. You should use %QB0 instead (B for "byte"). This will avoid the compilation error but won't do what you want, because Bytes are not mapped to individual coils. The only way to write to coils is through the regular %QXx.x, one by one. I might implement a byte mapping in the future for convenience.
Reply 0 0
reto
Thanks for the answer. As I was in Eritrea I could only read your answer, due to bad internet, there was no way to answer. Btw the people there liked your Program a lot!
Reply 0 0
Reply