Can we read a bit directly within a symbolic (integer) tag using the Siemens S7 Enhanced driver.
I tried [PLC]pathtotag.tagname.0, [PLC]pathtotag.tagname.1 etc. to no avail.
I tried [PLC]pathtotag.tagname/0, [PLC]pathtotag.tagname/1 etc. to no avail.
And I tried [PLC]pathtotag.tagname[0], [PLC]pathtotag.tagname[1] etc. to no avail.
The only solution that seemed to work was to read the integer in to ignition as a temporary placeholder and then use getBit(tempWord, 0) to drive an expression tag.
It would be helpful if the S7 Enhanced driver could perform the same way that the Rockwell driver performs.
1 Like
Good question, Philip. I don’t know the answer, but I think @Cody_Morgan from IA worked on this driver, and he might have some insights?
1 Like
No, this isn't currently possible without expressions/scripting. Could you share more about your overall use case? Do you have a number of Word/DWord/Int/DInt tags that are being used as bitmasks?
The PLC has been coded with a word of bits where each bit represents an alarm. The original HMI was able to read the individual bits. Now we are looking to put ignition onto the system and were hoping that it would be able to do the same.
Subscribe to the Alarm Word as normal.
Each alarm bit inside the alarm word gets a tag alarm set up with the Mode set to Bit State.
Enter the bit number of the bit you want, starting with the LSB as bit 1.
Very easy and much cleaner than a thousand booleans.
2 Likes