In the Tag Browser it is possible to read and write to the DWord. When I create a boolean (bit from this DWord), Same OPC Item Path wit /1 or :1, I can read the bit, but writing is not possible.
The error Message:
Error writing to WORD_1.value: Bad(“Bad_TypeMismatch: The value supplied for the attribute is not of the same type as the attribute’s value.”)
Siemens CPU 1512SP-1 PN with OPC UA connection.
I’ve just tested this out here with our S7-1500 and unfortunately this syntax doesn’t do what you’re hoping.
The server in the S7-1500 is just ignoring the stuff on the end and sending back a value of the original datatype, and in Ignition you’re just coercing that to a Boolean value. Any non-zero value in the original tag will be true.
It doesn’t look like the S7-1500 server supports this kind of bit addressing syntax.
Do you know a way to write to a bit in a word anyway with a S7-1500 server?
Use derived tag boolean like this (example with bit 12 of source tag )
You’d have to do something like @m.pelagatti suggested, which is a fancy way of modifying the word and writing the entire word back down. It’s subject to race conditions if the value might change in the PLC or be written to by other clients.