![background image](http://html1.mh-extra.com/html/omron/r88a-mcw151-drt-e/r88a-mcw151-drt-e_operation-manual_742243167.webp)
152
Command, function and parameter description
Section 6-3
See also:
GET, INPUT, LINPUT, KEY
6-3-101 INPUT
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, separated
by commas, or on multiple lines separated by carriage return. The program
execution will be paused until the string is terminated with a carriage
return <CR> 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 Motion Perfect.
Arguments:
n
The specified input device. When this argument is omitted, the port as speci-
fied by INDEVICE will be used.
variable
The variable to write to.
Precautions:
Channel 0 is reserved for the connection to Motion Perfect and/or the com-
mand line interface. Please be aware that this channel may give problems for
this function.
See also:
GET, LINPUT
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
6-3-102 INT
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
0
RS-232C programming port 0
1
RS-232C serial port 1
2
RS-422A/485 serial port 2
5
Motion Perfect port 0 user channel 5
6
Motion Perfect port 0 user channel 6
7
Motion Perfect port 0 user channel 7