12-06-2013 05:04 AM
Hi, every Sir :
I am using cDAQ 9174 + NI 9402 to generate some relate triggers for instruments controls.
To generate the 4 DO wave with 4 counters, like this:
For the delay between channels, should be adjustable in us level. like this:
But for default setting with interlock, 4 channels are not synchronized, the time uncertain in ms level.
So how to synchronize trigger the start and stop of 4 timer/counter(with different duty cycle)?
I noted the related topics, for examples thise use arm start trigger somethings.
but cDAQ 9174 + NI 9402 maybe not have those ai/ao start trigger.
Is any triggers internal to control the start and stop of 4 timer/counter?
for example, an another counter inner-directed to trigger this start and stop?
Any suggestions are welcome, VI, DAQmx.....
12-06-2013 11:11 AM
The first image you posted shows the first channel outputting at twice the frequency of the others, but the second image seems to indicate that all channels should output at the same frequency.
If you need behavior like the first image, I would configure all 4 channels as continuous counter outputs with the desired frequency and duty cycle. Each channel would have a variable initial delay. Channels 2-4 should be configured to use a digital start trigger, the source of the start trigger should be channel 1's counter internal output. Once triggered however, you wouldn't be able to make adjustments to the delay values while the outputs are running.
If you need behavior like the 2nd image (with all channels at the same frequency), you could do what I mentioned above, OR you could configure channels 2-4 as single retriggerable pulses with channel 1 as a continuous counter output. Channel 2 would be triggered from channel 1's counter internal output, channel 3 would be triggered from channel 2's counter internal output, and channel 4 would be triggered from channel 3's counter internal output. Doing this would allow you to change the delay values while the outputs are running without losing synchronization (it's not clear if you need to do this or not).
Best Regards,
12-08-2013 09:52 PM
Thanks.
I am sorry to not clearfy the relation of graphs.
In fact , the 2nd graph is the enlarge of part of 1st graph like below:
would be triggered from channel 1's counter internal output,
This is helpfull information! All other channells can be setted delay time relative channel 1's counter internal output.
But Where to get counter internal output? In Signalexpress, tirgger-source only can be selected from implicit or external signal like PFI0~2
How to set counter internal output as trigger for this in vi or DAQmx?
and how to stop(or finish) this set of signals with something like the count number of the 4th pulses signal ?
12-09-2013 02:31 PM - edited 12-09-2013 02:31 PM
Well, in SignalExpress your options are a bit more limited. I haven't really used SignalExpress much (and it's been a long time), but I believe you can only trigger the task off of a signal on a PFI line. If this is true, you could always just wire the ctr0 output back into another PFI line and use the PFI line instead (there would be a slightly larger delay but it would be on the order of 10s of ns and likely not noticeable, if it is a problem you could calibrate it out).
In LabVIEW you just need to call something like this when setting up your counter output tasks (but the internal outputs won't show up in the dropdown by default as they are considered advanced terminals😞
Best Regards,
12-09-2013 08:47 PM
Thanks John !
You are great! I am first know that the "Advanced" DAQmx Terminals.
Yes, which can be used internal, which must be used reback from external, how to arrange triggers and time orders, are very import for constructing complex system.
using PFI0~2, these signals can be received, though I still do not konw how to stop them with the slowest signal's N counts.
CtroInternalOutpu can not be used as trigger since I need them in different dyty cycle (or in proportion mode).
I will try use one of those counters in cDAQ 9174 chassis.
12-10-2013 01:44 AM
Oh, on the cDAQ chassis the terminal will be something like /<Chassis name>/CtrXInternalOutput. If you don't have an extra line anywhere (i.e. you are using all 4 PFIs on a single 9402 for routing the counter outputs) then you'll have to use the internal terminal (which you can do in LabVIEW, C, CVI, .NET, etc. but I don't *think* you can do it in SignalExpress).
As far as stopping the signals, just make your master task run in finite mode and so it will stop after N pulses are generated. The other channels will no longer receiver triggers either and everything will stop together.
I'm not sure what you mean about proportion mode, but you can configure each counter with a different duty cycle and still have them use a start trigger.
Best Regards,