DI-159 PLC Hardware Manual
StickOS
do
[(
break
|
continue
) [
n
]]
until
expression
gosub
subname
[
expression
, ...]
sub
subname
[param, ...] [
return
]
endsub
Variables
all variables must be dimensioned
variables dimensioned in a sub are local to that sub
simple variables are passed to sub params by reference
array variable indices start at 0
v is the same as v[0], except for input/print statements
ram variables:
dim
var
[
$
][
[
n
]
]
dim
var
[
[
n
]
]
as
(
byte
|
short
)
flash parameter variables:
dim varflash
[
[
n
]
]
as flash
pin alias variables:
dim
varpin
[
[
n
]
]
as pin
pinname
for
\ (
digital
|
analog
|
frequency
) \ (
input
|
output
) \
absolute variables:
dim
varabs
[
[
n
]
]
at address
addr
dim
varabs
[
[
n
]
]
as
(
byte
|
short
)
at address
addr
system variables (read-only): analog
,
getchar
,
keychar
,
msecs
,
nodeid
,
random
,
sec-
onds
,
ticks
,
ticks_per_msec
18
Содержание DI-159
Страница 51: ...StickOS DI 159 PLC Hardware Manual 4 is even _ 51...
Страница 76: ...DI 159 Block Diagram 76...
Страница 77: ...Dimensional Drawing 77...