PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI-6556 multiple waveform dynamic Gen/Acquire "niHSDIO Wait Until Done" timeouts

I'm still learning how to effectively use my PXI-6556 cards, and am attempting to do some automation for writing multiple different waveforms to a DUT.

 

In this particular program, I am generating four different waveforms, writing them to memory, and then trying to loop through each one. Eventually I will get to reading some data on a serial comm line for my acquisition session, but right now am having trouble controlling the acquisition timing. I have a data active event pushed to PFI1, which serves as my start edge trigger for acquisition. I am also taking the sample size of each generated waveform and configuring the acquisition session to acquire that sample size - which it seems to do properly.

 

I seem to be able to generate and acquire fine with this program, the problem I'm having is that the niHSDIO "wait until done" function never actually sees a "done" event on either the generation or acquisition events. The function just times out and then throws an error. If I case statement out the "Wait until done" functions and control timing with just a "wait", the program seems to work correctly.

 

Is there something I'm doing wrong with the generation/acquisition session that is causing this function to not determine when the particular waveform has been generated or acquired?

Download All
0 Kudos
Message 1 of 6
(2,887 Views)

Hi Sloveless,

 

I was wondering if you can attach a screenshot of the error that you're getting from the .VI?

 

Also, do you typically know how long the wait should be for the program to work correctly? Will you ever have to change that wait time? 

 

Thanks!

Aulia V.
0 Kudos
Message 2 of 6
(2,856 Views)

Here's the error. After looking into it some more, I think it might have to do with the waveform actually being too short.

 

There are several different waveforms that I'll need to execute, and this error is only occurring with the very short ones (basically 1-3 clock cycles @ ~1M) that I'm using almost like static generation. The longer waveforms that are several thousand cycles don't seem to throw the error.

 

The timeout is set to 10 seconds. Maybe there is some latency between the initiate transfer and the check for done execution that is actually longer than the waveform itself?

 

 

0 Kudos
Message 3 of 6
(2,853 Views)

Perhaps that is the case. Do you know how long the shorter waveforms take to execute?

 

If you set the timeout to -1 for the shorter waveforms, does it throw the error? Essentially, the -1 makes it such that it doesn't wait 10 seconds but an indefinite amount of time, or however long it takes for the waveforms to finish generating.

Aulia V.
0 Kudos
Message 4 of 6
(2,849 Views)

The waveforms it's currently throwing it on are just over 1us. I made one waveform about 15us and it doesn't throw the error any more. I had earlier tried the "Check if Done" HSDIO VI and it never returned a true, like it never saw the waveform generate (although the acquisition session & an off-chassis o-scope do confirm that it does actually generate)

 

Changing timeout condition to -1 seems to just lock up the PXI and I have to go reset through MAX.

 

My take-away is don't make ultra-short waveforms and then use the wait until done function. Just going to loop the patterns with only a few bits so that it works.

 

Thanks for your help.

0 Kudos
Message 5 of 6
(2,844 Views)

Oops, sorry for that suggestion! I was under the impression that maybe we just weren't waiting long enough but now you've switched the VIs. I'm so happy you're able to find a workaround!

Aulia V.
0 Kudos
Message 6 of 6
(2,825 Views)