Digital Inputs and Outputs
Digin_FIFO_Full
ADwin
94
ADwin-Gold II
, Manual February 2013
Digin_FIFO_Full
Digin_FIFO_Full
returns the number of saved value pairs in the FIFO of the
edge detection unit.
Syntax
#Include
ADwinGoldII.inc / GoldIITiCo.inc
ret_val
=
Digin_FIFO_Full
()
Parameters
Notes
See also
,
Valid for
Gold II
Example
Rem Please select the appropriate include for ADbasic / TiCoBasic
#Include
ADwinGoldII.inc / GoldIITiCo.inc
Dim
Data_1
[
10000
],
Data_2
[
10000
]
As
Long
Dim
num
,
i
,
index
As
Long
Init:
Conf_DIO
(
1100b
)
'channels 0:15 as inputs
Digin_FIFO_Enable
(
0
)
'edge control off
Digin_FIFO_Clear
()
'clear FIFO
Digin_FIFO_Enable
(
10011b
)
'control channels 1,2,5
index
=
1
Event:
num
=
Digin_FIFO_Full
()
'number of value pairs
If
(
num
>
0
)
Then
If
(
index
+
num
>
10000
)
Then
index
=
1
Rem read value pairs
For
i
=
1
To
num
Digin_FIFO_Read
(
Data_1
[
index
],
Data_2
[
index
])
index
=
index
+
1
Next
i
EndIf
T11 TiCo
ret_val
Number (0…511) of saved value pairs in the FIFO.
LONG