
User Manual
Chapter 11
GFK-1742F
Jan 2020
Local Logic Tutorial
280
11.5
Local Logic / Host Controller / Motion Program
Communication
The Local Logic program or host controller communicates with the motion program using
parameters, CTL bits and Motion Program Block Numbers. These methods are used as
follows:
•
Parameter Data
–
The Parameter data (P000-P255) are accessible from Local Logic,
host controller, and Motion Programs. The Parameter data are similar to variables in
a program. For example, a motion program can DWELL a period of time that is
determined by a parameter. The Local Logic program or the host controller can write
the parameter that determines the DWELL time in motion program.
•
CTL Bits
–
CTL Bits allow the Local Logic program or host controller to signal the
Motion Program to start an event. For example, CTL bits are used to control Motion
Program flow with the JUMP command.
•
Motion Program Block Numbers
–
The Motion Program (when block numbers are
used within the Motion Program) makes the current block number available to the
Local Logic program or host controller. The current Block number can be used within
the Local Logic program or host controller to make an action occur only during a
specific Motion Program section.
The signaling constructs between programs (host controller, Motion, and Local Logic) allow
them to interact and perform operation between programs. These signaling constructs are
important for the programming examples that follow. For additional information on the
host controller-to-motion program communications and program interactions the reader
should consult chapter 5 and Chapter 7.
11.6
Local Logic Programming Examples
The preceding sections introduced the base local logic language constructs. To illustrate
these concepts, the following sections contain program examples. These programs are for
illustration only and do not necessarily represent functional applications. Additional details
concerning the available local logic statements, variables and constructs are contained in
chapters 12 and 13.
11.6.1
Torque Limiting Program Example
The following example illustrates a method to use local logic in concert with a motion
program to perform torque limiting based upon a block number within a motion program.
In the example, the servo axis 1 applies a nut on the threaded shaft. At the beginning the
axis moves a little backward to improve the nut and shaft threads engagement. This motion
has the torque limit set to the maximum value. Next the nut is twisted until tight with the
torque limited to 30% of the maximum value. During this operation the motion command
destination point usually is not reached and the axis stops when the load friction is greater
then the torque limit. Subsequently, to release all tension in the mechanics, the torque is
set to 0 and after 0.1 second the signal “screw operation done” is
turned “on”. When th
e