This reverts commit
d721a0c05450c793a5e0e562d286a689565cf81b.
From the National Instruments E Series User Manual [1], page 3-2:
Reference Selection
(NI 6020E, NI PXI-6040E, NI 6052E, NI 6062E, NI 6070E/6071E, and
PCI-MIO-16E-4 Devices Only) You can connect each DAC to the device
internal reference of 10 V or to the external reference signal
connected to the external reference (AO EXT REF) pin on the I/O
connector. This signal applied to EXT REF should be within
±11 V. You do not need to configure both channels for the same mode.
So RF_EXTERNAL is a valid unit (i.e. in units of the AO EXT REF
signal). The next commit will add this unit.
[1]: http://digital.ni.com/manuals.nsf/websearch/
06115536722DAA558625728E007E6BA4
Edition Date: February 2007
Part Number: 370503K-01
p
>>> r.unit
<_NamedInt mA>
"""
- # other data gets packed into the unit unsigned int (e.g RF_EXTERNAL)
- _uint_all = 0xffffffffL
- _unit_all = 0xff
-
def __cinit__(self):
self.value = -1
return self.__str__()
def _unit_get(self):
- return _constant.UNIT.index_by_value(self.range.unit & self._unit_all)
+ return _constant.UNIT.index_by_value(self.range.unit)
def _unit_set(self, value):
- self.range.unit &= self._uint_all - self._unit_all
- self.range.unit |= _constant.bitwise_value(value) & self._unit_all
+ self.range.unit = _constant.bitwise_value(value)
unit = property(fget=_unit_get, fset=_unit_set)
def _min_get(self):