LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

the stop button is not responding when i needed to stop a program

Solved!
Go to solution

i want my program of labview to stop when i press stop button but it is not happening....stop button is not working....i have used one while loop in which there are event structure n some case structures.....i have attached my file...so plz help me..

0 Kudos
Message 1 of 22
(4,705 Views)
Solution
Accepted by topic author thakurshubh

Hi,

 

In your code, this can be done using new event on "Stop button" when it press it will give a true value  

 

like this

 

screen.png

-
Amit
CLAD
Message 2 of 22
(4,686 Views)
Solution
Accepted by topic author thakurshubh

Since the loop only spins if an event occurs, you need to create an event case for "stop...value changed". Place the stop terminla inside it and wire to the loop termination terminal. (Also change the mechanical action of the stop button to lach when released).

 

Personally, I would also recommend to change all your buttons to latch action and place them inside their respective event case and use value change events. You current "switch until released" mechanical action combine with "mouse down" event is a bit unusual.

Message 3 of 22
(4,681 Views)

ohk thanx i will try this solution n den will tell u whether it is working or not................. now i have one more query n dat is i wanna ask how to reduce elapsed time in d same file which i have attached in previous case.... actually it is showing approx. 1;2 sec of elapsed tym n i want this elapsed tym in milliseconds..... consider same attachment file.... thnku

0 Kudos
Message 4 of 22
(4,661 Views)

hi thakurshubh,

 

please start new query in new thread, please refer point 3 here

 

Thank you.

-
Amit
CLAD
0 Kudos
Message 5 of 22
(4,638 Views)

@thakurshubh wrote:

ohk thanx i will try this solution n den will tell u whether it is working or not................. now i have one more query n dat is i wanna ask how to reduce elapsed time in d same file which i have attached in previous case.... actually it is showing approx. 1;2 sec of elapsed tym n i want this elapsed tym in milliseconds..... consider same attachment file.... thnku


All you have are short time delays that execute in parallel to the rest of the code in each event case. Where is it showing any elapsed time? Where do you get 1;2 sec (whatever that means)?

0 Kudos
Message 6 of 22
(4,636 Views)

actually i want dat in d program both read and write operation gets finish within 10 milliseconds but it is taking longer tym about 1-2 secnds.....so i m not getting solution for reducing elapsed tym...... so can u plz tell me d solution for reducing elapsed tym????

0 Kudos
Message 7 of 22
(4,387 Views)
Solution
Accepted by topic author thakurshubh

Well, the code itself is lightning fast, so you need to find out what causes the delays. My guess it is the instrument on the other side. Does it respond? What are the communication settings?

 

  • How do you measure the time delay?
  • What is the purpose of the short delays inside all the event cases? They seem pretty useless.
  • Why do you form the string in such a complicated way? Wouldn't it be sufficient to use a string diagram constant set to hex display in each event case?
  • Why is there a timeout case if you are not using it?
0 Kudos
Message 8 of 22
(4,380 Views)

umm....ohk i will make dese changes in dat protocol.... but now sir i m sending u anoder protocol in which both read and write buffers are used.in dis protocol i want d transmit n response operation to complete within 10 milliseconds so dat i can test dis on some oder hardware..but the trasmit n response operation is taking 1-2 secnds which is too much..so plz tell me to reduce tym in d protocol which i have attached below.....thnku sir 

0 Kudos
Message 9 of 22
(4,357 Views)

sir here is d attachment for previous doubt

0 Kudos
Message 10 of 22
(4,345 Views)