09-24-2022 05:43 AM
I am trying to read some registers using modbus vi's
Specifically - read holding registers.vi
but for some reason i can only ever read 1 register even if i put >1 in number of registers,
Is anyone able to help
Many thanks in advance
Lee
09-25-2022 10:41 AM
Hi Lee,
@LeeBowers1 wrote:
Is anyone able to help
Well, I could start PaintNET, GIMP or Photoshop to edit your image, but I don't think you would like the resulting image…
Keep in mind: we cannot edit/debug/run images in LabVIEW! When you need help with your code then you should attach your code!
What's the reason of that coercion dot?
09-26-2022 12:07 AM
@LeeBowers1 wrote:
I am trying to read some registers using modbus vi's
Specifically - read holding registers.vi
Check your UnitID and Starting Address of your Holding registers where your expected data starts.
Any Specific reason for polling continuously, because you will get all defined register values at one instance of your read.
I mostly prepare writing to holding registers and reading from Input register, when i am defining the communication matrix (Mostly with PLC).
09-26-2022 03:27 AM
Thank you for your reply, makes good sense to attach the vi - why i didnt do that initially - no idea!
I could not see a coercion dot?
Would you be able to help?
For fullness, the data is coming from a receiver which transmit RS485, i am then using am RS485/Eth adapter. I can see the tx/rx lights flash as I poll for data and I get something, but just not the 10 addresses as i need
09-26-2022 03:30 AM
Hello, thank you for replying.
Yes, I have the correct unit ID and holding register address.
I poll constantly as the data that will be coming in is from temperature transmitters
I just find it confusing that the data coming from the read holding registers vi only has an array size of 1 ?
09-26-2022 04:19 AM
What device is your rs485 to Ethernet ?
Have you configured that device?
09-26-2022 04:27 AM
It is a device from company called Perle.
yes, i can, and have configured that device.
Set to modbus slave, modbus RTU, UID 1
09-26-2022 04:37 AM
@LeeBowers1 wrote:
It is a device from company called Perle.
yes, i can, and have configured that device.Set to modbus slave, modbus RTU, UID 1
If Modbus Slave is RTU then you should use Modbus RTU Master rite?
09-26-2022 05:51 AM
maybe read 5 and set to read every 1 second or so. Also, you have double registers as in 32 bit? Usually its 16bit in modbus. Maybe this is where it gets funky
09-26-2022 04:15 PM
in your image, only every 2nd register is used. So either they are set as 32 bit or only every 2nd is populated with 16 bit. Then maybe you cannot do a bulk read. Instead read each on its own.