DI-159 PLC Hardware Manual
StickOS
Input Statements
While the DI-159 PLC is connected to the host computer, input statements can be serviced
from the Hyper Terminal console window.
Input statements can be used to input integer expressions, using either a decimal or hex-
adecimal output radix, or input raw ASCII bytes:
input
[
dec
|
hex
|
raw
]
variable
[
$
], ...
If the variable specifies an array (or a string), the entire array (or string) contents are input. If
the expression references an output "pin variable", the corresponding DI-159 PLC output pin is
immediately updated.
When the input statement is serviced, StickOS prints a prompt to the console:
? _
And the user enters integer or string values, as appropriate, followed by the <Enter> key.
Note that while waiting for input, BASIC interrupt handlers continue to run.
Also, the most recent console input character is available in the system variable "getchar",
which you will typically use as "getchar$".
Note that when the DI-159 PLC is disconnected from the host computer, input statements hang
the program.
Examples
>
new
>
10 dim a, b$[20]
>
20 input a, b$
>
30 print a*2, b$
>
run
?
12 hello world!
24 hello world!
> _
48
Содержание DI-159
Страница 51: ...StickOS DI 159 PLC Hardware Manual 4 is even _ 51...
Страница 76: ...DI 159 Block Diagram 76...
Страница 77: ...Dimensional Drawing 77...