I'm still at LV2016 and can't open the full code. Can you "Save for Previous Version..." back to 2016 or earlier and repost?
The clues I see in the snippet and your description of "usually but not always" behavior make me suspect that the needed sequencing for task starts might not be in place. The hardware config settings ought to be able to give you consistent, predictable behavior.
Another possibility is that the Ctr pulse parameters delay your timing signals long enough that the chopper wheel has the chance to change state before the frame grab happens. If the chopper speed can vary from run to run (as I suspect it can), that's another way you might get a 90/10 split in behavior.
I compared your recent screenshot with the snippet I posted previously in a related thread. In my snippet, I used the "Merge Errors" function to enforce the sequencing of task starts. Specifically, all the dependent tasks were started *before* the Merge while the master controlling task (triggered pulse generator) was started *after*. Your screenshot doesn't show any of the task starts so I can't tell whether the correct sequencing is in place. And note that the addition of the Arm Start trigger needs to be considered when determining the *right* sequence.
I just reviewed that other thread I linked to in more depth and I'd urge you to review it carefully as well. It has some potentially important info about pulse timing parameters (including 'initial delay' that you've left unwired). It also continues to sound to me as though DO and probably Ctr1 tasks are not necessary and may be adding unnecessary complication, possibly contributing to the 10% undesired behavior.
The idle state and pulse parameters for Ctr0 give you the ability to control the timing of the edge that initiates a camera frame grab. I don't think you need Ctr1 to add delay. After all, the more delay you add, the more likely it is that the chopper signal changes state between the time you react to a specific edge and the time your pulse causes a frame grab to occur.
The following things should help make 100% consistent behavior:
- correct task start sequencing (I'll check after you back-save to LV 2016)
- extremely short durations (such as < 1 microsec) for all pulse params -- low time, high time, initial delay.
If your real app needs longer delays for a specific purpose, we'll come back to that. Let's first demonstrate that we can produce predictable behavior 100% of the time.
-Kevin P
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.