Hello,
I have a custom UDT tag that is on my view. Within this UDT tag are two tags:
HighAlarmEnableMode
HighAlarmEnablePB
The PB tag needs to be a momentary bit where it's a 1 and goes back to 0. When the PB tag is a 1, a one shot energizes and latches the EnableMode bit. When the PB tag is 1 again, the one shot energizes and unlatches the EnableMode. I am trying to make it so that whenever the user presses a button, it will momentarily turn the tag to a 1 and then back to 0. I am trying to accomplish this through scripting since there is NOT a momentary button in Perspective.
The following works:
System.tag.write("[XXXX]LIT_111.HighAlarmEnablePB",1)
System.tag.write("[XXXX]LIT_111.HighAlarmEnablePB",0)
It works like a champ, but then when I try to make it dynamic by having it call a tag on the view like below:
System.tag.write(self.view.custom.UDT.HighAlarmEnablePB,1)
Doing this, I get an error in my log saying that it can't find the tag. How else can I reference a custom tag on my view so that it actually finds it??
For the record, I ended up creating a new custom property on the popup. On each custom property I used the following:
concat({view.params.TagPath}, "/HighAlarmEnablePB")