04.06.2021, 08:35
Hi.
When using a event based script, I want to use event.getvalue() to read the actual value, but I also want to read the object name that triggers the script.
I will use this name to read other GA's using grp.find().
When using a event based script, I want to use event.getvalue() to read the actual value, but I also want to read the object name that triggers the script.
I will use this name to read other GA's using grp.find().
Code:
pseudo:
value = event.getvalue()
object = "getObjectName"
alarm_lim = grp.find(object+"_lim")
alarm_tag = grp.find(object+"_alarm")
if value > alarm_lim then
alarm == 1
else
alarm == 0
end
grp.write('alarm_tag',alarm)