Hello everyone,
I have some questions for you. I want to learn somethng about trap routines. For exaple Why I must use trap routiens? or How can I use that? I need basic samples about this. I found a module aboot Trap routines. But I didnt understand well. I hope you cam help me. Thanks for all
MODULE Warning
VAR intnum nTimeInt_1;
VAR intnum nTimeInt_2;
PERS bool sim_test:=FALSE;
PERS bool OpStart:=TRUE;
PROC main()
!===============================================================
!TIME TRAP 1 CONNECTION
!===============================================================
IDelete nTimeInt_1;
CONNECT nTimeInt_1 WITH TimeTrap1;
ITimer 1,nTimeInt_1;
!===============================================================
!TIME TRAP 2 CONNECTION
!===============================================================
IDelete nTimeInt_2;
CONNECT nTimeInt_2 WITH TimeTrap2;
ITimer 0.5,nTimeInt_2;
WHILE TRUE DO
CheckErrorStatus;
SystemStatus;
IF OpStart=FALSE THEN
IF DOutput(bFlash_1)=1 THEN
Set doStReadyLamp;
ELSE
Reset doStReadyLamp;
ENDIF
ELSE
Set doStReadyLamp;
ENDIF
WaitTime 0.3;
ENDWHILE
ENDPROC