Analog Inputs and Outputs
DAC
ADwin
60
ADwin-Gold II
, Manual February 2013
DAC
DAC
outputs a defined voltage on a specified analog output.
Syntax
#INCLUDE
ADwinGoldII.inc / GoldIITiCo.inc
DAC
(
dac_no
,
value
)
Parameters
Notes
If you specify a value which is beyond the permissible value range, it will
automatically be set to the system-specific minimum or maximum value.
See also
Valid for
Gold II, Gold II-DA4, Gold II-DA8
Example
Rem Please select the appropriate include for ADbasic /
TiCoBasic
#Include
ADwinGoldII.inc / GoldIITiCo.inc
Rem Digital P-controller
Dim
set_to
,
gain
,
diff
,
Out
As
Long
'Declaration
Event:
set_to
=
Par_1
'Setpoint
gain
=
Par_2
'Dimension
diff
=
set_to
-
ADC
(
1
)
'Calculate control deviation
Out
=
diff
*
gain
'Calculate actuating value
DAC
(
1
,
Out
)
'Output of the actuating value
T11 TiCo
dac_no
Number of the analog output:
Gold II: 1…2
Gold II-DA4: 1…4
Gold II-DA8: 1…8
LONG
value
Value in digits, which defines the voltage to be out-
put (0…65535).
LONG