User`s manual

GFK-1742A 12-1
Local Logic Language Syntax
Introduction
This chapter describes the Local Logic programming language syntax, rules, and language
elements. The language uses free-format text based constructs derived from the IEC 1131
structured text standard. The sections that follow describe the available commands and the
command syntax.
Syntactic Elements
The local logic language syntax is described in the following sections. The syntax is easy to learn
and provides a rich feature set that allows the user to accomplish the programming task. Chapter
11 contains many examples that will further aid the reader in understanding the syntax and its
application. The first time user may also wish to consult the section on “Building Your First Local
Logic Program” program contained in chapter 10 and the sample programs in the Chapter 11
tutorial as additional aids.
Numeric Constants
The local logic programming language supports decimal, hexadecimal, and binary constants. The
DSM treats all constants as 32 bit signed twos-complement integer values. Single underline
characters (i.e. 16#7fff_ffff) may be inserted between digits to improve the readability of large
numbers.
Decimal constants must be in the range of –2147483648 to 2147483647. Only integer values are
supported, therefore constants do not have a decimal point. Thus, as in all integer-based systems
the decimal points are implied and the programmer must keep track of them if fractional math is
needed.
Examples:
523 Positive decimal constant
-1048 Negative decimal constant
1_745_245 Positive decimal constant with embedded underscores
Hexadecimal (base 16) constants are identified by a 16# prefix and must have a value that can be
represented in 32-bits (8 hexadecimal digits). Hexadecimal constants cannot have a sign (+/-)
prefix. Hexadecimal digits A-F are not case sensitive, upper or lower case may be used.
12
Chapter