Comments; Variables - Emerson DSM314 User Manual

Pacsystems rx3i & series 90-30
Table of Contents

Advertisement

User Manual
GFK-1742F
11.2

Comments

Comments allow the programmer to describe program operation, or any information that
the programmer wishes to embed in the program. Comment text begins with the (*
character pair and terminates with the *) character pair and may appear anywhere within
the program. For example:
The DSM during program execution ignores comments. Thus, comment lines do not count
when determining local logic program length.
11.3

Variables

Local Logic provides the user access to motion controller data, control and status bits, and
parameters using a fixed set of variables. The language also supports decimal, hexadecimal,
and binary constants. Hexadecimal and binary value representations are unsigned
constants in program statements, but are ALWAYS interpreted as signed two's complement
in mathematical expressions. To assign a value to a variable the user would enter the
following
or in hexadecimal form
When variables are assigned a numeric value they are automatically limit checked to a
signed 32-bit value. For example the following values represent the largest positive and
negative values that are acceptable.
or in decimal form
To assign the maximum negative value the user would enter
or in decimal form
If the user enters a number that exceeds the above numerical limits an error will be
generated indicating that the constant is out of range.
Local Logic variables have a read, write, or read/write "directional" attribute. (Additional
information concerning the variables and their type are contained in chapter 13.) As an
example, the variable Positive End of Travel for Axis 1 (Positive_EOT_1) is a read only
variable. As such, the following is a valid construct:
However, the following is an invalid construct:
Local Logic Tutorial
(* Valid Comment Structure *)
Torque_Limit_1 :=5000; (* Sets Torque Limit Axis 1 to 50% *)
Torque_Limit_1:=16#1388; (* Set Torque Limit Axis 1 to 50% *)
P001:=16#7FFFFFFF; (* P001=2147483647 *)
P001:=2147483647; (* P001=16#7FFFFFFF *)
P002:=16#80000000; (* P002=-2147483648 *)
P002:=-2147483648; (* P002=16#80000000 *)
P001:=Positive_EOT_1; (* P001 = Positive End of Travel Axis 1 *)
Chapter 11
Jan 2020
276

Advertisement

Table of Contents
loading

Table of Contents