:Revision=1
:html
<<
128.159
UmsDAC object|UmsDAC
--
The IP object <!RW>UmsDAC is used to control the DAC12 card of the UMS.

The object (resp. the card) has only a card address, no channel addresses.
>>

<<
128.159.2
Procedures of the UmsDAC object|Procedures
--
>>
<<
128.159.2.1
UmsDAC.Setup|Setup
--
<!DEF>
procedure <!TW>UMSDAC.Setup (aCard : address; rReference, rSense : real);
<!TXT>
Selects internal or extarnal reference and sense.

<!STBL>
<!+>rReference<!>Meaning<!>
<!c>-1<!>no change<!>
<!c>0<!>internal reference<!>
<!c>1<!>external reference<!>
<!ETBL>

<!STBL>
<!+>rSense<!>Meaning<!>
<!c>-1<!>no change<!>
<!c>0<!>interne Fhlerleitung<!>
<!c>0<!>external sense<!>
<!ETBL>

If the <!RW>UmsDAC.Value procedure is to be used, the value of the reference voltage has to be set with the <!RW>UmsDAC.Reference command.
>>

<<
128.159.2.2
UmsDAC.Buffer (procedure)|Buffer
!128.159.3.3
--
<!DEF>
procedure <!TW>UMSDAC.Buffer (aCard : address; rBuffer : real);
<!TXT>
De/activates the output buffer and selects the gain.

<!STBL>
<!+>rBuffer<!>Output buffer<!>VU<!>
<!c>0<!c>off<!c>1<!>
<!c>1<!c>on<!c>1<!>
<!c>2<!c>on<!c>2<!>
<!c>4<!c>on<!c>4<!>
<!c>5<!c>on<!c>5<!>
<!ETBL>

If <!PW>rBuffer is equal to or less than zero, the buffer will be switched off. For other values of <!PW>rBuffer the buffer will be switched on and set to the next equal or higher possible gain level. If the value is higher than the highest possible gain, the highest gain will be selected.
>>

<<
128.159.2.3
UMSDAC.Output|Output
--
<!DEF>
procedure <!TW>UMSDAC.Output (aCard : address; rOnOff : real);
<!TXT>
Switches teh output relay on or off.

 <!PW>rOnOff : 0/1 or <!RW>On resp. <!RW>Off
>>
<<
128.159.2.4
UMSDAC.DOut|DOut
!128.159.3.4
--
<!DEF>
procedure <!TW>UMSDAC.DOut (aCard : address; rOnOff : real);
<!TXT>
Switches the output buffer of the comparator on or off.
In the default configuration, the output of the comparator will be High, if the outpout voltage is higher than 9.5V.

 <!PW>rOnOff : 0/1 or <!RW>On resp. <!RW>Off
>>
<<
128.159.2.5
UmsDAC.DAC (procedure)|DAC
!128.159.3.1
--
<!DEF>
procedure <!TW>UMSDAC.DAC (aCard : address; rDACValue : real);
<!TXT>
Sets the DAC value directly.

 <!PW>rDACValue : -4095..+4095

Triggers an implizit <!RW>UMSDAC.Send
>>
<<
128.159.2.6
UmsDAC.Factor (procedure)|Factor
!128.159.2.5
!128.159.3.2
!128.159.2.2
--
<!DEF>
procedure <!TW>UMSDAC.Factor (aCard : address; rFactor, rAutoRange : real);
<!TXT>
Calculates the DAC value for the wanted factor and sets it.

 <!PW>rFactor : -5..+5 (resp. +- maximal buffer factor)

 <!PW>rAutoRange : if the buffer is on (Buffer&lt;&gt;0) and this parameter is <!RW>TRUE, the buffer stage will be adjusted autimaticaly. If the buffer is not active, this parameter will be ignored.

The following table shows the way of operation.
<!STBL>
<!+>rAutoRange and<br>(Buffer&lt;&gt;0)<!+>DAC value<!+>Result<!>
<!c>false<!c>&lt;-4095<!>DAC is set to -4095, clipping (<!PW>rFactor is not reached)<!>
<!c>false<!c>-4095..4095<!>the DAC value is set<!>
<!c>false<!c>&gt;4095<!>DAC is set to 4095, clipping (<!PW>rFactor is not reached)<!>
<!c>true<!c>&lt;-4095<!>the DAC value is recalculated for the next higher buffer gain. Clipping occurs only, if there is no higher gain for the buffer<!>
<!c>true<!c>-4095..4095<!>The DAC is set, except if the <!PW>rFactor could be realized with less than 75% of the next lower buffer gain too. In that case, the DAC value will be recalculated<!>
<!c>true<!c>&gt;4095<!>the DAC value is recalculated for the next higher buffer gain. Clipping occurs only, if there is no higher gain for the buffer<!>
<!ETBL>
Triggers an implizit <!RW>UMSDAC.Send
>>
<<
128.159.2.7
UmsDAC.Store|Store
!128.159.2.8
--
<!DEF>
procedure <!TW>UMSDAC.Store (aCard : address);
<!TXT>
Stops the immediate sending of each change to the card.

This mode is canceled with <!RW>UMSDAC.Send. <!RW>UMSDAC.DAC and <!RW>UMSDAC.Factor call UMSDAC.Send internally.
>>
<<
128.159.2.8
UmsDAC.Send|Send
!128.159.2.7
--
<!DEF>
procedure <!TW>UMSDAC.Send (aCard : address);
<!TXT>
Sends the setup to the card, in case the automatic transmission has been blocked with <!RW>UMSDAC.Store. From now on the changes will be sent immediately.

<!RW>UMSDAC.DAC and <!RW>UMSDAC.Factor call <!RW>UMSDAC.Send internally.
>>
<<
128.159.2.9
UmsDAC.Reference|Reference
!128.159.2.10
!128.159.3.5
--
<!DEF>
procedure <!TW>UMSDAC.Reference (aCard : address; rReference : real);
<!TXT>
Defines the reference voltage.

The reference voltage is used in <!RW>UmsDAC.Value calls.
>>

<<
128.159.2.10
UmsDAC.Value (procedure)|Value
!128.159.2.9
!128.159.2.6
!128.159.3.5
--
<!DEF>
procedure <!TW>UMSDAC.Value (aCard : address; rValue, rAutoRange : real);
<!TXT>
Sets the output voltage (based on the defined reference voltage).

If <!PW>rAutorange is <!RW>TRUE and teh buffer is active, teh gain of the buffer will be adjusted.

Internally the following code is executed:
<!CODE>
UmsDAC.Factor (aCard, rValue / UmsDAC.Reference (aCard), rAutorange);
<!TXT>

Therefore, the reference voltage has to be set.

For more information about the <!PW>rAutoRange parameter, see <a href="128.159.2.6">UmsDAC.Factor</a>.

If used as a function, <!RW>UmsDAC.Value can be used to read back the set voltage.
>>

<<
128.159.3
Functions of the UmsDAC object|Functions
--
>>

<<
128.159.3.1
UmsDAC.DAC (function)|DAC
!128.159.2.5
--
<!DEF>
function <!TW>UmsDAC.DAC (aCard : address) : real;
<!TXT>
Returns the actual DAC value.
>>
<<
128.159.3.2
UmsDAC.Factor (function)|Factor
!128.159.2.6
--
<!DEF>
function <!TW>UmsDAC.Factor (aCard : address) : real;
<!TXT>
Returns the actiual gain of the output stage (DAC value times the direct gain of the buffer)
>>
<<
128.159.3.3
UmsDAC.Buffer (function)|Buffer
!128.159.2.2
--
<!DEF>
function <!TW>UmsDAC.Buffer (aCard : address) : real;
<!TXT>
Returns the gain of the buffer, resp. 0, if the buffer is switched off.
>>
<<
128.159.3.4
UmsDAC.DOut.Read|DOut.Read
!128.159.2.4
--
<!DEF>
function <!TW>UmsDAC.DOut.Read (aCard : address) : real;
<!TXT>
Returns the actual level at the output of the comparator.

To read the output, the output driver has to be switched on with <!RW>UmsDAC.DOut.
>>
<<
128.159.3.5
UmsDAC.Value (function)|Value
!128.159.2.9
!128.159.2.10
--
<!DEF>
function <!TW>UmsDAC.Value (aCard : address) : real;
<!TXT>
Returns the actual output voltage (a calculated value, based on the DAW value, the buffer gain and the reference voltage)
>>
