Analog Inputs and Outputs
Seq_Read8
ADwin
78
ADwin-Gold II
, Manual February 2013
Seq_Read8
Seq_Read8
returns the measurement values (16 bit) of the input channels
1…8 of the sequential control.
Syntax
#Include
ADwinGoldII.inc
Seq_Read8
(
array
[],
array_idx
)
Parameters
Notes
The selection of input channels is useful only, if the sequential control
has been enabled with
Seq_Mode
and
Seq_Start
, and only for input
channels which have been selected with
Seq_Select
.
If less than 4 input channels are o be read, a loop with
Seq_Read
is fa-
ster than
Seq_Read8
.
See also
,
Valid for
Gold II
Example
Rem Please select the appropriate include for ADbasic / TiCoBasic
#Include
ADwinGoldII.inc / GoldIITiCo.inc
Dim
Data_1
[
16
]
As
Long
At
DM_Local
Init:
Rem settings for sequential controls
Seq_Mode
(
1
,
2
)
:
Seq_Mode
(
2
,
2
)
'continuous mode
Rem waiting time 4.5 µs (125*20ns + 2µs)
Seq_Set_Delay
(
1
,
125
)
:
Seq_Set_Delay
(
2
,
125
)
Seq_Set_Gain
(
1
,
0
)
:
Seq_Set_Gain
(
2
,
0
)
'gain factor 1
Seq_Select
(
0FFh
)
'select channels 1…8
Rem start sequential control of ADC1 and ADC2
Seq_Start
(
11b
)
Event:
Rem read values of channels 1…8
Seq_Read8
(
Data_1
,
1
)
Finish:
Seq_Mode
(
1
,
0
)
'reset to standard mode
Seq_Mode
(
2
,
0
)
'reset to standard mode
T11
array
[]
Array to hold the measurement values of the input
channels 1…8.
ARRAY
LONG
array_idx
Array element which holds the first measurement
value.
LONG