LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus TCP/IP configuration steps

Hi everybody.

I have an application where I have to connect a robot with a NI CVS1455. Both, robot controller and NI CVS support Modbus TCP/IP communication protocol, so, I want to configure robot like “Modbus master” node and compact vision system like “Modbus slave” node.

I have downloaded the NI Modbus library (I’m using LabView 8.2) and I’m trying to understand how Modbus communication works with NI products using my computer (instead the robot controller) and CVS. To do that:

- First, I have configured in “VI Server:configuration” the right TCP/IP address and, then, the port as 502

- I have enabled the access for both, computer and CVS, in “VI Server:access list”

- I have deployed the Modbus slave program (VI) in CVS

 

At the moment when I start the Modbus master program (VI) in my computer I receive first “error 66” and then “error 62” .

I have already tryied to use “TCP Communicator Active and Passive Vis” and the communication is ok.

I think, I’m making some mistake in Modbus configuration. I didn’t find NI Manuals that explain step by step how to configure the different panels for Modbus TCP/IP communication, moreover, the Modbus functions don’t have the context help.

So, my questions are: 

a) Can someone, experienced in Modbus, give some advice about my problem?

b) There is a manual or an “application note” about the “configuration steps”?

c) Can I use “shared variables” in a “NI Modbus slave” device even if the “Modbus master” isn’t a NI device?

 

Thank you in advance.

 

Michele

AUROS-Ing.Michele Rossi

Software e Tecnologie per Automazione

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

Modbus is used to read and write registers in slave devices. The master in your simulation should be the device reading and writing the registers, so if the CVS is supposed to read data from the robot, you need to reverse what you're doing.

In general, Modbus has nothing to do with the VI server. You can change the VI server settings back to their original values (port 3363).

The NI Modbus library has two example VIs - one for the slave device and one for the master. If you want to simulate this, you need to run those examples in their respective locations and give the master example the IP address of the slave.

Of course, in any case you need to know which registers you're going to read and write, but those are device specific.


___________________
Try to take over the world!
Message 2 of 3
(4,771 Views)

Thank you Tst.

Like you wrote me I have changed the VI Server settings in original values (port 3363).

I have, also, defined and configured in the right way shared variables and "in simulation mode" (using my computer instead the robot controller) the communication is ok.

I can read and write either bits or registers.

In this application (my case), is right to configure CVS like Modbus slave device, because I have to acquire images only in when the robot asks them.

I have two cameras to manage and the robot have to be in well defined positions to command acquisition with "cam0" or "cam1".

I guess, the reverse configuration, like you suggest, is right when you have to pieces on a belt and you have to identify their positions with a camera and then to pick them

"on the fly" without stopping the belt.

Bye

Michele
0 Kudos
Message 3 of 3
(4,738 Views)