# Get Value result from a bound SetpointA in OPC tag Alarm

**URL:** <https://forum.inductiveautomation.com/t/get-value-result-from-a-bound-setpointa-in-opc-tag-alarm/53450>\
**Category:** Ignition\
**Created:** [November 24, 2021, 8:18pm UTC](https://forum.inductiveautomation.com/t/get-value-result-from-a-bound-setpointa-in-opc-tag-alarm/53450 "2021-11-24T20:18:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bradley\_Maxted](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@Bradley\_Maxted](https://forum.inductiveautomation.com/u/Bradley_Maxted)\
**Post date:** [November 24, 2021, 8:18pm UTC](https://forum.inductiveautomation.com/t/get-value-result-from-a-bound-setpointa-in-opc-tag-alarm/53450/1 "2021-11-24T20:18:30Z")

</div>

I have an OPC tag measuring Vibration from 0 - 3.  
The high alarm setpoint is defined in a PLC as 1, but can be modified.  
I’m passing the high alarm setpoint into ignition as a separate OPC tag, and binding the value of the alarm setpoint to the setpointA of an alarm configured on the Vibration OPC tag for dynamic integration into the ignition alarm banner.  
The problem is when I try to read the value of setpointA to build a ‘Moving Analog Indicator’, or display the alarm setpoint in any capacity, the result of the expression is ‘Null’. I don’t want to bind the Vibration OPC alarm setpoint directly to the analog indicator, as it would defeat the purpose of a template.

When I access the python dict of the alarm from the script console, the result is as follows:  
{u’setpointA’: {u’bindType’: u’Tag’, u’value’: u’[.]Vibration HiHi Setpoint’}, u’label’: u’Vibration High High’, u’displayPath’: u’some path’, u’priority’: High, u’mode’: Above Setpoint, u’timeOnDelaySeconds’: 5.0, u’name’: u’HiHi’}

I believe the expression to get the value of the setpoint is trying to coerce {u’bindType’: u’Tag’, u’value’: u’[.]Vibration HiHi Setpoint’} into a float, which results in ‘null’.

Has anyone experienced this before and found a way around it?

Thanks,

BM

---

<div class="post-metadata">

**Author:** ![kvane](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kvane/32/22228_2.png) [@kvane](https://forum.inductiveautomation.com/u/kvane)\
**Post date:** [November 25, 2021, 1:00am UTC](https://forum.inductiveautomation.com/t/get-value-result-from-a-bound-setpointa-in-opc-tag-alarm/53450/2 "2021-11-25T01:00:12Z")

</div>

It sounds like you want to be reading the tag’s alarm properties directly. That dictionary value for the setpointA is accurate. As you described, the setpointA is a binding to a tag and that is what the dictionary is showing us.

If instead we wanted to read the value of the setpointA from the alarm itself, we can do so by reading the tag directly. For example if I have an Alarm called “Reverse Flow Rate” on an OPC tag called “Flow Rate” , I can read that setpointA value with a system.tag.read() function like so:

system.tag.read("[default]Stations/Station 1/Flow Rate/Alarms/Reverse Flow Rate.SetpointA").

This returns the floating point value of the SetpointA.

---

<div class="post-metadata">

**Author:** ![Bradley\_Maxted](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@Bradley\_Maxted](https://forum.inductiveautomation.com/u/Bradley_Maxted)\
**Post date:** [November 25, 2021, 1:17am UTC](https://forum.inductiveautomation.com/t/get-value-result-from-a-bound-setpointa-in-opc-tag-alarm/53450/3 "2021-11-25T01:17:49Z")

</div>

Thanks Kvane.

So if I were to create a template internal property of type float and make the result of that internal property an expression as follows:  
tag("[default]Stations/Station 1/Flow Rate/Alarms/Reverse Flow Rate.SetpointA")

I would expect to return the value stored in SetpointA, but instead it returns Null.

The expression evaluates to the correct SetpointA when SetpointA is a static value(ex: 2.0), but as soon as SetpointA is the result of a tag or expression binding, the expression on the template internal property returns Null.

---

<div class="post-metadata">

**Author:** ![Bradley\_Maxted](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@Bradley\_Maxted](https://forum.inductiveautomation.com/u/Bradley_Maxted)\
**Post date:** [November 25, 2021, 7:16pm UTC](https://forum.inductiveautomation.com/t/get-value-result-from-a-bound-setpointa-in-opc-tag-alarm/53450/4 "2021-11-25T19:16:06Z")

</div>

Short of an explanation, I’m guessing this is a bug.
