How to Unpack a 16 bit data
Hi all,
I am Having a Breaker communicating with Pm573 in Modbus RTU, whose Status bits are in 30101 register coming as word, I want to get the status bits tags to chmi for linking individual local tags, how can I do this in PLC logic.
I am Having a Breaker communicating with Pm573 in Modbus RTU, whose Status bits are in 30101 register coming as word, I want to get the status bits tags to chmi for linking individual local tags, how can I do this in PLC logic.
Answers
If I understand what your tiring to do it is simple.
Lets call your breaker word "breaker_status" so if that is the name of the WORD, then Bit 0 would be breaker_status.0
and bit 1 would be breaker_status.1
bit 2 would be breaker_status.2
and so on till you get to bit 15
which would be breaker_status.15
Hope that makes since.
Lets call your breaker word "breaker_status" so if that is the name of the WORD, then Bit 0 would be breaker_status.0
and bit 1 would be breaker_status.1
bit 2 would be breaker_status.2
and so on till you get to bit 15
which would be breaker_status.15
Hope that makes since.
You don't need to do this in the "PLC Logic"
In PG2 graphics, use the "#" operator to get an attribute .... word#bit0
With PLC Connect, you can also decode the individual bits in the Binary PCA definition if you want to create separate objects with presentation & alarm handling for each bit - but this is probably overkill for what you need.
In PG2 graphics, use the "#" operator to get an attribute .... word#bit0
With PLC Connect, you can also decode the individual bits in the Binary PCA definition if you want to create separate objects with presentation & alarm handling for each bit - but this is probably overkill for what you need.
Add new comment