
SM-Applications Modules & Motion Processors User Guide
81
Issue Number: 4
S
Info
rm
In
Inst
al
G
Pa
ra
DP
L
Pr
Co
m
F
CT
S
In
S
D
M
Q
In
This shows the POS0 and POS1 tasks interrupting the CLOCK task which in turn
interrupts the BACKGROUND task. As can be seen, this is quite a heavily loaded
program since the background task is only executed once in a while. The processor free
resource parameter Pr
81.04
can be used to determine how heavily loaded the Second
Processor is.
7.2.1
EVENT tasks
There are four event tasks provided. The event tasks can be triggered on:
•
CTNet SYNC frame received (configured via Pr
81.35
)
•
User program initiated
New DPL command SCHEDULEEVENT. See on-line help for information.
7.3
Variables
7.3.1
Types
There are three basic types of variables:
1. Integer Variable
2. Double-precision Floating Point Variable
3. Single-precision Floating Point Variables
An Integer variable is denoted by a % symbol after the variable name. A Floating Point
variable is denoted by the lack of a % symbol.
Example of variables:
A special statement is placed at the start of the program to declare what type of floating
point variable is used throughout the program - either single or double precision. By
default double-precision variables will be used. By including the following line
immediately below the program header region (with $TITLE, etc.) the float type will be
single-precision:
7.3.2
Variable Names
The first character of a variable name must be a letter. Subsequent characters may
include letters, numbers and the underscore (_) character.
The Plus module, V2 module, ST Indexer and ST Plus provide Pr
88.03
through to
Pr
88.08
which will give a greater accuracy on the available resources.
NOTE
Table 7-2 Variable Types
Type
Representation
Range
Integer
32-bit signed.
-2147483648 to
2147483647
Single float 32-bit, 1 sign bit, 8 exponent and 23 mantissa.
±3.038
Double float 64-bits: 1 sign bit, 52 bit mantissa, 11 bit exponent
±1.308
Speed% = 1234
// a integer variable
Value = 55.6
// a floating point variable
$flt single
• Variable names are case sensitive (e.g. The variable names speed%, SPEED% and
Speed% are different variables).
• SyPTPro QuickLD and FBD editors will only allow the use of variables no longer than
16 characters including any % sign.
NOTE
Summary of Contents for Digitax ST Indexer
Page 131: ......
Page 132: ...0471 0062 04...