Hey guys, so I have this Boolean tag that comes on meaning Press change over has started, when the bit goes off I want to grab the time it went off and store it, so I create a check-box component and an label component and a custom tag called date. in my check-box component I made a custom property called date and in the expression window I used "now()’ so basically that time is always running. Now in script editor under mouse clicked event handler I used the following code:
value = event.source.parent.getComponent('CheckBox').Date
if (event.source.selected == 0):
system.tag.writeToTag('Press Lines/Press 1/ChangeOver_Date', value)
I have the tag value bind to the label. every time I select the box nothing happens so thats great and when I un-select it the time stamp changes and thats great as well. Now I need this to happen when the tag value changes. I pretty much did all this to test and make sure date is changed when the bit goes off now I need to apply this to a tag. should I change the PropertyChange or StateChange under event handler?
using 7.7.4 version