Hello everybody,
Here is what i would like my PXI 6259 generates :
- t0 :
- a 62,5 kHz digital output pulse data signal (on port0/line1)
- a digital signal S1 at +5v output (on port0/line2)
-t1 :
- stop the 62,5 kHz output
- stop the S1 signal (from 5V to 0V output)
I'm using the C API and here it what I made to generate that :
- I have created a task for the counter (62,5 kHz)
- A task for the pattern data signal
- A task for S1 signal
All task are already started.
At t0, i write the samples to the pattern task, and I set the output to 1 for the S1 task.
At t1, i writle 0 for the samples to the pattern task and i set the output to 0 for the S1 task.
The generation works fine : data and my S1 signal are correctly generated but I have a delay
- between the S1 to +5v and the start of the data output (the data start sometimes after S1 and sometimes before)
- the stop of the data output and S1 to 0v (same issue, S1 could stop after or before the data but never in the same time).
It is an issue for me.
I would like to both my data and my S1 signal start to output at the same time and stop at the same time.
I have tried another design :
at
- (t0 - offset) : write the samples in my pattern task
- start the pattern task
- set the initial delay to offset for the counter pulse
- start the counter task
- t0 : write 1 to the S1 chan to have the output at 5v
t1 :
- stop pattern and counter task
- write 0 to the S1 chan to have the output at 0v
It arrives that the delay pulse is not respected and the data task start its output while the S1 output is not as yet generated.
Would you have an idea to synchronise my both output : S1 start emitting at the same time as my data, and both stop at the same time ?
Thank you for your help and idea.