Basically in agreement w/ answer above, plus would add a few thoughts:
1. Suggest you add some data dependency in config area prior to main loop. Make sure both position counters are armed *before* starting your "acq. clock" (pulse train on CTR 2). As it stands now, can you be sure that the trigger condition doesn't occur, say, after programming one encoder & the pulse train generator but before programming the other?
2. Would further suggest not entering the loop until you verify that trigger condition has happened.
3. Would suggest building up each counter's total dataset with a 1D array rather than 2D.
4. I would recommend *against* using separate while loops for the counters. Though it may help short-term debugging, it'll make life more difficul
t in the long run. Once you get the basic functionality wrung out, there are some error-checking & error-prevention details that naturally want to be shared by both of these synchronized counters, and that'll be much simpler if they're running together in the same loop.
- Kevin P.
CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).