BASIC commands
PROGRAMMING MANUAL
99
Revi
si
on 3.0
3.2.154 INPUT
/i
3.2.155 INT
/i
3.2.156 INVERT_IN
/i
Type
I/O 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 RS-232C
programming port 0 when using Trajexia Tools.
Note: Channel 0 is reserved for the connection to Trajexia Tools and/or the
command line interface. Please be aware that this channel may give prob-
lems 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 func-
tions 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.
Arguments
•
input
A BASIC expression
Example
>>? IN(3)
0.0000
>>INVERT_IN(3,ON)
>>? IN(3)
1.0000
See also
N/A
I52E-EN-03.book Seite 99 Freitag, 29. Juni 2007 11:55 11