BASIC commands
PROGRAMMING MANUAL
119
R
e
vi
si
o
n
1
.0
3.2.167 INPUT
/i
3.2.168 INT
/i
3.2.169 INVERT_IN
/i
Arguments
•
source_variable
Variable containing the 64 bit value to read.
•
destination_variable_low
Variable to copy the lower 32 bits of the source variable to..
•
destination_variable_high
Variable to copy the lower 32 bits of the source variable to..
Example
>> INTEGER_READ(MOTION_ERROR,VR(100),VR(101))
This example will copy the first 32 bits of
MOTION_ERROR
to VR(100)
and the rest to VR(101).
See also
MOTION_ERROR
Type
Communication command
Syntax
INPUT [ #n ], variable { , variable }
Description
The
INPUT
command will assign numerical input string values to the specified
variables. Multiple input string values can be requested on one line, sepa-
rated by commas, or on multiple lines separated by carriage return. The pro-
gram execution will be paused until the string is terminated with a carriage
return after the last variable has been assigned.
If the string is invalid, the user will be prompted with an error message and the
task will be repeated. The maximum amount of inputs on one line has no limit
other than the line length.
Channels 5 to 7 are logical channels that are superimposed on the program-
ming port 0 when using Trajexia Studio.
Note: Channel 0 is reserved for the connection to Trajexia Studio and/or the
Command Line Terminal interface. Please be aware that this channel may
give problems for this function.
Arguments
•
n
The specified input device. When this argument is omitted, the port as
specified by INDEVICE will be used.
•
variable
The variable to write to.
Example
Consider the following program to receive data from the terminal.
INPUT#5, num
PRINT#5, "BATCH COUNT=";num[0]
A possible response on the terminal could be:
123<CR>
BATCH COUNT=123
See also
INDEVICE
,
GET
,
LINPUT
,
KEY
Type
Mathematical function
Syntax
INT(expression)
Description
The
INT
function returns the integer part of the expression.
Note: To round a positive number to the nearest integer value take the
INT
function of the value added by 0.5. Similarly, to round for a negative value
subtract 0.5 to the value before applying
INT
.
Arguments
•
expression
Any valid BASIC expression.
Example
>> PRINT INT(1.79)
1.0000
See also
N/A
Type
System command
Syntax
INVERT_IN(input, on/off)
Description
The
INVERT_IN
command allows the input channels 0..31 to be individually
inverted in software. This is important as these input channels can be
assigned to activate functions such as feedhold.
The
INVERT_IN
function sets the inversion for one channel ON or OFF. It can
only be applied to inputs 0..31.