A SERVICE OF

logo

Danaher Motion 06/2005 Overview
If INPUT$ requests reading a data length larger than available data, the
command returns only the available data:
-->?LOC(1)
11
-->STRING_VAR = INPUT$(20, #1)
-->?STRING_VAR
Hello World
LOC can be used within the INPUT$:
STRING_VAR = INPUT$(LOC(1), #1)
A partial read of the input buffer is allowed. This way, several calls to
INPUT$ empty the input-buffer:
-->?LOC(1)
11
-->STRING_VAR = INPUT$(3, #1)
-->?STRING_VAR
Hel
-->?LOC(1)
8
-->STRING_VAR = INPUT$(8, #1)
-->?STRING_VAR
lo World
When calling INPUT$, the system does not wait for data. If the input-buffer is
empty, the command returns without any return value:
-->?LOC(1)
0
-->STRING_VAR = INPUT$(10, #1)
-->?len(STRING_VAR)
0
1.8.3.2. SEND DATA
PRINT # and PRINTUSING # send data over the serial port. Both
commands use the same formatting as PRINT and PRINTUSING.
NOTE
PRINT # and PRINTUSING # appends a carriage-return (ASCII
value 13) and line-feed (ASCII value 10) characters at the end of
each message. To print a message without the terminating
carriage-return and line-feed characters use a semicolon at the
end of the command.
For example, the following uses PRINT # to send data:
-->STRING_MESSAGE = "ERROR"
-->PRINT #1, STRING_MESSAGE,"A1.PCMD=";A1.PCMD;
The output is:
ERROR A1.PCMD=0.000000000000000e+00
The values of the following variables are sent one after the other. The output
is (hexadecimal) 0x37 0x28:
I1=55
I2=40
PRINT #1, I1;I2
The output is:
5540
M-SS-005-03 Rev E 9