Dataq DI-159 User Manual page 48

Table of Contents

Advertisement

DI-159 PLC Hardware Manual
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
StickOS

Advertisement

Table of Contents
loading

Table of Contents