Hi all,
I am programming for the LabJack U3-LV. I have been looking for a high-level function that will allow me to write analog to the U3. I've been using the low-level function writeRegister(), but I would like to avoid having to use ModBus registers. Is there some functional equivalent to setDOState() for analog, which uses IO points (0-19, FIO0-CIO3) instead of registers?
In addition, I would like some clarificaiton as to whether or not I am able to write analog to FIO0-FIO9, or if they're only digital pins.
Thanks,
Mel
There is the getAIN method in the U3 class. It provides high-level functionality to read one analog input.
On the U3-LV, FIO0-7 and EIO0-7 (flexible I/O lines) can be individually configured for digital I/O or analog inputs. Use the configIO method to configure lines as digital I/O or analog inputs (FIOAnalog, EIOAnalog). Analog inputs and flexible I/O are documented in these sections of the U3 datasheet:
https://labjack.com/support/datasheets/u3/hardware-description/ain
https://labjack.com/support/datasheets/u3/hardware-description/fio
We have a LabJackPython quickstart for the U3 here:
https://labjack.com/support/software/examples/ud/labjackpython/low-level
Hi,
Thanks for the response. My original question was whether or not there is a high-level function for writing one analog output, not reading. Does that exist?
Thanks,
Mel
No, currently there is no high level function to set the analog outputs (DACs). The Modbus function is the highest level function for setting the DACs. Otherwise the getFeedback function can be used. Setting DAC0 with getFeedback is demonstrated on the quickstart page I previously linked to.
Analog outputs cannot be configured on the FIO, EIO or CIO lines. Only the two DAC lines provide analog outputs. There is the LJTick-DAC which provides two additional analog outputs through the two digital I/O lines:
https://labjack.com/accessories/ljtick-dac