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.


Reading multiple channels U6

U6 Read multiple AIN channels

  • Please log in to reply
1 reply to this topic

#1 Hybrid Engineer

Hybrid Engineer
  • Members
  • 9 posts

Posted 11 September 2013 - 01:08 AM



When I read multiple AIN channels off a Labjack U6 using the "Configure AIN U6" and "AddS Go Get" VI's the read time starts to get slow. When reading 5+ channels it gets slow enough to become very noticeable and hangs the front panel whilst it is reading.


What is the best way to read a large number of channels without my program slowing down? Or should I be reading in a loop so that it only reads one channel at a time? Or will this always be the case and I should run it in a separate parallel loop?


Please note the accuracy of the reading must not be compromised.


I would like to explore all possible solutions so any suggestions would be great.



#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 11 September 2013 - 02:58 PM

Given your question I assume you are using the "U6 Multiple AIN Example.vi" as a reference which is a great starting point.  Depending on what resulotion & range you are configuring your AIN channels to be I would recomend that you use a second parall loop. The following link is to our Command/Response page that has a lot of timing's documented for our U6.



Also, make sure you are not re-configuring the U6 every reading.  Your thought process should look like:


1. Open U6

2. Configure U6 (using "Configure AIN U6")

3. Enter while loop

4. Repeatedly request information from U6 (using "AddS Go Get") & call "LJUD error to string" to turn any error's that occur into human readable messages.


If you are trying to read many channels at high resolutions/gain levels then I recomend that you add a separate parallel loop if you need the GUI to respond in a timely fashion. 



A common design pattern that we use here at labjack is the producer consumer pattern.  It seems to work well for most simple applications we create at LabJack.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users