Hello Guys,
I've got a problem of using RSLogix Data Table Object to write BOOLEAN type of value.
For SINT, INT, DINT, I can use following format respectively:
C2 00 01 00 XX
C3 00 01 00 XX XX
C4 00 01 00 XX XX XX XX
Here the "XX" is the actual value I want to write.
For BOOLEAN value, I tried following format to set the value to "1", non of them works
C1 00 01 00 01
C1 00 01 00 FF
I do can read the BOOL value, the returned buffer is:
I've also referred to this document:
http://literature.rockwellautomation.com/idc/groups/literature/documents/pm/1756-pm020_-en-p.pdf
Page 13,
The BOOL value includes an additional field for specifying the bit position within the SINT (n = 0-7).
So I tried following combination, non of them works:
C1 00 01 00 01
C1 01 01 00 01
C1 02 01 00 01
C1 03 01 00 01
C1 04 01 00 01
C1 05 01 00 01
C1 06 01 00 01
C1 07 01 00 01
Actually How can know which bit is this Boolean Tag referring to? The bit position in SINT? what is the "n" value (0~7) as described in the document?
Anyone can give me a hand or offer a reference would be highly appreciated.
Thank you in advance
I've got a problem of using RSLogix Data Table Object to write BOOLEAN type of value.
For SINT, INT, DINT, I can use following format respectively:
C2 00 01 00 XX
C3 00 01 00 XX XX
C4 00 01 00 XX XX XX XX
Here the "XX" is the actual value I want to write.
For BOOLEAN value, I tried following format to set the value to "1", non of them works
C1 00 01 00 01
C1 00 01 00 FF
I do can read the BOOL value, the returned buffer is:
- If value in processor is "0", then return "C1 00 00";
- if value in processor is "1", then return "C1 00 FF".
I've also referred to this document:
http://literature.rockwellautomation.com/idc/groups/literature/documents/pm/1756-pm020_-en-p.pdf
Page 13,
The BOOL value includes an additional field for specifying the bit position within the SINT (n = 0-7).
So I tried following combination, non of them works:
C1 00 01 00 01
C1 01 01 00 01
C1 02 01 00 01
C1 03 01 00 01
C1 04 01 00 01
C1 05 01 00 01
C1 06 01 00 01
C1 07 01 00 01
Actually How can know which bit is this Boolean Tag referring to? The bit position in SINT? what is the "n" value (0~7) as described in the document?
Anyone can give me a hand or offer a reference would be highly appreciated.
Thank you in advance
Last edited: