Omron NX-ID3343 User Manual page 151

Nx-series digital i/o units machine automation controller
Table of Contents

Advertisement

CASE State OF
0:
//Wait for input bit 00 to change.
IF( InputTimeStamp <> N1_Input_Bit_00_Time_Stamp )THEN
InputTimeStamp:=N1_Input_Bit_00_Time_Stamp;
IF( OffsetTimeStamp <= (OffsetErrorTaskExeCnt * TaskPeriod) )THEN
//If the specified time is 3 task periods or less, error end.
State:=0;
Error:=TRUE;
ErrorCode:=WORD#16#0001;
ELSE
//Set the specified time.
SetOutputTimeStamp:=InputTimeStamp+OffsetTimeStamp;
N2_Output_Bit_00_Time_Stamp:=SetOutputTimeStamp;
N2_Output_Bit_00:=TRUE;
State:=1;
END_IF;
END_IF;
1:
//Check the output.
IF( E001_Time_Stamp_of_Synchronous_Output < SetOutputTimeStamp )THEN
;
ELSE
//Check the output status because the specified time has passed.
IF( N2_Output_Bit_00_Output_Status=FALSE )THEN
//Output completion
N2_Output_Bit_00_Time_Stamp:=0;
N2_Output_Bit_00:=FALSE;
State:=0;
ELSE
//Output error
Error:=TRUE;
ErrorCode:=WORD#16#0002;
State:=0;
END_IF;
END_IF;
ELSE
;
END_CASE;
NX-series Digital I/O Unit User's Manual (W521)
//Transit to waiting for input bit 00 to change.
//Error registration
//Continue output check because the specified time has not been reached.
//Save the input changed time for input bit 00.
//Transit to output check.
//Turn OFF the output.
//Transit to waiting for input bit 00 to change.
//Error registration
//Transit to waiting for input bit 00 to change.
5 I/O Refreshing
5 - 35
5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents