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

LJ AIStream and AOUpdate Errors


  • Please log in to reply
3 replies to this topic

#1 accuaircolin

accuaircolin
  • Members
  • 2 posts

Posted 22 October 2014 - 12:45 PM

Background:

I am attempting to use a LabJack U12 as a DAQ and control unit for a shock dyno. The dyno has a built in motor controlled that allows speed adjustment on a 0-5V Analog signal. The U12 outputs this 0-5V signal from AO0 and inputs analog differential sensor signals from (0-1), (2-3), and (4-5). I need to adjust the analog output while simultaneously acquiring data at a sample rate of at least 200Hz (the output rate can be as little as 5 Hz) during a single test cycle.

 

The VI's AIStream and AOUpdate are placed in parallel while loops for the duration of the testing cycle. I have been running into the error "Unable to claim LabJack" whenever the program is run. I've read that this can occur when multiple VI's are trying to access the U12 simultaneously, but I need uninterrupted DAQ while controlling the cycle. How can I prevent this?

 

I have also run into "Read Error" when using the AIStream alone. I have even run into this error while using the unmodified example VI's provided by Labjack. Why would this happen?

 

Thanks in advance for the help.



#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 22 October 2014 - 04:03 PM

You can't do anything else (e.g. AOUpdate) while streaming on the U12, so what you describe will not work.  The U12 is our oldest product, so consider upgrading to any of our other devices as they are all faster and can do DAC updates while streaming.  With the U12, the best you can do is to stick with command-response which will give you a max feedback loop rate of perhaps 20Hz.

 

For the read error while streaming, what do you have to do to recover?  Just run the VI again, or something more such as power-cycle the U12?



#3 accuaircolin

accuaircolin
  • Members
  • 2 posts

Posted 23 October 2014 - 04:30 PM

The read error was only appearing when using the AOUpdate and AIStream in the same VI. I have been unable to recreate the error since removing the AOUpdate function.

 

I have noticed that if the loop involving AIStreamRead is aborted instead of shutting down properly it preserves the open channel and doesn't allow a new channel to be started. I have only been able to restart this task by restarting LabVIEW. Is there a way another way to handle this error. (I'm using -1 as the ID currently for first available LabJack). 

 

I'll suggest to the manufacturer to upgrade to a newer board, but unfortunately I have to work with the U12 as is.

 

Thanks for the help.



#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 25 October 2014 - 10:04 PM

What errorcode do you get?  Which function throws that errorcode?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users