Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

Alarm Message problems

Hi,

I've some problems trying to merge two text expressions using & operator
in the Message= field of the new Alarm object.
If I put the following:
"Pot1 is "&if(Alarm_Pot1.hi,"HIGH",if(Alarm_Pot1.lo,"LOW",""))

the result is just: "Pot1 is " in every case.

Does anybody have the same problems?
0 Kudos
Message 1 of 2
(4,278 Views)
"Roman Plevnik" wrote:
>>Hi,>>I've some problems trying to merge two text expressions using & operator>in
the Message= field of the new Alarm object.>If I put the following:>"Pot1
is "&if(Alarm_Pot1.hi,"HIGH",if(Alarm_Pot1.lo,"LOW",""))>>the result is just:
"Pot1 is " in every case.>>Does anybody have the same problems?


You're very likely trying to use the above Expression in the aame Alarm
Object's Message field. I.e., in your 'Alarm_Pot1' Alarm Object you have
the above Expression.

This is not a good idea; will lead to "circular reference." You are trying
to evaluate something in the Message Expression which needs something yet
to be evaluated (the state of the Alarm Object)

One workaround for this is to use a second Alarm Object
and have the .hi
and .lo states of the first Alarm object ORed as the condition. You can
now use your above Expression in the Message field.

Regards,

Khalid Ansari
Lookout
National Instruments
0 Kudos
Message 2 of 2
(4,278 Views)