LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Modbus Serial Ascii

Solved!
Go to solution

I downloaded and "installed" the old library. Initialized communication as you suggested, and it worked at once.

Added some type casting to get real values out, and I'm very happy.

 

OdneOksavik_0-1612734419068.png

OdneOksavik_1-1612734464841.png

Thank you both, RavensFan and StevenD, for taking the time to help me. The value of the help you give for free is incredible. I hope this can be helpful for someone else later.

 

 

Message 11 of 13
(880 Views)

Back in the office today I was curious if the newer version really was bugged or not. It is not. Modbus ascii specifies 7 data bits and even parity. Using those settings everything seemed fine. The device you are using is either legacy or not Modbus ascii compliant. The reason it works with the older version is because RavensFan told you to not use their initialization vi which does set parity to even. Not using it you chose the same (non-compliant) settings as the device.

 

https://modbus.org/docs/Modbus_over_serial_line_V1_02.pdf 

0 Kudos
Message 12 of 13
(841 Views)

I'm not surprised that the device is not Modbus ascii compliant, we had actually specified Modbus RTU, but the supplier should probably done some more research.

It's good that the library works as specified in the standard. The confusing part is that we can select different data bits and parity, but it seems to be overwritten silently.

 

Thank you StevenD, this addition makes this thread even more valuable to future readers.

0 Kudos
Message 13 of 13
(828 Views)