DI-159 PLC Hardware Manual
StickOS
Print Statements
While the DI-159 PLC is connected to the host computer, print statements can be observed on
the Hyper Terminal console window.
Print statements can be used to print integer expressions, using either a decimal or hexadecimal
output radix, or printing raw ASCII bytes:
[
dec
|
hex
|
raw
]
expression
[;]
Or strings:
string
Or various combinations of both:
string
, [
dec
|
hex
|
raw
]
expression
, ... [;]
If the
expression
specifies an array, its entire array contents are printed. If the
expression
ref-
erences an input "pin variable", the corresponding DI-159 PLC input pin is sampled to eval-
uate the expression.
A trailing semi-colon (;) suppresses the carriage-return/linefeed that usually follows each
printed line.
Note that when the DI-159 PLC is disconnected from the host computer, print statement output
is simply discarded.
Examples
>
print "hello world"
hello world
>
print 57*84
4788
>
print hex 57*84
0x12b4
>
print 9, "squared is", hex 9*9
9 squared is 0x51
>
dim a[2]
>
print a
0 0
>
print 1;
1
46
Summary of Contents for DI-159
Page 51: ...StickOS DI 159 PLC Hardware Manual 4 is even _ 51...
Page 76: ...DI 159 Block Diagram 76...
Page 77: ...Dimensional Drawing 77...