def aoUpdate(self, idNum=None, demo=0, trisD=None, trisIO=None, stateD=None, stateIO=None, updateDigital=0, resetCounter=0, analogOut0=0, analogOut1=0):
        """
        Name: U12.aoUpdate()
        Args: See section 4.11 of the User's Guide
        Desc: Sets the voltages of the analog outputs. Also controls/reads all 20 digital I/O and the counter.

        >>> dev = U12()
        >>> dev.aoUpdate()
        >>> {'count': 2, 'stateIO': 3, 'idnum': 1, 'stateD': 0}
        """
        
        # Check id number
        if idNum is None:
            idNum = self.id
        idNum = ctypes.c_long(idNum)
        
        #  Check tris and state arguments
        if updateDigital > 0:
            if trisD is None: raise ValueError("keyword argument trisD must be set")
            if trisIO is None: raise ValueError("keyword argument trisIO must be set")
            if stateD is None: raise ValueError("keyword argument stateD must be set")
            if stateIO is None: raise ValueError("keyword argument stateIO must be set")

        # Create ctypes
        if stateD is None: stateD = ctypes.c_long(0)
        else: stateD = ctypes.c_long(stateD)
        if stateIO is None: stateIO = ctypes.c_long(0)
        else: stateIO = ctypes.c_long(stateIO)
        count = ctypes.c_ushort(999)
        
        # Create arrays and other ctypes
        ecode = staticLib.AOUpdate(ctypes.byref(idNum), demo, trisD, trisIO, ctypes.byref(stateD), ctypes.byref(stateIO), updateDigital, resetCounter, ctypes.byref(count), ctypes.c_float(analogOut0), ctypes.c_float(analogOut1))
        
        if ecode != 0: raise U12Exception(ecode) # TODO: Switch this out for exception
        
        return {"idnum":idNum.value, "stateD":stateD.value, "stateIO":stateIO.value, "count":count.value}
dataset/ETHPy150Open LabPy/lantz/lantz/drivers/labjack/_internal/u12.py/U12.aoUpdate/original