I really just need some help to know where to start. This is my first time using cDAQ hardware.
My application requires 4 counter pulse outputs. Lets call them W, X, Y, Z. These will map to the 9401 W=PFI3, X=PFI7, Y=PFI1, Z=PFI5 CTR OUT pins.
These outputs will serve as triggers for 4 independent light sources. The sources require precision sync. They will have a period of 100ms. The pulses that trigger the source must be 50ns wide for the test case.
I create 4 DAQmx vchans, Led_W, Led_X, Led_Y, and Led_Z.
I create 4 Tasks, T_Led_W, T_Led_X, T_Led_Y, and T_Led_Z.
I want the application to be able to produce a pulse train on any one or 2 of the trigger lines.
For one line it is easy, just configure T_Led_W, and let it go.
The Problem is that I need to generate pulses synchronized to the nanosecond on 2 triggers at the same time, for example, W and X.
I cant use Channel Expansion, because when I do that, the two tasks start a few microseconds apart.
I only have 4 counters on this chassis, so I cant use another counter to start the tasks on an edge.
I might be able to do something with Time based triggering, that actually worked. I was able to create a task with outputs W and X, and setup a time trigger, and I can get W and X to output 50ns wide pulses every 100ms syncd exactly.
This kind of stuff might work for me, but really what i want to do is produce the following output where every letter in the sequence below happens at an exact 100ms time, producing a 50ns wide pulse:
W, W, W, W, W, W, W, WX, WX, WX, WX, X, X, X, X, XY, XY, XY, XY...
Without the availability of of a 5th counter to keep track of the 100ms tick, I don't see how time triggering will help.
Is this possible with the hardware I have to work with?