EasyManua.ls Logo

LabJack U12 - 4.2 - EAnalogOut

LabJack U12
61 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
long *overVoltage,
float *voltage )
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:
*idnum – Local ID, serial number, or -1 for first found.
demoSend 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without a LabJack.
channel – Channel command is 0-7 for single-ended, or 8-11 for differential.
gain – Gain command is 0=1, 1=2, …, 7=20. This amplification is only available for differential channels.
Outputs:
*idnum – Returns the local ID or -1 if no LabJack is found.
overVoltageIf >0, an overvoltage has been detected on one of the selected analog inputs.
voltageReturns the voltage reading.
LabJackPython Example
>>> import u12
>>> d = u12.U12()
open called
Writing: [0x0, 0x0, 0x0, 0x0, 0x0, 0x57, 0x0, 0x0]
Received: [0x57, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0]
>>> d.eAnalogIn(0)
Writing: [0x8, 0x9, 0xa, 0xb, 0x1, 0xc0, 0x0, 0x0]
Received: [0x85, 0x0, 0x99, 0x2b, 0x2b, 0x99, 0x2c, 0x26]
{'overVoltage': 0, 'idnum': 12, 'voltage': 1.4599609375}
4.2 - EAnalogOut
Easy function. This is a simplified version of AOUpdate. Sets the voltage of both analog outputs.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
If either passed voltage is less than zero, the DLL uses the last set voltage. This provides a way to update 1 output without
changing the other. Note that when the DLL is first loaded, it does not know if the analog outputs have been set, and assumes they
are both the default of 0.0 volts. Similarly, there are situations where the LabJack could reset without the knowledge of the DLL,
and thus the DLL could think the analog outputs are set to a non-zero voltage when in fact they have been reinitialized to 0.0 volts.
Declaration:
long EAnalogOut ( long *idnum,
long demo,
float analogOut0,
float analogOut1 )
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:
*idnum – Local ID, serial number, or -1 for first found.
demoSend 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without a LabJack.
analogOut0Voltage from 0.0 to 5.0 for AO0.
analogOut1Voltage from 0.0 to 5.0 for AO1.
Outputs:
*idnum – Returns the local ID or 1 if no LabJack is found.
LabJackPython Example
>>> import u12
>>> d = u12.U12()
open called
Writing: [0x0, 0x0, 0x0, 0x0, 0x0, 0x57, 0x0, 0x0]
18

Other manuals for LabJack U12