Hi all,
How to write single register (with the function code is 06) in the LabVIEW?
I made an example and in this example, for the function code 06, my slave didn't get byte 5 and byte 6.
Thank you!
The Data array (U16) is empty. Set the first element to the desired register value.
Hi,
Initialise the Register array index up to 65535 with '0'.
Thank you for your help.
This is my simulation result after checking 2 frames 03 and 06.
For function code 03, the results are very accurate.
For function code 06, I was having problems at byte 5 and 6.
Can you help me edit the diagram in LabVIEW?
Thank you!
For command 6, bytes 5-6 would contain the register value you want to write. What do you expect to receive?
For example, I want to write the value is 0001 (byte 5,6) on the address register is 0001 (byte 3,4). So, I couldn't receive the value on the transfer frame.
Thank you for you help!
I already answered. The blue array named Data in the Modbus Command cluster must contain the register value(s) you want to write.
Click on element 0 and input 1, or, even better, use a Bundle By Name node to set the value. You are now setting to 1 the Quantity member instead, which is only relevant when doing multiple registers or coils read/write, for example the Write Multiple Registers command.