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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus RTU can write but can't read

I need to control an OptiTemp chiller, which uses Schneider's TM171 and the Modbus protocol. I can successfully write to the set temperature register (16384), and I can check on the chiller's display that it is indeed working. However, I can't seem to read that very same register (16834) nor the current display temperature register (8992). I tried Plasmionique's Modbus library and QModMaster to make sure it wasn't an error on the Modbus library I was using, and I had the same result, I could write but not read. I either get an unintelligible value or an error. What could be going wrong? 

 

Results on NI Modbus Library: 

1.PNG

ReadWriteVI.png

 

Results on Plasmionique's Modbus Library (used example VI): 

p1.PNG

p2.PNG

p3.PNG

 

Results on QModMaster:

q1.PNG

q2.PNG

alphanull_0-1623698745935.png

 

 

0 Kudos
Message 1 of 4
(1,955 Views)

Hello,

I have seen lots of crazy things with Modbus implementation.

Did you try to read input registers instead of holding registers (although it should be valid to read holding registers)?

 

Regards, Jens

 

Kudos are welcome...
0 Kudos
Message 2 of 4
(1,921 Views)

Same error, unfortunately. Utilizing Plasmionique library example, I get error 403482, which is CRC error I believe. If I increase the quantity of register to read I get timeout.

0 Kudos
Message 3 of 4
(1,910 Views)

I encountered similar problem with a different Modbus device i.e. "Modbus CRC/LRC error". I noticed I need to enter the start address and number of register exactly same as explained in the document. If I pass less number of registers then I encounter that problem or CRC error. If I enter more then it comes out with Timeout error. 

 

I had played with other Modbus device where if I pass less or more number of register it will execute without error and return just the content of those register but looks like it does not work like that for all devices.

Message 4 of 4
(1,722 Views)