1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?xml version="1.0" encoding="utf-8"?>
- <TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.12">
- <POU Name="MAIN" Id="{a2b09358-5c9b-458e-83dc-1d7d6fc5ad2b}" SpecialFunc="None">
- <Declaration><![CDATA[PROGRAM MAIN
- VAR
- FFU:FFU;
- tHeatbeat :Ton;
- tON :TON;
- bAdsCommErr :BOOL;
- tOFF :TON;
-
- //CE远程桌面开启
- bEnableCerDisp:BOOL;
- NT_StartProcess_Test:NT_StartProcess;
-
- END_VAR
- ]]></Declaration>
- <Implementation>
- <ST><![CDATA[FFU();
- IOMapping();
- Interlock();
- // PLC建立心跳
- tHeatbeat(IN:=NOT tHeatbeat.Q , PT:=T#1S , Q=> , ET=> );
- IF tHeatbeat.Q THEN
- GVL.stPLCtoPMC.bHeartBeatMonitor :=NOT GVL.stPLCtoPMC.bHeartBeatMonitor;
- END_IF
- // PLC监控PMC心跳
- IF GVL.stPMCtoPLC.bHeartBeatMonitor THEN
- tON(IN:=GVL.stPMCtoPLC.bHeartBeatMonitor , PT:=T#2S , Q=> , ET=> );
- tOFF(IN:=FALSE , PT:=T#2S , Q=> , ET=> );
- IF tON.Q THEN
- bAdsCommErr :=TRUE;
- ELSE
- bAdsCommErr :=FALSE;
- END_IF
- ELSE
- tOFF(IN:=NOT GVL.stPMCtoPLC.bHeartBeatMonitor , PT:=T#2S , Q=> , ET=> );
- tON(IN:=FALSE , PT:=T#2S , Q=> , ET=> );
- IF tOFF.Q THEN
- bAdsCommErr :=TRUE;
- ELSE
- bAdsCommErr :=FALSE;
- END_IF
- END_IF
- //CE远程桌面开启
- NT_StartProcess_Test(
- NETID:= ,
- PATHSTR:='\windows\CerDisp.exe' ,
- DIRNAME:='\windows' ,
- COMNDLINE:= ,
- START:=bEnableCerDisp ,
- TMOUT:= ,
- BUSY=> ,
- ERR=> ,
- ERRID=> );]]></ST>
- </Implementation>
- <LineIds Name="MAIN">
- <LineId Id="2" Count="0" />
- <LineId Id="93" Count="0" />
- <LineId Id="54" Count="0" />
- <LineId Id="37" Count="1" />
- <LineId Id="18" Count="4" />
- <LineId Id="39" Count="0" />
- <LineId Id="23" Count="5" />
- <LineId Id="40" Count="1" />
- <LineId Id="29" Count="4" />
- <LineId Id="43" Count="2" />
- <LineId Id="35" Count="1" />
- <LineId Id="68" Count="1" />
- <LineId Id="7" Count="0" />
- <LineId Id="71" Count="8" />
- <LineId Id="70" Count="0" />
- </LineIds>
- </POU>
- </TcPlcObject>
|