DI-159 PLC Hardware Manual
StickOS
Analog Input
Analog Input pins are designated in the DI-159 just as the label on the device states. For exam-
ple, analog input channel 0 is Ch0.
Please note: The DI-159 hardware does not support analog output.
The example Boilerplate code provided shows all pin designations in the DI-159 PLC. Use the
following for quick reference to
pinnames
:
Ch0 = analog input channel 0
Ch1 = analog input channel 1
Ch2 = analog input channel 2
Ch3 = analog input channel 3
Ch4 = analog input channel 4
Ch5 = analog input channel 5
Ch6 = analog input channel 6
Ch7 = analog input channel 7
Channel 0 is configured for analog input and the variable c0 is bound to the Ch0 pin with the
following statement:
dim c0 as pin Ch0 for analog input
.
A pin is configured for analog input, and a variable bound to that pin, with the following state-
ment:
dim
varpin
as pin
pinname
for analog input
If a pin is configured for analog input, then subsequently reading the variable
varpin
will return
the analog voltage level, in millivolts (mV). It is illegal to attempt write the variable
varpin
(i.e.,
it is read-only).
If a pin is configured for analog output, then writing
varpin
with a millivolt value will set the
analog output (PWM actually) pin to a corresponding analog voltage level. Reading the var-
iable
varpin
will return the analog voltage level, in millivolts (mV).
Please note: The DI-159
hardware does not support analog output.
The maximum analog supply voltage millivolts may be displayed with the command:
62
Содержание DI-159
Страница 51: ...StickOS DI 159 PLC Hardware Manual 4 is even _ 51...
Страница 76: ...DI 159 Block Diagram 76...
Страница 77: ...Dimensional Drawing 77...