Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Could VBAI be use as Slave in ModBus communication ?

hello,

I'm working with VBAI 2010, in ModBus comunication I need to use VBAI as Slave.

I saw on help file that it is not possible but in menu "Tools\Communication device\" I can see "Vision Builder AI ModBus Adress :"

What does it mean ?

Is there any solution to use VBAI as slave in ModBus communication ?

Fabrice

 

0 Kudos
Message 1 of 5
(5,083 Views)

Yes, Vision Builder AI can actually only be used as a Modbus slave for now (users can implement the master functionality using a Run LabVIEW step).

 

To configure Vision Builder AI as a Modbus Slave device, select Tools>>Communication Device Manager.

Click New Device, to create the Modbus Master Device you want Vision Builder AI to communicate with.

Give it a name, then select either the Modbus Serial or Modbus TCP as the communication protocol depending on the physical layer used to connect to your device. For serial, you will need to specify the port and Modbus Mode (the most widely implemented is RTU).

Click OK.

Click the Start Server button, next to the Modbus Server, to start the background task that will listen for incoming Modbus messages. Note that the Modbus registers will be updated asynchronously from your inspection, whenever a Modbus frame is received.

 

The Vision Builder AI Modbus Slave Address is only used to identify the device, when the protocol is Serial, and you use the RS-485 protocol to connect together more than 2 Modbus devices in a multi-device configuration. Ignore this control if you are using Modbus TCP.

 

We know this dialog is a little confusing and are working towards improving it in future releases.

 

Once the server is running, use the Modbus Slave step to read and write the Modbus registers (that are located on the machine running VBAI, since you configured VBAI as a slave device).

 

Make sure that you specify the correct address in your Modbus Master device configuration software for the register you want to access in Vision Builder AI. In most Modbus device configuration software, you must enter a name for the register you want to use. Per Modbus convention, the register address of the slave device is calculated by subtracting 1 from the register name that you specify in the master device configuration software. Vision Builder AI expects register addresses, not register names, so you may have to subtract 1 from the address you defined in the Modbus device configuration software. For example, a register name defined as 2 in your Modbus configuration device translates to register address 1 in the Vision Builder AI Holding Registers table.

 

Modbus Device Holding Register Name = 2
Vision Builder AI Holding Register Address = 1

 

The Modbus data model is based on a series of four tables: Discrete Inputs, Coils, Input Registers, and Holding Registers. These tables do not overlap in Vision Builder AI. Some Modbus devices use the following start addresses for these tables.

  • 0x00000 for the Coils
  • 0x10000 for the Discrete Inputs
  • 0x30000 for the Input Registers
  • 0x40000 for the Holding Registers

Because the tables do not overlap in Vision Builder AI, ignore the first digit of the start addresses when entering the addresses in Vision Builder AI. For example, a register name defined as 0x40000 in a Modbus configuration device translates to register address 0 in the Vision Builder AI Holding Registers table.

 

Modbus Device Holding Register Name = 0x40000
Vision Builder AI Holding Register Address = 0

 

Sometimes you need to subtract 1 from the register name that you specify in the master device configuration software and ignore the first digit of the start address to ensure proper register addressing. For example, a register name defined as 0x40008 in a Modbus configuration device translates to register address 7 in the Vision Builder AI Holding Registers table.

 

Modbus Device Holding Register Name = 0x40008
Vision Builder AI Holding Register Address = 7

 

The Modbus Local Registers Terminal accessible from the Tools menu is a useful tool to figure out where you're writing data.

 

Hope this will help you configure the communication between VBAI and your device easily.

 

Best regards,

 

-Christophe

Message 2 of 5
(5,079 Views)

Hi,

I would like to use VBAI as slave on Modbus TCP communication with robot device which is master.

I don't understand how define IP adresse of master device (robot) in VBAI?

Best regards

Fabrice

 

0 Kudos
Message 3 of 5
(5,063 Views)

As a slave (server) device, VBAI is listening for incoming communications from a master (client) device. The modbus standard defines that the Modbus listening port is 502.

When you declare your Modbus TCP master device in the Communication device manager, there is no parameter to specify except for a timeout.

It is in your Modbus Master Device software that you need to specify the address of the computer or target running VBAI, as the master device is the one initiating the communication with the slave.

 

Does that make sense?

 

Christophe

0 Kudos
Message 4 of 5
(5,060 Views)

hi !Could you gave me same VBAI  modbus register Adderss help article or introdutions? think you!

0 Kudos
Message 5 of 5
(4,600 Views)