As of May 2, 2022 the LabJack forums have been set to read-only.
If you are in need of support, please contact us via one of the methods described on our contact page.
The channels, gains and voltages parameters require arrays, and should be the size of at least numChannels. You are trying to read 4 channels, but are only passing a variable (non-array) by reference for each of these parameters which is incorrect. Make these parameters an array of size 4, and configure channels and gains appropriately. Then display the voltages array elements after the AISample call.
The channels, gains and voltages parameters require arrays, and should be the size of at least numChannels. You are trying to read 4 channels, but are only passing a variable (non-array) by reference for each of these parameters which is incorrect. Make these parameters an array of size 4, and configure channels and gains appropriately. Then display the voltages array elements after the AISample call.
Refer to the AISample documentation:
https://labjack.com/support/datasheets/u12/programming-reference/aisample
Refer to the analog.c example from this download for example usage:
https://labjack.com/support/software/installers/u12/u12-mac-and-linux-lj...