As I use in the problem , I want to have a count time when I use TPreadFK , but it does't work if I put count before it, Just as the example.
Please tell me why ?
for example:
1.
1\ count time before TPReadFK; ! when problem execute reg2=0
PROC GoGlue()
ClkReset clCycleTime;
ClkStart clCycleTime;
Set DO10_12_GelStart;
reg1:=ClkRead(clCycleTime);
reg2:=reg1;
TPReadFK nSelectNo, "If you want to end glue, click YES ", stEmpty, stEmpty, stEmpty, stEmpty, "YES";
IF nSelectNo=5 or reg2>60 THEN
Reset DO10_12_GelStart
nSelectNo:=0;
ELSE
Set DO10_12_GelStart;
ENDIF
ENDPROC
2\ count time after TPReadFK; ! when problem execute reg2 is the time
PROC GoGlue()
ClkReset clCycleTime;
ClkStart clCycleTime;
Set DO10_12_GelStart;
TPReadFK nSelectNo, "If you want to end glue, click YES ", stEmpty, stEmpty, stEmpty, stEmpty, "YES";
reg1:=ClkRead(clCycleTime);
reg2:=reg1;
IF nSelectNo=5 or reg2>60 THEN
Reset DO10_12_GelStart
nSelectNo:=0;
ELSE
Set DO10_12_GelStart;
ENDIF
ENDPROC
and I don't want use the variable [MaxTime]. Thanks.....