LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Not receiving data over DSC Modbus using RS-285

Hi guys,

 

I've been banging my head against the monitor for 2 days now and I'd love it if someone could give me some advice.

 

I'm trying to use Labview to communicate to a PLC via Modbus (Using DSC not the library)

I followed this tutorial --> http://www.ni.com/white-paper/13911/en/

 

I followed this procedure and dropped my bounded variable into a VI and I am unable to read anything.

 

The warning I get is as follows...

"Warning 180121602 occurred at Shared Variable in Communications.vi

Possible reason(s):

IAK_SHARED:  (Hex 0xABC7002) The read buffer for the variable read is empty. The last known value was returned.

This error or warning occurred while reading the following Shared Variable: \\My Computer\Modbus\4000030 \\XXX.XXX.XXX.XXX\Modbus\4000030

 

Here are the specifics:

 

PLC (Master) - ID: 1

Network Speed: 9600; Data Bits: 8; Parity: None; Stop Bits: 1

Polling Table:

Transmission Mode - ASCII

Source Device - Master; Destination - Slave (ID:2); Data Type - Holding Register; Source Start Address - 30; Destination Star Address - 30; Length - 1

 

Labview I/O Server

modSlave.png

 

When I peak inot the Distributed Systems Manager under the ModbusSlave Variable commfail is false. Error Status is 0, UPDATING IS FALSE.

 

Finally, I should also mention that I used the Basic Serial Write and Read VI and I am seeing data come through, which looks like it could be a Modbus message.

 

What gives?

 

 

 

0 Kudos
Message 1 of 4
(2,543 Views)

From the above observations, it looks like the Modbus IO Server did not establish the communication with the PLC.

 

Check if the PLC supports the modbus connectivity

Check if the wire connected is correct and it is working

Check if the configuration details are correct

0 Kudos
Message 2 of 4
(2,526 Views)

I'm sorry for the typo, I incorrectly typed RS-285 on the title. I am using RS-485 2 wire config.

0 Kudos
Message 3 of 4
(2,515 Views)


Try using one of the freeware modbus monitoring tools available to see if your PC is communicating okay with PLC outside of the LabVIEW DSC environment.

Message 4 of 4
(2,506 Views)