05-28-2021 03:37 PM
I'm not sure if the issue I'm seeing is hardware or software. The intention of the piece of the program pictured below is to continuously pulse as a piezo stage moves to various programmed positions, then at the last position stop firing. Right now, it continues to fire after this is run, even when the program is completely stopped. Is there something I've done wrong with the DAQ task, or does this look correct? It's possible this is a hardware thing that's being observed, not software, as the set-up this is used in is rather complicated.
Solved! Go to Solution.
05-30-2021 05:12 AM
If this code runs to completion, the pulse train task should indeed be stopped and cleared, thus no longer generating pulses. To that extent, the DAQmx stuff looks right.
Other things about the code are written at "pre-expert" level though, and experience here has shown that to correlate at times with mis-diagnosis of symptoms and behavior.
So, in detail:
- are you *certain* everything shown in this code runs to completion? How do you know?
- are you *certain* the pulses continue to generate? Are you looking at signals on a scope? Or are you reaching that conclusion some other way, and if so, why?
- could this code be called again after the first time it runs to completion? Or is there some other part of the code that can generate similar pulses?
-Kevin P
05-31-2021 10:34 AM
Hi Kevin,
The code runs to completion and does in fact stop generating pulses! It turned out to be a hardware issue. The pulse detection method was the opening of a shutter to allow a laser pulse through, and it turns out the shutter wasn't actually plugged in. Always check that everything is plugged in first! Thank you for your troubleshooting help