06-28-2015 01:22 AM
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..
Solved! Go to Solution.
06-28-2015 01:46 AM - edited 06-28-2015 01:50 AM
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
06-28-2015 01:50 AM - edited 06-28-2015 01:53 AM
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.
06-28-2015 02:07 AM
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
06-28-2015 02:23 AM
hi thakurshubh,
please start new query in new thread, please refer point 3 here
Thank you.
06-28-2015 02:24 AM
@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)?
06-28-2015 12:38 PM
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????
06-28-2015 12:51 PM
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?
06-28-2015 01:29 PM
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
06-28-2015 01:31 PM
sir here is d attachment for previous doubt