Hello,
I am using an HSDIO card (PXI 6542) to drive a device (DUT) with a predefined fixed length continuously running waveform.
That DUT might actually benefit from some dynamic changes in the digital signals depending measurements made on the DUT itself.
Right now I just switch off the DUT and the HSDIO card, write the new waveform on the card, switch back on the DUT and the digital signal generation.
Off course that's not optimal and I'd like to modify the signal in a "live" way, while the DUT is running.
Just overwriting a waveform while it is being generated should not work smoothly due to a race condition as explained here: http://digital.ni.com/public.nsf/allkb/14CE41C9CB9F10A88625766A005CEE47
I think I found a workaround but need a confirmation on it.
Instead of just one waveform I could use 2 and select which one is being generated with the help of a trigger.
The corresponding script might look like this:
script myScript repeat forever if scriptTrigger0 generate waveform1 else generate waveform2 end if end repeat end script
The idea is for example to generate waveform1.
Then depending on what the DUT needs I will calculate waveform2 and upload it to the HSDIO card.
My guess here is that overwriting waveform2 with data of the exact same size will not create any glitch since it is not currently being used to generate signals.
After that by using the trigger I could start to actually use waveform2. If I need further waveform adjustment I could do it by changing waveform1 while it is not being used for generation and so on by alternating which waveform is really being used.
Am I right that a waveform in memory but not currently used can be overwritten without causing glitch on another waveform that IS currently generating?
Regards,
Baptiste