
User Manual
Chapter 10
GFK-1742F
Jan 2020
Introduction to Local Logic Programming
247
It is important to understand the concept shown in Figure 113. before writing local logic
programs. The local logic program runs to completion each position loop sample period.
The program then re-executes the complete local logic program the next position loop
sample period. This execution method differs from the motion program execution method.
The motion programs execute each command to completion in a sequential fashion,
without any time guarantees. This concept is illustrated in Table 53. , which lists the first four
local logic execution periods for the local logic and motion programs shown in Figure 113.
In the example, note that the local logic program executes to completion each position loop
sample period. The motion program statements execute until the controlled motion
achieves the desired result. For additional details concerning motion program statement
execution, consult chapter 7.
Table 53: Local Logic
–
Motion Program Execution Example
Position Loop Sample
Number
Active Motion Program
Statement
Local Logic Program
Statements
n
CMOVE ##,ABS,S-CURVE
Position_Loop_TC_1:=50;
IF Actual_Position_1>4000 THEN
Digital_Output1_1:=ON;
END_IF;
IF Actual_Position_1>=4500 THEN
Digital_Output1_1:=OFF;
END_IF;
IF Actual_Position_1> 6000 THEN
Digital_Output3_1:=ON;
END_IF;
IF Actual_Position_1>=7500 THEN
Digital_Output3_1:=OFF;
END_IF;
n+1
CMOVE ##,ABS,SCURVE
Position_Loop_TC_1:=50;
IF Actual_Position_1>4000 THEN
Digital_Output1_1:=ON;
END_IF;
IF Actual_Position_1>=4500 THEN
Digital_Output1_1:=OFF;
END_IF;
IF Actual_Position_1> 6000 THEN
Digital_Output3_1:=ON;
END_IF;
IF Actual_Position_1>=7500 THEN
Digital_Output3_1:=OFF;