BASIC commands
PROGRAMMING MANUAL
118
R
e
vi
si
o
n
1
.0
3.2.164 INDEVICE
/i
/i
/i
3.2.165 INITIALISE
/i
3.2.166 INTEGER_READ
/i
Example
The following lines can be used to move to the position set on a thumb wheel
multiplied by a factor. The thumb wheel is connected to inputs 4, 5, 6 and 7,
and gives output in BCD.
moveloop:
MOVEABS(IN(4,7)*1.5467)
WAIT IDLE
GOTO moveloop
The
MOVEABS
command is constructed as follows:
Step 1:
IN(4,7)
will get a number between 0 and 15.
Step 2: The number is multiplied by 1.5467 to get required distance.
Step 3: An absolute move is made to this position.
Example
In this example a single input is tested:
test:
WAIT UNTIL IN(4)=ON ' Conveyor is in position when ON
GOSUB place
See also
OP
.
Type
Communication parameter
Syntax
INDEVICE
Description
The
INDEVICE
parameter defines the default input device. This device will be
selected for the input commands when the
#n
option is omitted. The
INDEVICE
parameter is task specific. The supported values are listed in the
table below.
Value
Description
0
Programming port 0 (default)
1
RS-232C serial port 1
2
RS-422A/485 serial port 2
5
Trajexia Studio port 0 user channel 5
6
Trajexia Studio port 0 user channel 6
7
Trajexia Studio port 0 user channel 7
Arguments
N/A
Example
No example.
See also
GET
,
INPUT
,
LINPUT
,
KEY
.
Type
System command
Syntax
INITIALISE
Description
Sets all axes parameters to their default values. The parameters are also
reset each time the controller is powered up, or when an
EX
(software reset)
command is performed. In Trajexia Studio the menu
Reset the controller...
under the
Controller
menu performs the equivalent of an
EX
command.
Arguments
N/A
Example
No example.
See also
EX
.
Type
System command
Syntax
INTEGER_READ(source_variable, destination_variable_low,
destination_variable_high)
Description
The
INTEGER_READ
command splits a 64 bit variable in 2 32 bit values
and copies these values to 2 other variables. The source and destination
variables can be any valid system, named,
TABLE
memory or
VR
variable.
The following parameters are 64 bit integers:
MOTION_ERROR
,
TICKS
,
DEMAND_EDGES
,
TRANS_DPOS
.
Value
Description