Kevin Price
2006-01-24 20:13:32 UTC
I'm using an M-series 6259 under LV 7.1.1
I've set up a hw-timed DO task to continuously generate a short digital pattern (less than 100 states). After starting the DO task but before starting the sampling clock, the DAQmx property "TotalSampPerChannelGenerated" returns the value 2047. After I start the sampling clock, it seems to increment properly, even if the sampling clock task is re-started multiple times to generate multiple sequences of hw-timed DO.
I've tried generating the sample clock both as a Counter / Timer finite pulse train and as a finite-sampling AO task and observed the same result. I also upgraded from DAQmx 7.4 to 8.0 but again, the behavior didn't change. I tried making the DO task a finite-sampling task, but the behavior was worse -- the initial offset was a different non-zero number which did not increment as the sample clock ran.
Here's the app: I have a master list of all the DO patterns to be generated. For any given run of the overall app, I may start from any index in this master list, and then traverse them incrementally either forward or backward. Meanwhile, I'm also capturing DI bits off the trailing edge of the same sampling clock. The app needs to verify that the DI pattern is always "correct" for the given DO pattern. To do this, I planned to keep track of the starting index and direction and then use the "TotalSampPerChannelGenerated" to let me look up the corresponding DO pattern in my master list.
Trouble is, can I trust the "TotalSampPerChannelGenerated" property? If I could know for sure that it will ALWAYS have an initial offset (such as 2047), fine, I can establish that value at the beginning of the program and subtract it off every time I query. But the fact that it gives me a "goofy" result makes me trust it less. Soooo......
1. Can anyone else confirm this behavior? Does everyone get the same value -- 2047?
2. Can anyone from NI explain the behavior? Bug? Intentional -- if so, why? Can I count on that offset? Even after a 32-bit count rollover? (Some tests may run long enough for this to occur).
-Kevin P.
I've set up a hw-timed DO task to continuously generate a short digital pattern (less than 100 states). After starting the DO task but before starting the sampling clock, the DAQmx property "TotalSampPerChannelGenerated" returns the value 2047. After I start the sampling clock, it seems to increment properly, even if the sampling clock task is re-started multiple times to generate multiple sequences of hw-timed DO.
I've tried generating the sample clock both as a Counter / Timer finite pulse train and as a finite-sampling AO task and observed the same result. I also upgraded from DAQmx 7.4 to 8.0 but again, the behavior didn't change. I tried making the DO task a finite-sampling task, but the behavior was worse -- the initial offset was a different non-zero number which did not increment as the sample clock ran.
Here's the app: I have a master list of all the DO patterns to be generated. For any given run of the overall app, I may start from any index in this master list, and then traverse them incrementally either forward or backward. Meanwhile, I'm also capturing DI bits off the trailing edge of the same sampling clock. The app needs to verify that the DI pattern is always "correct" for the given DO pattern. To do this, I planned to keep track of the starting index and direction and then use the "TotalSampPerChannelGenerated" to let me look up the corresponding DO pattern in my master list.
Trouble is, can I trust the "TotalSampPerChannelGenerated" property? If I could know for sure that it will ALWAYS have an initial offset (such as 2047), fine, I can establish that value at the beginning of the program and subtract it off every time I query. But the fact that it gives me a "goofy" result makes me trust it less. Soooo......
1. Can anyone else confirm this behavior? Does everyone get the same value -- 2047?
2. Can anyone from NI explain the behavior? Bug? Intentional -- if so, why? Can I count on that offset? Even after a 32-bit count rollover? (Some tests may run long enough for this to occur).
-Kevin P.