
User Manual
Chapter 12
GFK-1742F
Jan 2020
Local Logic Language Syntax
287
Examples:
2#1010
Binary constant
2#11111110_11101101_10111110_11101111
Binary constant with embedded
underscores
A local logic program may have a maximum of 50 unique constants whose value is greater
than 2047 or less than
–
2048. If a local logic program declares more than 50 unique
constants, the build process generates an error. Most programs use much less than 50
constants, so this is generally not a constraint.
12.1.2
Local Logic Variables
The local logic language supports a number of predefined variables that allow access to the
DSM I/O data, CTL bits, and other status and control information. A detailed description of
the local logic variable set is contained in chapter 13 Each variable has two attributes, size
and direction. Local Logic variables range in size from 1 Bit (Bit Operands) to 64 bits.
All Local Logic parameter registers are one of the following types.
•
Double integer variables hold signed 32 bit values (
–
2147483648 to 2147483647).
There are 256 Parameter registers (P000-P255).
•
Long integer variables hold signed 64 bit values (+/-9.22 x 1018). The long integer
variables are unique in that they may only be used for the result of a multiply or as
the numerator in a divide or modulus operation. There are 8 long integer registers
(D00-D07).
All Local Logic variables have one of the following directional attributes.
•
Read-only variables may not be used as the destination of an assignment operation.
•
Write-only variable may only be used as the destination of an assignment statement.
•
Read-write variables may be used as a source or destination.
Refer to Chapter 13 for a list of all the Local Logic variable size and direction attributes.