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.

Multifunction DAQ

annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

Output samples per trigger, with all samples preloaded

Risolto!
Vai alla soluzione

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
Messaggio 1 di 6
3.526Visualizzazioni

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
Messaggio 2 di 6
3.518Visualizzazioni

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
Messaggio 3 di 6
3.514Visualizzazioni
Soluzione
Accettato da autore argomento 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
Messaggio 4 di 6
3.509Visualizzazioni

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
Messaggio 5 di 6
3.479Visualizzazioni

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

 

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

0 Kudos
Messaggio 6 di 6
3.429Visualizzazioni