I'm getting a PLC variable, which is a Word (16).
However, I can not 'convert' this 16-bit Word with their respective values (true or false).
1 Word = 16 bits.
I get the word 'full' value.
More details: This is a WebServer application. The files (html, css, ...) are stored within the Siemens PLC (s7-1200 or s7-1500). Html pages with JavaScript will read some values from the CLP.
Values obtained from tests:
bit8 256
bit9 512
bit10 1024
bit11 2048
bit12 4096
bit13 8192
bit14 16384
bit15 32768
bit0 1
bit1 2
bit2 4
bit3 8
bit4 16
bit5 32
bit6 64
bit7 128
When bit1 in the CLP equals true, it returns the integer value 2 by the Word tag, and so on. When bit1 and bit2 are active, it adds the values.