You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
2.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.12">
<POU Name="Alarms" Id="{2d85d74f-ff76-4a26-b1c7-c80367604076}" SpecialFunc="None">
<Declaration><![CDATA[PROGRAM Alarms
VAR
fbAdsReadEvents : FB_AdsReadEvents;
bReadEvents : BOOL;
events:Events_Logger;
fbGetCurTaskIdx: GETCURTASKINDEX;
testAlarmZone:BOOL:=FALSE;
testAlarmApt:BOOL:=FALSE;
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[(*fbAdsReadEvents ( sNetId := ,
bReadEvents := bReadEvents,
nLanguageId := 0, // 0 - project dafault language; DE 1031, EN 1033
eDateAndTimeFormat := E_DateAndTimeFormat.en_US,
tRefreshTime := T#1S,
tTimeout := T#5s);
GVL.arAlarms[0].00 := IO.inCR1024_SftyBACREL AND NOT IO.inCR1017_EmerCON; // Contactor CR1017 is not ON. Check CR1024 coil power and CR2516 coil power and NO contact 9-1
IF GVL.iTempOutside > 1000 OR (IO.TS3003_OutT1>1000 AND IO.TS3007_OutT2>1000) THEN
GVL.arAlarms[0].01 := TRUE; // If for any reason outside temperature is out of the reasonable range, set it -20°C
ELSE
GVL.arAlarms[0].01 := FALSE;
END_IF*)
fbGetCurTaskIdx();
IF _TaskInfo[fbGetCurTaskIdx.index].FirstCycle THEN
events.SetAlarm(Trigger:=ADR(testAlarmZone),Object:='Zone 1 alarm',Description:='Test Alarm zone');
events.SetAlarm(Trigger:=ADR(testAlarmApt),Object:='Appartment 101 alarm',Description:='Test Alarm apt');
END_IF;
events.Run(IsFirstCycle:=_TaskInfo[fbGetCurTaskIdx.index].FirstCycle );
]]></ST>
</Implementation>
<LineIds Name="Alarms">
<LineId Id="24" Count="4" />
<LineId Id="21" Count="0" />
<LineId Id="5" Count="0" />
<LineId Id="15" Count="0" />
<LineId Id="10" Count="0" />
<LineId Id="12" Count="2" />
<LineId Id="6" Count="0" />
<LineId Id="43" Count="4" />
<LineId Id="42" Count="0" />
<LineId Id="36" Count="0" />
</LineIds>
</POU>
</TcPlcObject>