Control Techniques UD70 User Manual page 86

Large option module and software
Hide thumbs Also See for UD70:
Table of Contents

Advertisement

DELAY
Syntax
DELAY (Integer expression%)
The
DELAY
the integer expression in increments of 0.1 second. This instruction cannot
be relied on to produce an accurate time delay. In the worst case, the time
delay could be 100ms shorter than that specified (it will never be longer).
can be used only in
DELAY
#18.12 = 10 //set parameter 18.12 to 10
Example
DELAY(10)
#18.12 = 0
DIM
Syntax
DIM variable% [number
DIM variable [number
The
instruction is used to specify an array of a set of variables of the
DIM
same type (integers or floating-point). The instruction does not produce
any code, but tells the compiler to reserve space for a dynamic array.
An array must be specified before the array is used. It is recommended that
an array is specified in the
array is to be used in.
Example
INITIAL{
DIM myarray%[100] //declares an integer called
//[myarray] which has 100 elements.
myarray%[0] = 10 //initialise the first element to 10
myarray%[1] = 20 //initialise the second element to 20
myarray%[99] = 50 //initialise the last element
index% = 1
}
CLOCK{
myarray%[index%] = #3.02 //get speed feedback
index% = index + 1 //increment index counter
IF index% = 100 THEN
index% = 0
ENDIF
}
See also Arrays under Variables in Chapter 4 DPL Programming.
7-10
Reference
instruction causes the program to pause for a time specified by
or
INITIAL
BACKGROUND
//delay program for 1 second.
_
_
of
elements%]
_
_
of
elements%]
Task, but it can be specified in the task the
INITIAL
Tasks.
UD70
Issue code: 70nu2

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Table of Contents

Save PDF