
ADwin-Gold II
, Manual February 2013
77
Analog Inputs and Outputs
Seq_Read
ADwin
Seq_Read
Seq_Read
returns the current measurement value (16 bit) of a selected input
channel of the sequential control.
Syntax
#Include
ADwinGoldII.inc / GoldIITiCo.inc
ret_val
=
Seq_Read
(
channel
)
Parameters
Notes
The selection of input channels is useful only, if the sequential control
has been enabled with
Seq_Mode
and
Seq_Start
and if the input
channel has been selected with
Seq_Select
.
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
Dim
i
As
Long
Init:
Rem settings for sequential control of ADC 2
Seq_Mode
(
2
,
2
)
'continuous mode
Seq_Set_Delay
(
2
,
125
)
'waiting time 4.5 µs (125*20ns + 2µs)
Seq_Set_Gain
(
2
,
0
)
'gain factor 1
Rem select all channels. selection is valid only for active
Rem sequential control 2 = even numbered channels.
Seq_Select
(
0FFFFh
)
Rem start sequential control of ADC2
Seq_Start
(
10b
)
Event:
Rem read current values of even channels
For
i
=
2
To
16
Step
2
Data_1
[
i
]
=
Seq_Read
(
i
)
Next
i
Finish:
Seq_Mode
(
2
,
0
)
'reset to standard mode
T11 TiCo
channel
Input channel (1…16).
LONG
ret_val
Measurement value (16 bit).
LONG