Technical FAQs

Ask a Question

How can we set Magelis HMI Target (Programmed by Vijeo Designer) to connect to alternate Modbus Device in case of Communication failure from one device.

Modbus RTU driver we do not have such feature integrated in driver setting to connect to alternate device address if there is no response
from device. We can get such feature of connecting to alternate device by programming in Vijeo Designer as follows:
1. For this first of all we will have to create one variable with address @sys:1 to check whether device is offline.
2. When variable with address @sys:1 is having value 2 it means driver is offline for this specific equipment. The driver has attempted to
     communicate with the associated equipment but has timed out for the final time.
3. In HMI programming we can monitor the above address periodically in Action and then we can write a script in HMI to change the Slave
     address to switch to another slave address using following code:
Con_SlaveEquipmentAddress example:

int [] slaveAddress = ;
ModbusEquipment01.setProperty( "Con_SlaveEquipmentAddress", slaveAddress );

As per the above example you need to first use Openconfig function where ModbusEquipment01 is the name of the equipment. You can use
setProperty function to set the property and Con_SlaveEquipmentAddress is the property of address. After setting the property you need to call
function commitConfig to save the configuration.
So when you program HMI like mentioned above you are monitoring the status of Slave device periodically by action script and if it is having no
response after time you are switching the address of slave device in Runtime only.

Was this helpful?
What can we do to improve the information ?