MODBUS TCP driver
First, in the SCADA software, you need to select the cells, in the “Driver / PLC” column, of the tags that will communicate with the equipment, in the MODBUS TCP protocol SCADA system.
After that, the “Driver” window will open .
Select the “MODBUS TCP” driver.
To configure it, click on “Config” in the Driver window, and this procedure will open the “Communication settings” window, where you can configure the IP and TCP port. MODBUS TCP, the port is usually 502.
In the Param2 column, place the node (address) from 1 to 255 of the equipment. In the case of MODBUS TCP it is usually 1.
In the Param1 column , enter the addresses of the PLC variables.
Param1 format :
Example: 400000
MODBUS has 4 types of addresses with the following formats
4nnnnn
0nnnnn
3nnnnn
1nnnnn
where nnnnn is the address number, example 401008
The first digit is the type of the address.
4 – Holding Register – analog values in WORD (2 bytes) values ranging from -32768 to 32767 with the possibility of writing
Example: 401008
0 – Coil – digital values 0 or 1 with writing possibility
Example: 000004
3 – Input Register – analog values in WORD (2 bytes) values range from -32768 to 32767 read-only
Example: 300012
1 – Discrete input – digital values 0 or 1 read-only
Example: 100003
If the address is in hexadecimal, use 0x in front plus four hex digits, example: 40x000E
Formats for analog numbers. A letter is used before the address.
Examples:
W400000 – WORD 2 bytes without sign, 0 to 65535
L400000 or I400000 – LONG 4 bytes with sign -2147483648 .. 2147483647
D400000 or J400000 – DOUBLE WORD 4 bytes with no sign 0 .. 4294967295
F400000 or S400000 or Y400000 – FLOAT 4 bytes
Analog tags can be associated, for example, with the displaytext object for reading or LEditar for reading and writing. And in the case of the digital ones, they can be associated with the led object for reading or a key for reading and writing. Double click on the object and select the tag.
Communication errors:
1 – Activate the communication LOG and check if the equipment is responding:
3 – About the speed of communication, sometimes the number of values per block exceeds what the PLC allows, causing an error in communication. To guarantee click on the Driver – Config – and select 1 or other value per telegram or “Auto” mode:
4 – Check the communication parameters are correct.
5 – Check if the equipment’s node address is correct in Param2.
Formulas for converting values:
Click the button in the Formula column and enter the conversion factors.
If the analog number is a set of bits, click on the Formula button and select the Bit on the Bit (digital) tab.
Group IP:
To change the IP of a complete group, select the group, click on the Driver button or on the Driver / PLC column title:
If you want to change the driver for all groups that have the same communication parameters, use the left column:
Communication driver using MQTT protocol of telemetry: MQTT SCADA.