From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequential digital output from a binary array

Hi,

 

I have a 100K-length 1-D bit-array (in Matlab) that contains 1 or 0 in each element.

 

Is it possible to write the elements of this array into a digital output line of DAQ in a serial manner, and at a specified rate, (let's say, 50 kbps)?

 

I have both PCI-6259 and PXIe-6363.

 

I don't have any experience with Labview and DAQs, but it would be great to hear some suggestions as a starting point, if my case is viable.

 

Thanks in advance.  

 

zeppelin

0 Kudos
Message 1 of 5
(5,177 Views)

Hello Zeppelin,

 

You want to send the array from LabVIEW directly to the DAQ device or from MATLAB to the DAQ device?

 

Best Regards,

0 Kudos
Message 2 of 5
(5,157 Views)

Hi amezam,

 

Thanks for your reply.

 

I want to send the array from Matlab to DAQ, load it to buffer as whole, and then output it (after applying a trigger input) as one bit at a time to modulate a TTL-driven laser at a rate of 50 kbps. 

 

I hope my problem is clear now.

 

Regards,

zeppelin 

0 Kudos
Message 3 of 5
(5,152 Views)

Hello zepplin,

 

There are two ways you can interface with a DAQ device in MATLAB ®.

 

You can use the DAQmx .NET API: AE KB: Do I need Measurement Studio to use NI-DAQmx in .NET?

 

Please see the .NET Help for DAQmx for detailed information on how to use the DAQmx .NET assembly which is installed with DAQmx .NET Framework Support.

 

Or you can use the Data Acquisition Toolbox™: http://www.mathworks.com/products/daq/ which is provided by The MathWorks, Inc. 

 

Regards,

Matt M.

 

MATLAB® is a registered trademark of The MathWorks, Inc.  All other trademarks are the property of their respective owners.

Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(5,137 Views)

Hi Matt, 

 

Thanks for your kind help!

 

But, I want to figure out one more critical issue. Is it possible to store in one of those DAQ devices a 100K length array consisting of 1s and 0s representing logical values, and then output 'sequentially' in 0-5V TTL levels according to the stored array data (5V for array element 1, 0V for element 0) just from a 'single line' with 50kHz rate, so in 2 seconds? I think that this is a very basic question, however, I could not find any similar case in NI forums. 

 

Regards,

zeppelin

 

 

 

0 Kudos
Message 5 of 5
(5,031 Views)