Device used : PXI-5422 (AWG)
I am trying to generate a sinus delayed in time in relation to a trigger. After a trigger signal has been received, I would like to wait a define number of sample (or seconds) before sending a sinus from the output channel.
I first tried to use the waveform generator to create a function with a defined number of zeros before a sinus to simulate the delay. However, the waveform generated haven't the expected shape (an offset is present, their is an overshoot on the first cycle of the sinus and the sinus amplitude is lower than expected). I did several tests and my conclusion is that the waveform generator doesn't generate the desire waveform...
It is why I would like to use the standard function of the AWG, but I can't find how delay the output signal in relation to a trigger using this output mode.
Does anyone have an idea ?
Solved! Go to Solution.
You can try adding a delay function and the waveform generation function inside a sequence structure placed after the trigger.
The sinus signal generation will start after a delay specified in the first part of the sequence.
Please find attached an example of code that you can implement, this is a snippet that can drag and drop inside your diagram.
First, thanks for your response.
I had already though doing this but I need a delay which has to be constant on multiple repetitions and accurate at the nanosecond. Do you think the way that you did it is enough constant and stable ?
You cannot have a delay accurate at the nanosecond when you execute a program on Windows.
Even without configuring a time delay, the delay between the detection of the trigger and the generation of the signal will vary depending on your processor (at least 400 nanoseconds).
If you want more stability and precision, you should start looking at Real Time OS applications.