ADwin-Gold II
, Manual February 2013
89
Digital Inputs and Outputs
Digin
ADwin
Digin
Digin
returns the TTL level of a digital input.
Syntax
#Include
ADwinGoldII.inc / GoldIITiCo.inc
ret_val
=
Digin
(
channel
)
Parameters
Notes
For any digital channel configured as output
Digin
has no function.
Conf_DIO
configures digital channels as inputs or outputs in groups of
8.
See also
,
,
,
,
Valid for
Gold II
Example
Rem Please select the appropriate include for ADbasic / TiCoBasic
#Include
ADwinGoldII.inc / GoldIITiCo.inc
Init:
Conf_DIO
(
1100b
)
'channels 0:15 as inputs
Event:
Rem input DIO00 = high?
If
(
Digin
(
0
)
=
1
)
Then
Rem Set DIO18 and DIO20 to values of DIO02 and DIO05
Digout
(
18
,
Digin
(
2
))
Digout
(
20
,
Digin
(
5
))
EndIf
T11 TiCo
channel
Number (0…31) of digital input.
LONG
ret_val
TTL level of the selected input:
1: TTL level is high.
0: TTL level is low.
LONG