Jump to content


Photo

Can the U3 Stream Raw Binary Data into Matlab?


  • Please log in to reply
2 replies to this topic

#1 James_D

James_D
  • Members
  • 2 posts

Posted 25 October 2011 - 06:46 PM

Hi There, Currently the ljud_eGet_array function provided in the Matlab code does return an array of double precision values. But for an application that acquires a very large number of samples this array of doubles requires too much memory or processing bandwidth in converting to integers for storage. Is it possible to stream the raw data (12bit A/D result ) from the U3 into Matlab as an array of 16 bit integers? Any help would be greatly appreciated. James

#2 LabJack Support

LabJack Support
  • Admin
  • 8449 posts

Posted 26 October 2011 - 08:04 AM

You can do a put_config with the special channel LJ_chAIN_BINARY to stream binary data. It still comes back as doubles but you can cast it right to integers for efficiency.

#3 James_D

James_D
  • Members
  • 2 posts

Posted 26 October 2011 - 06:34 PM

You can do a put_config with the special channel LJ_chAIN_BINARY to stream binary data. It still comes back as doubles but you can cast it right to integers for efficiency.


Got it. Not exactly easy to find in the manual, but finally figured out how to send that command.

ljud_AddRequest(ljHandle,LJ_ioPUT_CONFIG,LJ_chAIN_BINARY,1,0,0);

Thanks,
James




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users