RTC
®
5 PC Interface Board
Rev. 1.9 e
10 Commands And Functions
385
innovators for industry
Ctrl Command read_analog_in
Function
reads the analog input values (ANALOG IN0 and ANALOG IN1) from the
(RTC
®
5 PC interface board’s) optional ADC add-on board or from the RTC
®
5-Express
board’s “SPI / I2C” connector and returns them as 12-bit digital values.
Call
AnalogValue = read_analog_in()
Result
an unsigned 32-bit value:
Bits#0…11
ANALOG IN0 input value as 12-bit digital value
Bit#12
= 0 (channel number)
Bits#13…14
= 0
Bit#15
Old bit for ANALOG IN0
Bits#16…27
ANALOG IN1 input value as 12-bit digital value
Bit#28
= 1 (channel number)
Bits#29…30
= 0
Bit#31
Old bit for ANALOG IN1
Comments
• This command can only be used together with an RTC
®
5-Express board or with an
RTC
®
5 PC interface board with installed ADC add-on board (see
and
), i.e. not together with an RTC
®
5 PC/104-
Plus
board or an RTC
®
5 PCIe/104
board.
• The old bits (bits #15 and #31) are set to 1 after reading via
read_analog_in
. They will
be automatically reset, when new data are available at the corresponding analog input.
RTC
®
4
RTC
®
5 new command
Version info
Available beginning with version DLL 527, OUT 529, RBF 519
Ctrl Command read_encoder
Function
returns the counts of the two RTC
®
5 encoder counters that were stored via
.
Call
read_encoder( &Encoder0_0, &Encoder1_0, &Encoder0_1, &Encoder1_1 )
Returned para-
meter values
Encoder0_0,
Encoder1_0,
Encoder0_1,
Encoder1_1
counts as pointers to signed 32-bit values.
For parameter “Encoder
n
_
m
”,
•
n
is the number of the encoder counter (Encoder0, Encoder1)
•
m
is the number of the buffer position (parameter
Pos
of
Comments
• Also see
"Processing-on-the-fly (Optional)", page 177
• If incremental encoders are used to detect the motion of the parts to be processed,
encoder counter Encoder0 will be triggered by the signals at encoder input ENCODER X
and encoder counter Encoder1 by the signals at encoder input ENCODER Y. In contrast,
if an encoder simulation has been started via
, both encoder
counters will be triggered by an internal periodic 1 MHz clock signal.
• For buffer positions in which counts were not previously stored via
, the
value 0 will be returned (initialized value).
RTC
®
4
RTC
®
5 new command
Version info
Available beginning with version DLL 520, OUT 519
References
,
,