Hello
I would do somthing like thise
Code:
PROGRAM Tempratur_320_01
VAR
iINIT_Bac_alarm : INT; (*Sends values at startup, one time*)
END_VAR
IF iINIT_Bac_alarm = 0 THEN
(*Enable high og Low i tempfølere*)
ZSK300E_320_001_RT401_PV.Limit_Enable.highLimitEnable := TRUE;
(*Set alarmtext and type in bacnet variable*)
ZSK300E_320_001_RT401_PV_H_AL.Active_Text :='Høy alarm';
ZSK300E_320_001_RT401_PV_H_AL.Inactive_Text :='Ikke alarm';
ZSK300E_320_001_RT401_PV_H_AL.Notify_Type := Bacnet_alarm;
iINIT_Bac_alarm := +1 ;
END_IF
On the first run iNIT_Bac_alarm variable is 0. And the IF sentence is true.
It goes true what should be set and last sets the iNIT_Bac_alarm variable to +1. Then it would not be true before it's set to 0 the next time it's reset.
Hope it helps
Espen