Jump to content


Photo

Labjack U3-LV on Qt (Linux)


  • Please log in to reply
1 reply to this topic

#1 kankz

kankz
  • Members
  • 1 posts

Posted 07 March 2013 - 07:34 AM

Hello, i bought a LJ-U3-Hv and i want to use it for (for example) light a led on DAC0. My problem is, I don't understand so much C, and i don't find any explication of the parameter BYTE *Pbuff of LJUSB_Write() and LJUSB_Read(). I included and installed correctly libusb and labjackusb on my linux and project. Can u just send me a example code where a 5 V is sending to the a DAC ? I'm beginner so don't blame me and sorry for my bad english. Thank you, Kankz. :) ______________________________________________________________ Config : OpenSuse 12.2, with Qt Creator 4.8.1. Libusb 1.0.9 and the lastest exodriver.

#2 LabJack Support

LabJack Support
  • Admin
  • 8449 posts

Posted 07 March 2013 - 12:21 PM

BYTE *pBuff is a byte (unsigned char) array. U3 examples can be found in the examples/U3 directory of the Exodriver download. Most U3 examples show LJUSB_Write and LJUSB_Read usage. For setting a DAC, u3Feedback.c and u3EFunctions.c have some example code for this. Note that the "easy" functions in u3EFunctions.c are helper functions provided in u3.h/c and take care of the USB write/read calls for you. They are documented in the u3.h header file.

If you are not too set on using C, you may want to consider the Python language which is easier to use. We provide the LabJackPython Python module that has higher-level API calls and there are Python bindings for QT available online.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users