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.


How to receive digital input from U3 using matlab on OSX

  • Please log in to reply
1 reply to this topic

#1 elsewhere

  • Members
  • 1 posts

Posted 31 July 2014 - 05:56 AM



I'm working on receiving digital input from U3 using matlab.

I think I successfully installed the exodriver and Iandol's matlab class labjack.m seems to be working fine.


After reading several examples, I could not figure out how I can read digital inputs from U3 using this class.


Any help will be highly appreciated.

Thank you very much in advance.


#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 31 July 2014 - 12:08 PM

It looks like the class only sets digital I/O. To read digital I/O with labJack.m, the functionality will need to be added. You can add a function to read a single or multiple digital I/O using the Feedback command/response with IOTypes BitStateRead (single digital I/O) or PortStateRead (all digital I/O). If you need to set digital I/O direction use BitDirWrite/PortDirWrite.


Most of the labJack.m class functions that are interacting with the U3 are using the Feedback command/response, so you can use those functions' code to help implement new functions in MATLAB. The low-level Feedback command/response packets are documented here:




C examples are here and help demonstrate setting up command/response packets and parsing out the the data:



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users