User Manual Chapter 13
GFK-1742F Jan 2020
Local Logic Variables 308
Chapter 13: Local Logic Variables
This chapter describes the local logic variable types, identifies the local logic system
variables, double precision 64-bit registers, the local logic user data table, and digital
outputs/CTL variables.
13.1 Local Logic Variable Types
Local Logic accesses the motion controller variables and parameter registers using pre-
defined variable names. Refer to Table 15H13-1 through Table 20H13-6 for a complete
listing of all Local Logic variables.
Examples:
IF Actual_Position_2 > 5000 THEN ...;
IF Strobe1_Level_2 = ON THEN ...;
Storing values to variables is performed by using the “:=” assignment operator:
Examples:
Torque_Limit_2 := 8500; (* Set Torque Limit to 85% * )
Position_Loop_TC_1 := 2500 / Actual_Velocity_1;
Local Logic variables are broken down into two categories: Global Variables and Per-Axis
Variables. There are four sets of axis variables (Axis1 - Axis4). Each set of variables is
subdivided into Control variables, Status variables and Faceplate I/0 (refer to Table 65
through Table 70). A description of the terms used in the Variable Tables follows:
Variable Attribute
The attribute for each Local Logic variable is listed in Table 65 through Table 70. Variables
can be Read-Only, Write-Only or Read-Write. The Parser reports an error if the user attempts
to write to a Read-Only variable or read from a Write-Only variable.
Variable Size
Local Logic variables range in size from 1 bit (Bit Operands) to 64 Bits (for the Double
Precision Dxx registers). Refer to Table 69 through Table 70 for a listing of the size of each
Local Logic variable. Attempting to write a value larger than a given variable size will result
in the value being truncated. For example, if the result of a math operation is 32 bits long
and is assigned to a 16-bit variable only the low 16 bits will be stored. The Parser reports a
warning if a Bit Operand is used as the destination variable in a non-Boolean Math operation
(only the least significant bit of the result would be stored).
Note: The AQ command variables (Torque Limit, Velocity Loop Gain, Follower Ratio, Position Increment
and Position Loop Time Constant) may have an allowed range that is smaller than the Local Logic
variable size. The module reports a warning error code and rejects any invalid values if the
program attempts to write a value outside the valid range of an AQ command. Refer to Chapter 4
for a description of the allowed %AQ command ranges.