Hi Diana
Thanks for the answer. Unfortunately, I don't need to count the edges, but to set occurences at both edges of the signal (or to make an operation, when the signal is rising and another operation when the signal is falling). I made a better diagram (see the "Tryd.jpg" image), to explain more clearly what I want. Each time the signal is rising, I want an operation within another while loop to be completed, and the same when the signal is falling. I already tried with a counter, but the think is, it absolutely doesn't work. I have to set a sample clock which scan the PFI for rising or falling edge. Then the VI "Wait for next sample clock" stops the while loops until the next edge comes. This action set an occurence, which will release a parallel while loop. This method works fine with only one PFI, and if I only want to detect a falling or a rising edge.
The analog output is only a dummy task. For this reason, I only give a 0 as output for the two analog ouptu channels.
I guess the problem comes from the two DAQ tasks which are both defined with the analog output. I should only create one task with two analog output channels. The problem is, that I cannot assign two different sample clocks for the same task... So I only can detect the falling or the rising edge... (see the "Two_Output_Tryd.jpg" image).
Regards
Guillaume