Omron NY532-5400 Reference Manual page 1444

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

2 Instruction Descriptions
 Example of Confirming Completion of Event Task before Proceeding
In this example, event task 'Task1' is executed each time the value of Trigger changes to TRUE. The
Task_IsActive instruction is used to see when execution of Task 1 is completed.
LD
Name
Trigger
Operating
Active
Trigger is received and ActEventTask is executed.
Trigger
'Task1'
Task_IsActive is used to see if Task1 execution is in progress.
Operating
'Task1'
Active
ST
Name
Trigger
LastTrigger
Operating
Active
// Start sequence when Trigger changes to TRUE.
IF ( (Trigger=TRUE) AND (LastTrigger=FALSE) ) THEN
ActEventTask('Task1');
Operating:=TRUE;
END_IF;
LastTrigger:=Trigger;
// See if Task1 execution is in progress.
IF (Operating=TRUE) THEN
Active:=Task_IsActive('Task1');
IF (Active=FALSE) THEN
Operating:=FALSE;
END_IF;
END_IF;
2-1392
Data type
Initial value
BOOL
FALSE
BOOL
FALSE
BOOL
FALSE
ActEventTask
EN
ENO
TaskName
Operating
S
Task_IsActive
Active
EN
TaskName
Inline ST
1 // Processing after completion of execution
2 ;
Operating
R
Data type
Initial value
BOOL
FALSE
BOOL
FALSE
BOOL
FALSE
BOOL
FALSE
Comment
Execution condition
Checking event task execution in progress
Event task execution in progress
Comment
Execution condition
Value of Trigger from previous task period
Checking event task execution in progress
Event task execution in progress
// Execute event task 'Task1'.
// Task1 execution completed.
NY-series Instructions Reference Manual (W560)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents