Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Random roll over with CO Pulse Ticks

I'm using the 6036E with a random signal (linear encoder) to measure ticks and trigger analog samples.  I have it setup to count 2 rising/falling edges and have the analog input trigger off of the counter's output.
The counter is setup for the count pulses.  The input is coming in on PFI0.  The internal output of counter0 is being used for the analog acquisition.
This works fine except randomly the counter quits working properly.  I setup a while look to look at the counter value which should go between 0-1 in this case (or 0-xxx) when I set the count its counting to a larger # than 2.  This seems to work for some random period of time.  After this, the counter value gets reset to some absurdly large value and hence quits generating pulses.
Has anyone experienced this, and if so what was the solution?

Thanks,
Michael
0 Kudos
Message 1 of 4
(3,703 Views)
Michael,

Are you using Traditional NI-DAQ (Legacy), or NI-DAQmx? How is it that you are reading the value of the counter? There are certain situations where a read could read off invalid data from one of the counter's secondary registers without disrupting the actual count used in the pulse generation, but these are very rare. It sounds like you are trying to perform continuous pulse train generation, with 2 high ticks and 2 low ticks of your source on PFI0. Is that correct? If so, could you try out the DAQmx shipping example called "Gen Dig Pulse Train-Continuous.vi", available in the LabVIEW Example Finder (Help->Find Examples). In order to use "ticks" instead of specifying a desired frequency, you will have to change the "DAQmx Create Channel" polymorphic instance to "Ticks." Also, to set the source input to PFI0, you will need to set the "Source of Ticks" in the same VI. Please post back if you have any questions, or if I misunderstood your problem.

Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 2 of 4
(3,691 Views)
I was using a while loop and a property node to read counter output-> count
I tried the same thing using a different PXI based daq card and it worked without any issues.
I'm not sure if its a limitation of the PCI DAQ I'm using, a bug in the asic, or a bad card.
0 Kudos
Message 3 of 4
(3,687 Views)
Michael,

Do the other coutner operations behave as expected? Are you able to generate a finite or continuous pulse train without any problems? I'm still not entire sure what type of task you are using to accomplish this. Perhaps if you post your code I could have a look and possibly recommend another way to do the same thing. If the same code is behaving differently on another identical card, however, then perhaps this device is in need of repair.

Regards,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 4 of 4
(3,668 Views)