Accessing 2 bits digital data in Modbus

  • Thread starter jignesh v mehta
  • Start date
J

Thread Starter

jignesh v mehta

In our system, each discrete input has four states i.e. normal, reverse, flashing and free. We encoded them as normal-00, reverse-01, flashing-10, and free-11. for this we require 2 bits. But coil function code in public function codes is packed as one bit per coil. Can we use these public function codes (standard coil function codes) or do we have to go for user defined function codes?

Please suggest us.

-Jignesh Mehta
[email protected]
HBLNife Power System Ltd.
Hyderabad
INDIA.
 
P

Praveen Mathew

Hi,
If you can map your discrete input(with 4 states) to 2 adjacent inputs, then you can actually do 2 adjacent input status read (fcode 0x02) to get their values.
Modbus protocol supports only 2 state discrete data manipulation

Praveen Mathew
[email protected]
Kalki Communication Technologies (P) Ltd
Bangalore
India
 
Top