Any idea how to put the setpoint of alarm into a text field?

Hi im new with ignition, any tips on how do i put the setpoint of a alarm into a text field?

image

Unfortunately this is not a simple dot-field under the tag but I hope someday it will be.

If you like the idea of it being an exposed parameter under the tag please vote up my request:
https://inductiveautomation.canny.io/ignition-features-and-ideas/p/expose-all-properties-of-a-tag

Anyhow, you have to start here:
https://docs.inductiveautomation.com/display/DOC80/system.tag.getConfiguration

As you drill into the configuration, you will see the setpoint configured on an alarm on a specific tag.

I always setup setpoint tags. That way you can easily access them.

This is for Ignition 8, but what about 7.9 and lower? Is there a way to get alarm properties for a tag in 7.9?

you could use this

system.tag.getAlarmStates

you would have to loop thru each alarm state and grab the setpoint property. what exactly you would have to do would be dependant on your alarming setup.

2 Likes

Thanks, let me explore.

much easier to just create the setpoint tag. my typical analog would have 4 states, HH,H,L,LL. I just create 4 memory tags the name of the tag but with HHSP,HSP,LSP,LLSP appended on the end.

I agree this is a straightforward approach but it does not scale well. In 10,000 tag systems I don’t want to track a whole bunch of extra memory tags.

Is there a way to export the tag configuration into an XML file or object thru a script function? The manual export of tag or tag folder XML from designer exports all properties including alarm properties. If its possible to export them in a file or an object thru scripts, then we can modify them and re-import them with new properties. It will change what ever parameters that we want to change!

I guess it depends on how your system is setup… but it does scale real well. every single tag that is analog and has alarming enabled will have these same 4 tags. that means that any script that creates tags or deletes tags knows exactly what to do. Also any screen that would need to use the setpoints knows if I add HHSP to the tagname I can access the setpoint. its a much cleaner option than having to pull the tag config and write the tag config every time you want to make a change… IMHO of course. Really depends on your architecture though. If you have a bunch of oddball setpoints and it isnt uniform, then I could somewhat see it being more of a pain.

it looks like you can, at least in 8.0, export an xml or json file thru scripting. my guess is you could use that to write a file then read it back in and script thru your changes.

1 Like

Thanks for all the reply guys! i will read them 1by 1

Hi diat 150, can you enlighten me with this one? i’m not used with scripting but i can understand a little bit. can you explain this 1 in a simple way?

There is an easy way to do this, if you have only two alarm set points as Low Alarm and High Alarm.

  1. In Tag editor, set the alarm tag binding to Eng.High and Eng.Low (if you are not using those Eng Low and High)
  2. Create text field and indirectly bind with the option of bi-directional
  3. Set a user privilege for this text field, so that, only Engineering User can change this alarm set point.
1 Like

Hi sir, first thanks for your idea, can you help how do i bind a tag “eng.high” and “eng.low” do i need to create this tag? thanks in advance

Go to tag editor( of the tag that you wanted to set alarm for) and select alarm
Add new alarm and name as HighAlarm and its set point can be dynamically assigned to Eng.High of the same tag.
Later on i will try to share the screenshort as i cant snipp the screen now.

Thanks for the reply man, i’ll try this one ill update you if it works asap.

Hi there, i did the first step, i have set the setpoint with corresponding eng.high and eng.low tags, my problem now is this step:
“Create text field and indirectly bind with the option of bi-directional”
where do i see that bi-directional option?
Thanks in advance !

nvm i saw it now haha

Sir can i ask again? how do i set a default value on that alarm?

my goal is it has a default value of setpoint on high and low alarm and its setpoints is editable with text field.