Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Output samples per trigger, with all samples preloaded

Solved!
Go to solution

Hi,

 

I was wondering if it was possible to (Using matlab, or labview)

preload all samples onto the daq card, and at each trigger it outputs the next value (rather then all of them, which is the default setting)

 

ie load (0 5 9 7 2 6)

at each trigger, it changes the output to the next value. (and loops around if possible)

 

I managed to program it on matlab, load sample, and then wait for trigger before outputing the value. However, I need to do the values one at a time, and can not preload all values. This is causing serious delay/cpu time for my program.

 

Any help would be appreciated.

 

I am using PCI6259

0 Kudos
Message 1 of 6
(4,169 Views)

Hi,

 

I think this should be possible. I have attached an example which I believe solves your problem. It uses a re-triggerable counter output as the sample clock to allow continuous retriggering. The counter generates 1 pulse so the output will take only 1 sample from its buffer. This will also loop around. 

 

By setting the 'use only onboard memory' property to true means that any attempt to write data to the device after the task has started will result in an error. 

 

Let me know if this is any help! 

Nick
0 Kudos
Message 2 of 6
(4,160 Views)

Hi!

 

Do you know if its possible to do this on Matlab? (or C)

 

Also, could you please resave it under a Labview 2009 compatible version? I can't seem to open it.

 

Thanks,

 

Michael

0 Kudos
Message 3 of 6
(4,156 Views)
Solution
Accepted by topic author mcleu

Hey Michael,

 

You could certainly write this in C (although labVIEW would be much quicker), as for Matlab I can't really comment! 

 

Please find 2009 version attached 

 

 

Nick
Message 4 of 6
(4,151 Views)

Worked fine, thanks!

 

Trying to do it on matlab now that I know its possible.

My labview has a limit of 8191 data samples I can load, whereas on matlab I've done over 1 million without problem (except it outputs them all on trigger rather then one at a time...)

0 Kudos
Message 5 of 6
(4,121 Views)

Is this also possible for USB devices (USB 6221, USB 6229)?

 

If yes, is there a working solution on matlab available?

0 Kudos
Message 6 of 6
(4,071 Views)