LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get modbus library to communicate with Modbus RS 485 device

Hi,

 

I've been trying for a few days now to get the NI modbus library (http://zone.ni.com/devzone/cda/epd/p/id/4756) to work with an Omega CN7500 temperature controller with not much luck.  

 

It works with Omega's own software (using Modbus with a RS232 to RS485 converter) but I need to get it work with Labview for automation purposes and to integrate it with the rest of the system. 

 

We configured it the same as we did for the Omega software (baud rate, parity bit, flow control, etc)

 

Currently when we run it, the execution gets stuck at the MB Serial Master Query block and then we receive a timeout error. 

 

Here's my program. 

I'm new to using Labview so please bear with me if it's something obvious.

 

Any help would be greatly appreciated.

 

Thanks.

 

 

Download All
0 Kudos
Message 1 of 13
(6,115 Views)

Try setting the mode for RTU instead of ASCII.

 

Also double check the address.  For some reason the controller manual lists the addresses in hex.  1002H which is Upper Limit of Range.  The modbus VI's address input is generally decimal.  1002 hex is 4098.  So try 98 (or even 97) as the address since the 4 is not used when doing the Modbus communication.

Message 2 of 13
(6,104 Views)
Please ignore as my message got duplicated.
Message Edited by Ravens Fan on 11-16-2008 07:56 PM
0 Kudos
Message 3 of 13
(6,104 Views)
Was Ravens Fan's post helpful? Were you able to check that the address was correct?
0 Kudos
Message 4 of 13
(6,070 Views)

Yes, the hex suggestion was fantastic.  I can't believe I was doing that.  It seems to be accessing the temperature controller now.  I need to test it more but it's looking hopefully. 

 

Thank you so much Ravens Fan.  You are truly a scholar and a gentleman.

Message 5 of 13
(6,062 Views)

rkrauskopf wrote:

Yes, the hex suggestion was fantastic.  I can't believe I was doing that.  It seems to be accessing the temperature controller now.  I need to test it more but it's looking hopefully. 

 

Thank you so much Ravens Fan.  You are truly a scholar and a gentleman.


 

Smiley Happy
0 Kudos
Message 6 of 13
(6,058 Views)

Okay, I'll post up here since our controllers are identical.

 

I have the same problem. I am getting a timeout error.

 

I am using a NI USB-485 and I have the temp controller's Data - connected to pin 8 on the DB9 and the Data + connected to pin 4 (RXD+)on the DB 9.

 

I have confirmed that all my communciation setting match what is set in the controller.

 

I am trying to Read the Holding Registers with a starting arrdess of 96 (1000H or 4096) in the starting address. Quanity is set to 1 and my slave address is 1.

 

What am I doing wrong? Do I need to tie together pins

  

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 7 of 13
(6,026 Views)

Doug,

 

Would you mind posting your code?

 

Thanks,

Ben

National Instruments
Certified LabVIEW Associate Developer
Certified TestStand Developer
0 Kudos
Message 8 of 13
(5,990 Views)
Here yeah go...
Doug Ferguson

www.southerndaqsolutions.com
Download All
0 Kudos
Message 9 of 13
(5,962 Views)

Doug,

 

I recommend the following:

 

1. Increase your timeout on the MB Serial Master Query to 2 seconds.

2. Take a look at the following forum threads: here and here.

 

The timeout error (6101) can occur for several different reasons such as noise, amount of data, timeout value, etc.

Ben

National Instruments
Certified LabVIEW Associate Developer
Certified TestStand Developer
0 Kudos
Message 10 of 13
(5,931 Views)