Create an alarm without tag using python script

Hello,

I want to know if it is possible to create an alarm without using a tag

For exemple,
I have to values
b = 3 and b =10

if a>b:
Active alarm and Write stats of alarm on “Alarm Status table Display”

The top line here: Alarming, says that “Alarms are always configured on a Tag”.

The bigger question is why do you want to not use a tag?

I don’t want use tag because I create a tag memory, I configure an alarm but I can’t write a value on a Setpoint with a script. On my view, I have a Textfield and I want put this Textfield on a Setpoint of my alarm.

But if sommene know how I can’t take a value of a Textfield and bindit it with my SetPoint of my alam, it will also solve me.

You can configure alarms via script with this function:

https://docs.inductiveautomation.com/display/DOC81/system.tag.configure

An other big question might be: What is the alarm for ?

I tried but I have error

I would like to monitor the operation of a motor using a graph.

In fact on the graph, I calculated the maximum values ​​over a time interval.

And I would like to send the value calculated on the Setpoint of my alarm

Your baseTagPath is wrong… it should be:

baseTagPath = "[Formation]m1"

I still fail to see the point of the alarm here. What does it do ?

Thank you, but have another erro: [Bad_Unsupported(“The target path ‘[Formation]m1’ cannot accept children tags.”)]

I have a tag called m1 on my tags. I juste want update Setpoint value of my alarm configured on m1.

I need use alarm to monitor my engine operation.

I will compare my tag value and Setpoint value of alarme.
if Setpoint is Above tag value I will active an alarm.

Uploading: image.png…


[formation]m1 needs to be a folder, and it appears to be a memory tag in your tag browser.

Let’s take another approach:
Create a memory tag named calculatedSetpoint.
Then in your m1 tag, in alarms config, bind Setpoint to that calculatedSetpoint tag…


Now you can write your calculated setpoint into the calculatedSetpoint tag and it will trigger the alarm if the m1 value is above the setpoint…

2 Likes

That’s probably a better way to do it, indeed.

1 Like

thank it work good.

1 Like