Modbus and Real PLC

R

Thread Starter

rudd

Hello,
I have to create a software to represent PLC by the point of view of modbus.

I don't understand how to a PLC map modbus coils and registers.
For example if I have a PLC with the digital input 1 connected to a switch, which is the modbus command for read this value?

Thanks
 
Discrete inputs are read-only bits. These are typically inputs. Read them with function 2.

Coils are read/write bits. These are typically outputs and internal memory bits. Read them with function 1, and write them with functions 5 and 15.

Input registers are read-only 16 bit words. These are typically analogue inputs. Read them with function 4.

Holding registers are read/write 16 bit words. These are typically analogue outputs and internal registers (memory words). Read them with function 3, and write them with functions 6 and 16.
 
Top