LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

meaure period vi

I am using measure period vi. Sometimes the measure period would "hang". The program would not go to the next level. How do I "time out" the measure period vi or make the measure period skip the "hang" measurement or retry to take a new measurement rather than "hang".
0 Kudos
Message 1 of 12
(3,942 Views)
My measured period circuit is powered by a 6V battery. One end of the output is connected to the required pin on a 6025E daq. The other end of the output is connected to the negative of the battery and the digital ground of the DAQ. Could this be causing the "hang"? Since my circuit is powered by a battery, is it considered a floating power supply although the negative of the battery is connected to the DGND of the DAQ?
0 Kudos
Message 2 of 12
(3,938 Views)
Anyone knows how to time out the measure period vi which sometimes "hang".?
0 Kudos
Message 3 of 12
(3,926 Views)
Anyone?
0 Kudos
Message 4 of 12
(3,920 Views)

Hello!

 


Don’t worry, were here to help.  Rest assured we do our best to make sure every post has a good response.  Whether we post it or double check information provided by other community members we read nearly all discussion forum posts.  Additionally for better support from the community make sure you post your question to the appropriate board.  In this case, you appear to be doing some data acquisition.  To open your question to a larger community of DAQ users you might also consider posting your question in the Counter/Timer board.

 


That being said, I found about 3 or 4 examples of “Measure Period VI” in our example finder.  It might help if you clarify which exact example you are referring to in this case.  If you are using the “Measure Pulse-Width or Period” VI that appears in the Data Acquistion->Counter palette, there is an optional input at the top of the VI titled “time limit” – from the help of the VI:

 


time limit is the period to wait for a valid measurement. If time limit is -1.0 (default), the time limit is set to five s or four times the range of the counter at the selected timebase (4*16,777,216/timebase) for the DAQ-STC, whichever is larger.”

 


If you are not using this VI and have a more general question, you will have to probably make a programming decision somewhere in your code as to whether you want to continue waiting or break from some sub VI.  The first think you’ll need to know is which exact sub-VI is ‘stalled’.  Have you enabled “highlight execution” in LabVIEW while viewing the block diagram to see what VI is ‘hung’?  To enable highlight execution click on the “light bulb” at the top of the menu bar.

 


As mentioned before – were happy to help!  Please let us know if you can provide us with any additional information on the problem.

Travis M
LabVIEW R&D
National Instruments
Message 5 of 12
(3,910 Views)
I have attached the vi concerned. I am using labVIEW 6.0. Although it is supposed to timeout in 4*16,777,216/100 0000 = 0.8 seconds, it hang's forever and ever, at least more then 10 minutes. I am measuring frequency between 1 and 100 Hz. I get some invalid readings. Is there a way to set the VI to ignore invalid readings and try again until a valid reading is obtained?
0 Kudos
Message 6 of 12
(3,896 Views)

Uh, you might want to check your calculator to see if it's battery is low.Smiley Wink You are off by about a factor of 100.

Even if your math was correct, the timeout is the larger of the two numbers as mentioned above so you would have at least a 5 sec timeout.

Message 7 of 12
(3,888 Views)
Actually I have never experienced timeout in labVIEW.
0 Kudos
Message 8 of 12
(3,873 Views)
Anyone about skipping a step in the measure period.vi to prevent the program from hanging?
0 Kudos
Message 9 of 12
(3,862 Views)
On the harware side, I suspect the measure period.vi detects the rising edge but waits for ever to detect the next rising edge. This causes the hanging. If this is the cause can it be rectified by wiring a 5 second time out? The vi does start measuring the period feor sometime before hanging. Could it be that it is unable to pass on the data due to excessive data being sent?
0 Kudos
Message 10 of 12
(3,840 Views)