LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why the counter doesn't restart sampling

 I am using 100 KHZ timebase to feed counter0 as source and use an external 1HZ pulse train as the sampling clock. I am reading the counter value upon each 1HZ pulse arrives.
The counter works fine after the vi start to run. But when I deliberately disconnect the 1HZ pulse train signals and reconnect it during the vi runs, the counter value doesn't refresh any more. The poll loop is still running as its iteration counting is still going. So what's the problem in my vi?
Many thanks for your reply
Please see attached vi. I am using DAQ-CARD 6036E
 
0 Kudos
Message 1 of 5
(3,004 Views)

You should really use the error clusters!  if you wire the error clusters through and strop your loop on error you can find out if a daq error is causing your problems.  There might be a buffer overrun or read timeout.  Sometimes when turning on or off an external timebase during a acquisition causes a high frequency bounce which acts like a  very high freqency clock input.  I would start with error handling and see if your daq task ends and why.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 5
(3,002 Views)
Thanks Paul for your advice.
Now I added all error wires and strobed them but didn't find any error during the sampling pulse off and on process. I also increase the buffer to 10K in case buffer overrun but it also didn't help.
 
So what else I could try?
 
Also, I couldn't use start trigger in this vi as it said it's not supported in this application. Any hint for this? 
 
Thanks
 
Feilong
0 Kudos
Message 3 of 5
(2,995 Views)

newest update about my recent test.

if i don't physically disconnect signal but turning the nob on my signal generator (the one for sampling clock) to change the frequency, the counter works well during these frequency change.

So I wonder what's the difference on the signal the DAQ sees between I turn the nob and disconnect the wires? The only thing I could figure out is high-freq noise when you disconnect wire. But will this cause counter stop working?

 

Feilong

0 Kudos
Message 4 of 5
(2,990 Views)
Hi Feilong,
 
It is not recommended to disconnect the external sample clock midway through the application.  Paul was right that there is high frequency noise when you disconnect the wires and therefore the sample clock for the counter is no longer reliable. 
 
I also searched some other issues that were similar and it looks like you have been working on another thread with a similar application.  Here is the link to that thread.  I related the two issues since you said you were using a 100kHz external signal and a 1 Hz signal.  I am assuming from the other thread that the 1 Hz is the reliable GPS signal and the 100kHz is your unreliable signal and you are trying to compare these two measurements.  It looks like you have responded at a later time to this forum thread and that the application in this thread is no longer what you are looking at with your E series card.  As Samantha recommended, I think that switching to an M series card with Buffered Period Measurements would be your best option.  Please refer to the other thread for links to information about those applications!
Regards,
Vanessa L.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(2,946 Views)