FAQ

How do I communicate TP70P PLC with device in modbus RS485 network?
How do I communicate TP70P PLC with device in modbus RS485 network?

To communicate any serial modbus device (RS485) with the TP70P PLC, it is necessary to configure the communication in the same range and use blocks for writing and reading, you can use two modes to configure the serial communication port.

Watch the step-by-step video:

Below is a step by step:

  1. Moving values to specific serial port configuration memories, such as COM2 in modbus 485 network, with baud rate (9600), data bits (7), parity (even), stop bit (1), ASCII and PLC ID parameters like 1.

The MOV value in the first line of 16#0086 for word D1120, is using the bit sequence shown in the image below, to configure the COM2 port in RS485 modbus as: 7, E, 1, 9600:

  1. You can use the block to set the serial port configuration:

Select the door in the library as shown in the image below:

Drag to the line and configure the block according to the modbus network configuration, 9600/7/E/1 ASCII ID1:

In the block help, you can check the configuration parameters:

 

 

Once configured, the protocol must use a write block (MODWR) and a read block (MODRD) to send and read data on the modbus network, however each block must be triggered individually:

Example using writing block (MODWR) to send command in word (2000h) of MS300 inverter start/stop/direction of rotation:

The block used for reading on the modbus network in this example was MODRD, as shown in the example below of reading the MS300 inverter with the reading in word (2100h):

When reading using the MODRD block, the values are stored in the word (D1050~D1055 or D1070~D1085):

After reading or writing, it is necessary to trigger the M1122 memory to trigger the serial port:

For help follow the link to download the FAQ example.

Click here to download the example -> PLC Program MODRDeMODWR_TP70