10-01-2019 08:14 PM - edited 10-01-2019 08:17 PM
I am using pulse train generation vi with my NI-6363 Multi-function USB board in my test stand sequence. I need to iterate through all the available 16 PFI channels one at a time. Simultaneous pulse is not desired! I have 4 counter available. What I see is counter does not reset so in each iteration when I start pulse it still generates pulses on the previous channels I already used. Once all the sequence is done, on the next fresh sequence run I end up having all the PFI lines active once I create the counter task using the default VI below.
Any idea on how to reset the counter and flush all the PFI channels it adds to task internally.
Close and Clear tasks apparently does not do it. Otherwise I would need to power cycle the NI board in between each iteration or use a MUX which is not intended.
The example VI comes with the LabVIEW in the link below is in the attachment.
C:\Program Files\National Instruments\LabVIEW 2016\examples\DAQmx\Counter Output\Counter - Continuous Output.vi
Solved! Go to Solution.
10-01-2019 09:42 PM
The workaround I implemented was using a dummy frequency read task using clocks after the pulse generation to reset the counter. I am now able to generate and iterate through all the PFI channels one at a time over and over again but there gotta be a better way?
10-01-2019 09:44 PM
So you're re-running the example file (exactly as attached) whilst changing "Output Terminal" and seeing that previously selected Output Terminals are still in use, in addition to the currently selected one?
Just to check simple things:
10-01-2019 09:49 PM
Yes exactly.
I am not aborting the VI.
Each test is a separate click of the run arrow.
Generation stops correctly when you stop the VI. Yes it resumes in the next run.
10-08-2019 09:35 PM
This is a known issue feature characteristic of signal routing on many DAQ devices. You'll find more info by searching for "lazy uncommit". Generally, you need to do some kind of workaround. You seem to have found one that works, but be sure to test it out well to make sure it's reliable.
-Kevin P