MCPcopy Create free account
hub / github.com/LabPy/lantz / rawDIO

Method rawDIO

lantz/drivers/labjack/_internal/u12.py:715–832  ·  view source on GitHub ↗

Name: U12.rawDIO(D15toD8Directions = 0, D7toD0Directions = 0, D15toD8States = 0, D7toD0States = 0, IO3toIO0DirectionsAndStates = 0, UpdateDigital = 1) Args: D15toD8Directions, A byte where 0 = Output, 1 = Input for D15-8

(self, D15toD8Directions = 0, D7toD0Directions = 0, D15toD8States = 0, D7toD0States = 0, IO3toIO0DirectionsAndStates = 0, UpdateDigital = False)

Source from the content-addressed store, hash-verified

713 return returnDict
714
715 def rawDIO(self, D15toD8Directions = 0, D7toD0Directions = 0, D15toD8States = 0, D7toD0States = 0, IO3toIO0DirectionsAndStates = 0, UpdateDigital = False):
716 """
717 Name: U12.rawDIO(D15toD8Directions = 0, D7toD0Directions = 0,
718 D15toD8States = 0, D7toD0States = 0,
719 IO3toIO0DirectionsAndStates = 0, UpdateDigital = 1)
720
721 Args: D15toD8Directions, A byte where 0 = Output, 1 = Input for D15-8
722 D7toD0Directions, A byte where 0 = Output, 1 = Input for D7-0
723 D15toD8States, A byte where 0 = Low, 1 = High for D15-8
724 D7toD0States, A byte where 0 = Low, 1 = High for D7-0
725 IO3toIO0DirectionsAndStates, Bits 7-4: Direction, 3-0: State
726 UpdateDigital, True if you want to update the IO/D line. False to
727 False to just read their values.
728
729 Desc: This commands reads the direction and state of all the digital
730 I/O. See Section 5.2 of the U12 User's Guide.
731
732 By default, it just reads the directions and states.
733
734 Returns: A dictionary with the following keys:
735 D15toD8Directions, a BitField representing the directions of D15-D8
736 D7toD0Directions, a BitField representing the directions of D7-D0.
737 D15toD8States, a BitField representing the states of D15-D8.
738 D7toD0States, a BitField representing the states of D7-D0.
739 IO3toIO0States, a BitField representing the states of IO3-IO0.
740 D15toD8OutputLatchStates, BitField of output latch states for D15-8
741 D7toD0OutputLatchStates, BitField of output latch states for D7-0
742
743 Example:
744 >>> import u12
745 >>> d = u12.U12()
746 >>> d.rawDIO()
747 {
748
749 'D15toD8Directions':
750 <BitField object: [ D15 = Input (1), D14 = Input (1),
751 D13 = Input (1), D12 = Input (1),
752 D11 = Input (1), D10 = Input (1),
753 D9 = Input (1), D8 = Input (1) ] >,
754
755 'D7toD0Directions':
756 <BitField object: [ D7 = Input (1), D6 = Input (1), D5 = Input (1),
757 D4 = Input (1), D3 = Input (1), D2 = Input (1),
758 D1 = Input (1), D0 = Input (1) ] >,
759
760 'D15toD8States':
761 <BitField object: [ D15 = Low (0), D14 = Low (0), D13 = Low (0),
762 D12 = Low (0), D11 = Low (0), D10 = Low (0),
763 D9 = Low (0), D8 = Low (0) ] >,
764
765 'D7toD0States':
766 <BitField object: [ D7 = Low (0), D6 = Low (0), D5 = Low (0),
767 D4 = Low (0), D3 = Low (0), D2 = Low (0),
768 D1 = Low (0), D0 = Low (0) ] >,
769
770 'IO3toIO0States':
771 <BitField object: [ IO3 = Low (0), IO2 = Low (0), IO1 = Low (0),
772 IO0 = Low (0) ] >,

Callers 2

eDigitalInMethod · 0.95
eDigitalOutMethod · 0.95

Calls 4

writeMethod · 0.95
readMethod · 0.95
U12ExceptionClass · 0.70
BitFieldClass · 0.70

Tested by

no test coverage detected