Modbus func 16

Discussion about Gate Builder and variables database creation.
Post Reply
petrus
Posts: 4
Joined: Fri Jan 01, 2016 11:40 am

Modbus func 16

Post by petrus »

Hi,

Are there any sample how to write multiple registers with modbus function16.
In gate builder I used 3:16:4999 as an address, and "com_req" as Gate ID.


In Code builder :
Function void R1on()
int data;

data = 6003523421 // 6003 as com, 52342 as security code, 1 as parameter

SetNumGateValue("com_req",1,data);

My target is to write 6003 to address 4999
52342 to address 5000
1 to address 5001

but it's don't works

Best regards

User avatar
admin
Site Admin
Posts: 370
Joined: Tue Nov 17, 2009 1:18 pm

Re: Modbus func 16

Post by admin »

Hi,
in winlog use function 35 or 37 for read 32bit integer or 33 and 36 for floating point 32.
See Modbus help on protocol guide.
reg32.png
reg32.png (41.59 KiB) Viewed 199 times
Best regards

Post Reply