StickOS
DI-159 PLC Hardware Manual
>
10 dim array[4], b, volatile
>
20 dim led as pin dtin0 for digital output
>
30 dim potentiometer as pin an0 for analog input
>
40 dim persistent as flash
>
50 for b = 0 to 3
>
60 let array[b] = b*b
>
70 next
>
80 for b = 0 to 3
>
90 print array[b]
>
100 let led = !led
>
110 next
>
120 print "potentiometer is", potentiometer
>
130 print "volatile is", volatile
>
140 print "persistent is", persistent
>
150 let persistent = per1
>
run
0
1
4
9
potentiometer is 1745
volatile is 0
persistent is 0
>
run
0
1
4
9
potentiometer is 1745
volatile is 0
persistent is 1
>
dim pcntr0 as short at address 0x40150004
>
print pcntr0
5338
>
print pcntr0
2983
> _
39
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...