10-19-2006 02:28 AM
10-19-2006 08:18 AM
I'm not so sure you can do it the way you described with your E-series board. I have a different idea for you that I think should probably work. I'll describe it as a DAQmx task under LabVIEW.
1. Configure your counter for Pulse Generation, setting Units=Ticks. Use external signal T2 as your timebase. Set your Low Time = N ticks and High Time = 2 ticks (the minimum possible). Using the minimum High Time allows you to be ready for the next T1 trigger sooner.
2. Make sure you're configured to generate 1 single pulse. In other words, do NOT make a call to DAQmx Timing, which would set it up for multiple output pulses.
3. Configure T1 as your Start Trigger, then use a DAQmx Trigger Property node to set "Retriggerable=True."
4. Run the task.
Behavior: board receives T1 edge, counts N edges of T2 and makes a High output, counts 2 more edges of T2 and makes Low output, is now ready to repeat on the next T1 edge...
-Kevin P.
10-24-2006 10:23 AM
10-24-2006 11:49 AM
I can't think offhand what might cause the behavior you describe. The task should operate purely in hardware with no CPU requirement, so even if your "empty" while loop is so empty that it spins at MHz rates and hogs the CPU, I wouldn't expect what you saw. Still, it'd be a good practice to add one of the msec Wait functions to your loop, or perhaps even an event structure to handle a "Stop" button.
Also, how are you subsequently verifying that the shift is either N=10 or N=15? I've had occasions where my I hunted for bugs in my data collection when the real problem was an error in my verification. Can you post the code that's producing the unstable shift? It may help eliminate suspects...
-Kevin P.
10-25-2006 04:11 AM - edited 10-25-2006 04:11 AM
Message Edité par c.r. le 10-25-2006 05:34 AM
10-27-2006 07:59 AM
10-31-2006 01:16 AM