From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop running a programme automatically

Solved!
Go to solution

Hi, I am using Force Pressure Sensors and to develop a code which stops measurement automatically as soon as a data has been acquired. This will be let me know the force of impact I am trying to read of these force-pressure sensors. Has anyone got any ideas? Thanks

0 Kudos
Message 1 of 25
(3,415 Views)

have you looked at the many different functions on the "comparison" pallette wired to the stop?

0 Kudos
Message 2 of 25
(3,412 Views)

No, do you care to tell me more?

0 Kudos
Message 3 of 25
(3,401 Views)

@HEAPO8 wrote:

 

I am using Force Pressure Sensors and to develop a code which stops measurement automatically as soon as a data has been acquired.

 

 

  • "as soon as a data has been acquired."....wire a true bool to the stop within your while loop Smiley Wink
0 Kudos
Message 4 of 25
(3,393 Views)

@apok wrote:
  • .......wire a true bool to the stop within your while loop Smiley Wink

... unless he has no loop and is using "continuous run" mode. 😄

 

We probably need to see some code to give a definite answer. A finished program should never "Stop". Use a proper state machine architecture and go from the measurement state to the idle state (or analysis state, or whatever). The code should only stop if the user closes the program.

0 Kudos
Message 5 of 25
(3,380 Views)

@altenbach wrote:
 

... unless he has no loop and is using "continuous run" mode. 😄

 

 

I've seen this before,  and then use the abort to stop.... Smiley LOL

0 Kudos
Message 6 of 25
(3,377 Views)

I have my programme attached to this message. What I want to do is stop the data acquisition  as soon as a data has been acquired. I am using force-pressure sensors on a footmat and I the data is going into an intensity graph. As I want to jump on this footmat and then see the instant results on the intensity graph ( you have seen this code before)  I am sure I already have a true bool on the stop button- i may be wrong though! Any suggestions? (and again thanks for your help guys!)

0 Kudos
Message 7 of 25
(3,325 Views)

How do you know when the data has been acquired? How many iterations does it take?

0 Kudos
Message 8 of 25
(3,313 Views)

well, when i apply a force on the pressure sensors, the voltage will increase (from 0 to a maximum of 5V). My aim is to stop data acquisition as soon as the force sensors detect a change in voltage. That way the intensity graph can take a snap shot at the exact instance of contact of the pressure sensor

0 Kudos
Message 9 of 25
(3,310 Views)

So measure the condition and wire the result to the stop terminal. I don't see the problem you are having.

0 Kudos
Message 10 of 25
(3,302 Views)