User`s manual
GFK-1742A 13-1
Local Logic Variables
Local Logic Variable Types
Local Logic accesses the motion controller variables and parameter registers using pre-defined
variable names. Refer to Table 13-1 through Table 13-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 13-1 through Table 13-
6 ). A description of the terms used in the Variable Tables follows:
Variable Attribute
The attribute for each Local Logic variable is listed in Table 13-1 through Table 13-6. 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 13-1 through Table 13-6 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
13
Chapter