# Syntax Error on Token for setpointA on BitState Alarm Mode

**URL:** <https://forum.inductiveautomation.com/t/syntax-error-on-token-for-setpointa-on-bitstate-alarm-mode/17341>\
**Category:** Ignition\
**Created:** [March 13, 2018, 1:52pm UTC](https://forum.inductiveautomation.com/t/syntax-error-on-token-for-setpointa-on-bitstate-alarm-mode/17341 "2018-03-13T13:52:08Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![EricProvBRP](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ericprovbrp/32/6352_2.png) [@EricProvBRP](https://forum.inductiveautomation.com/u/EricProvBRP)\
**Post date:** [March 13, 2018, 1:52pm UTC](https://forum.inductiveautomation.com/t/syntax-error-on-token-for-setpointa-on-bitstate-alarm-mode/17341/1 "2018-03-13T13:52:08Z")

</div>

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

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/7f9800124a233e46849fe1d538042be0dce6a5cf.jpg)

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [June 12, 2018, 8:46pm UTC](https://forum.inductiveautomation.com/t/syntax-error-on-token-for-setpointa-on-bitstate-alarm-mode/17341/2 "2018-06-12T20:46:01Z")

</div>

I am having the same problem with the DisplayPath expression for my alarm:

```auto
"{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??

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 12, 2018, 8:58pm UTC](https://forum.inductiveautomation.com/t/syntax-error-on-token-for-setpointa-on-bitstate-alarm-mode/17341/3 "2018-06-12T20:58:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [June 12, 2018, 9:16pm UTC](https://forum.inductiveautomation.com/t/syntax-error-on-token-for-setpointa-on-bitstate-alarm-mode/17341/4 "2018-06-12T21:16:57Z")

</div>

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](https://docs.inductiveautomation.com/display/DOC79/Data+Type+Parameters+in+Expressions)

---

<div class="post-metadata">

**Author:** ![EricProvBRP](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ericprovbrp/32/6352_2.png) [@EricProvBRP](https://forum.inductiveautomation.com/u/EricProvBRP)\
**Post date:** [October 25, 2018, 3:34am UTC](https://forum.inductiveautomation.com/t/syntax-error-on-token-for-setpointa-on-bitstate-alarm-mode/17341/5 "2018-10-25T03:34:45Z")

</div>

Hello, someone can help me with the first message of the topic please ?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [October 25, 2018, 11:32am UTC](https://forum.inductiveautomation.com/t/syntax-error-on-token-for-setpointa-on-bitstate-alarm-mode/17341/6 "2018-10-25T11:32:48Z")

</div>

Can you post the actual alarm config?

---

<div class="post-metadata">

**Author:** ![EricProvBRP](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ericprovbrp/32/6352_2.png) [@EricProvBRP](https://forum.inductiveautomation.com/u/EricProvBRP)\
**Post date:** [October 25, 2018, 11:54pm UTC](https://forum.inductiveautomation.com/t/syntax-error-on-token-for-setpointa-on-bitstate-alarm-mode/17341/7 "2018-10-25T23:54:21Z")

</div>

This is the UDT definition

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a5ac1e309aa2f70843ca9067e217e59070cf68bf.jpg)

This is the Tag Diagnostics of 1 instance of UDT

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/8dfa2f0af6879c57b3f0391bf727080aa2a8c3c4.jpg)

---

<div class="post-metadata">

**Author:** ![EricProvBRP](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ericprovbrp/32/6352_2.png) [@EricProvBRP](https://forum.inductiveautomation.com/u/EricProvBRP)\
**Post date:** [October 25, 2018, 11:57pm UTC](https://forum.inductiveautomation.com/t/syntax-error-on-token-for-setpointa-on-bitstate-alarm-mode/17341/8 "2018-10-25T23:57:29Z")

</div>

Ignition Version: 7.9.3  
[UDT\_Button.xml](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/9a50419ed06fdfcc0ddbc3bf3740af09365d3ff5.xml) (19.1 KB)

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [October 26, 2018, 12:19pm UTC](https://forum.inductiveautomation.com/t/syntax-error-on-token-for-setpointa-on-bitstate-alarm-mode/17341/9 "2018-10-26T12:19:12Z")

</div>

Put single quotes around {AlarmDisplayPath} on the Display Path Binding.

> '{AlarmDisplayPath}'

---

<div class="post-metadata">

**Author:** ![EricProvBRP](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ericprovbrp/32/6352_2.png) [@EricProvBRP](https://forum.inductiveautomation.com/u/EricProvBRP)\
**Post date:** [October 29, 2018, 2:54pm UTC](https://forum.inductiveautomation.com/t/syntax-error-on-token-for-setpointa-on-bitstate-alarm-mode/17341/10 "2018-10-29T14:54:32Z")

</div>

Thank for you answer, but it doesn’t erase the error

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [October 29, 2018, 3:48pm UTC](https://forum.inductiveautomation.com/t/syntax-error-on-token-for-setpointa-on-bitstate-alarm-mode/17341/11 "2018-10-29T15:48:14Z")

</div>

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.
