Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

C Programming - LabJack U3


  • Please log in to reply
1 reply to this topic

#1 autolog

autolog
  • Members
  • 5 posts

Posted 09 May 2013 - 12:39 PM

I have been using the Labjack U3 Control Panel to test my automation (controlling PMDC motor using a motor controller) by supplying reference voltage to my controller (0-5v), and it works fine. But now, I am switching it to C Programming using a Embedded C Programmer to completely automate the system. I need a sample C program to generate a reference voltage in the DAC 0 and DAC 1 port using LabJack U3 Device. It will be very helpful if you could send me a sample code from which I can develop the sequence of operation. Your support is greatly appreciated. Thanks and Regards

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 09 May 2013 - 02:01 PM

What operating system will the C program be running on?

Considering this is posted in the Apple/Mac OS X forum, Linux/Mac OS X C examples can be found in the Exodriver source code download:

http://labjack.com/s...ac-os-x-drivers
https://github.com/labjack/exodriver

Using the Feedback low-level function you can set the DACs. The u3Feedback.c demonstrates setting DAC0 among other things and u3EFunctions.c demonstrates setting a DAC using the eDAC helper function (it handles the low-level Feedback function for you). Helper functions are in u3.c/h.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users