I have configured some alarms on an integer using Bit State alarm mode. But the Tag Diagnostic window show me the error “Syntax Error on Token: ‘End of Expression’ (Line 0 , Char 0)” for the “setpointA” on “Bound Properties” of the Alarm.
I have made the same thing like the online tutorial and i don’t understand what I made wrong.
Thanks
I am having the same problem with the DisplayPath expression for my alarm:
"{InstanceName}: {Description} exceeded {setpointA}"
This shows up in the alarm table as:
“GMGC_RejectPercentile: Green culler total reject % exceeded {setpointA}”
If i try moving the " around i get an expression error. How is this supposed to be done??
This is a bit tricky - it’s due to the order of execution. Since you’re using {InstanceName}
I’ll assume you’re in a UDT. The way UDTs are evaluated, they’re essentially “compiled” when they’re first created - so the creation system will go through and replace {UDTParam}
with whatever its actual value is, hence:
"{InstanceName}: {Description} exceeded {setpointA}"
becomes
"GMGC_RejectPercentile: Green culler total reject % exceeded {setpointA}"
But since {setpointA}
is an alarm property, rather than a UDT property, it doesn’t get compiled/replaced until the alarm itself executes - but as you have it defined, the expression system just sees one long literal string:
"GMGC_RejectPercentile: Green culler total reject % exceeded {setpointA}"
If you separate {setpointA}
out, so that it’s an entire separate token, the expression should calculate correctly:
"GMGC_RejectPercentile: Green culler total reject % exceeded" + {setpointA}
It’s definitely confusing - there’s just no great way to relay that information within the tag editing window.
2 Likes
Ah yes thanks was just coming back to post i got it working by separating with the “+”.
It is a bit confusing trying to figure out whats evaluated when. I’ve referred to this before but it still wasn’t quite enough for me to understand what was going on.
https://docs.inductiveautomation.com/display/DOC79/Data+Type+Parameters+in+Expressions
1 Like
Hello, someone can help me with the first message of the topic please ?
Can you post the actual alarm config?
This is the UDT definition
This is the Tag Diagnostics of 1 instance of UDT
Ignition Version: 7.9.3
UDT_Button.xml (19.1 KB)
Put single quotes around {AlarmDisplayPath} on the Display Path Binding.
'{AlarmDisplayPath}'
Thank for you answer, but it doesn’t erase the error
I opened your UDT and it appears that the line for SetPointA is blank on all of the alarms but it is bound to an expression type. I would try removing that line from the UDT and reimporting it.