EasyManuals Logo

Control Techniques UD70 User Manual

Control Techniques UD70
154 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #25 background imageLoading...
Page #25 background image
UD70
Issue code: 70nu2
DPL programming 4-3
4.3 Variables
Basic variables
There are two basic types of variable, as follows:
Integer variable (
INT)
Floating-point variable (
FLOAT)
Integer
variables
Integer variables are denoted by placing a % % symbol after the name of the
variable, and are internally represented by a two’s complement
32-bit number. This gives a decimal range of ±2147483647.
Floating-
point
variables
Floating-point variables have no symbol. These variables are
IEEE double-precision (64-bit) numbers which give a range of approximately
±1.7976 x 10
±
308
.
Accessing the variables
All variables are global within a program (ie. they can be accessed and
altered by any task). (There are no local variables.)
Bit-addressing of variables
All integer variables and arrays (see below) may be bit-addressed. This
means that each individual binary bit in the variable may be separately read
or written to. Bit-addressing is achieved by appending .n.n to the end of the
variable name, where nn is the bit number to be accessed.
Example
flags%.3 = 1 ;set bit 3 to 1
IF flags%.5 = 1 THEN ... ;check bit 5
Naming conventions
The first character of a variable must be a letter. Subsequent characters
may include letters, numbers and the underscore (_) character. These may
be in any order.
Variable names are case sensitive (eg. the variable name speed%speed% is not the
same as SPEED%SPEED%).
Preferred use of variables
It is recommended that integer variables are used where possible.
Operations on integer variables perform much faster than for
floating-point variables.

Table of Contents

Other manuals for Control Techniques UD70

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Control Techniques UD70 and is the answer not in the manual?

Control Techniques UD70 Specifications

General IconGeneral
BrandControl Techniques
ModelUD70
CategoryControl Unit
LanguageEnglish

Related product manuals