LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

R/W to a register using modbus

Hi,

 

I'm currently trying to communicate with an Omega CN7500 Temperature Controller using a modbus RS-485 Communication protocol.  While I can communicate with the device, I get some strange data when I try and read some of the registers, appending zeros to the temperature settings, nonsensical numbers on some of the others etc... 

 

The registers also seem to reset to 0 whenever I try and write any data to them.  I've been messing with it for a few hours and I'm at a loss as to why it's doing this.   

 

 

Temperature controller data sheet - http://www.omega.com/ppt/pptsc.asp?ref=CN7500&nav= 

Download All
0 Kudos
Message 1 of 2
(2,523 Views)

You have a couple problems with your use of the MB R/W subVI.

 

1.  You only need to use a cluster at the top for ModBUS data unit or the cluster to the lower left for ModBUS command.  You don't need both.  Which you use is determined by the input "Use Modbus Data Unit?"  You have that unwired, and its default value is false.  Which means you only need the cluster to the lower left.

 

2.  You are using Write Single Register, but your numeric array in that cluster is empty.  You do have an element in your boolean array, but the boolean array is only used for the write coils commands.  For registers, you need a numeric array.

 

3.  Don't forget to wire up your errors and put an indicator on them so you can see if any functions return errors.

0 Kudos
Message 2 of 2
(2,510 Views)