ADwin-Gold II
, Manual February 2013
109
Digital Inputs and Outputs
Get_Digout_Word2
ADwin
Get_Digout_
Word2
Get_Digout_Word2
returns the register contents of the digital outputs
DIO16…DIO31.
Syntax
#Include
ADwinGoldII.inc / GoldIITiCo.inc
ret_val
=
Get_Digout_Word2
()
Parameterss
Notes
The return value represents the status of the output register only. A read
back of physical output status is technically impossible.
For any digital channel configured as input
Get_Digout_Long
will re-
turn an undefined value.
Conf_DIO
configures digital channels as in-
puts 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:
REM Configure inputs and outputs
Conf_DIO
(
1100b
)
Event:
Par_1
=
Get_Digout_Word2
()
'read back bits 31:16 from register
T11 TiCo
ret_val
Bit pattern that corresponds to the TTL-levels at
the digital outputs (see table).
1: Set to TTL-level high.
0: Set to TTL-level low.
LONG
Bit no. in
r e t _
val
31 …
16
15
14
…
1
0
Channel
–
DIO31 DIO30
…
DIO17 DIO16