In the delta plc we have two instructions for the Modbus communication with any slave. We will consider that Delta PLC is master and there is any other slave device which can be a VFD or HMI. In Modbus communication the Master device always send the query to slave device for reading or writing the registers of Slave Devices. MODWR is the instruction for for writing the MODBUS data.
Syntax :- MODWR S1 S2 N
S1 is the slave address and S2 is the register address of the slave device where we have to write the data and N is the value to write. N can be constant or can be data register address. Let us consider a example – Suppose we want to write to write the H2000 register of slave device with value in D0, slave id is 2. Then we will use the –MODWR K2 H2000 D0.
Reading the Slave data/register in MODBUS Delta PLC :-
For reading the slave register values in Delta Modbus communication we use the instruction MODRD. The syntax is as follows :-
Syntax :- MODRD S1 S2 N
S1 is the Salve address and S2 is the register address of the slave device and N is the number of values to read.
Wiring for Modbus Communication in Delta PLC :-
We have already discussed about the wiring, let us review it once more. In modbus communication there are two terminals for on master and slave device. Always connect the + of master with + of slave device and connect – of master with – of slave device.