wbj
Thiago, hello, how are you?🙂
My trouble : I use ST code and have some misunderstanding while runtime is running this code with modbus slave device 🙁
My code :
...
x : bool; (*address %QX100.0*)
...
x := true;
 
Compiling... Loading... START aaaand: 

01 0F 00 00 00 08 01 01 3F 55

Why 0x0f function and from 0 to 7 coils? I need 0x05 function, just one coil to write. What can I do?

I need: 

01 05 00 00 00 01 0C 0A

Runtime on rasp pi 4 b.

Also I need 6 instead of 10...

Reply 0 0
thiagoralves
The runtime always write multiple coils to save bandwidth. The number of coils is determined by your start address and size configuration on your slave devices settings, and not by your ST code
Reply 0 0
wbj
Thanks, Thiago 🙂
Good luck 🙂
But anyway, openplc is a good program, thanks you for that 🙂
Reply 0 0
wbj
The runtime always write multiple coils to save bandwidth. The number of coils is determined by your start address and size configuration on your slave devices settings, and not by your ST code
It is possible to change?
Reply 0 0
thiagoralves
No, unless you are willing to change the runtime source code
Reply 0 0
Reply