From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-03-2018 01:59 AM
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!
05-03-2018 02:18 AM
The Data array (U16) is empty. Set the first element to the desired register value.
05-03-2018 02:34 AM
Hi,
Initialise the Register array index up to 65535 with '0'.
05-03-2018 03:06 AM
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!
05-03-2018 03:27 AM
For command 6, bytes 5-6 would contain the register value you want to write. What do you expect to receive?
05-03-2018 03:40 AM
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!
05-03-2018 04:07 AM
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.