LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

user press ok before going to next loop

Hi, actually im trying to do a program when its receiving data from serial port. it light up the LED. So i wanna make it like user have to press a button eg. ok before going to next loop. Meaning the LED is be always lighted until user press ok.

0 Kudos
Message 1 of 19
(3,862 Views)

I cleaned up your VI so it's readable then added a simple loop to do what  you want.

 

Continue.png

 

Kelly Bersch
Certified LabVIEW Developer
Kudos are always welcome
0 Kudos
Message 2 of 19
(3,855 Views)

You should add a loop delay so you don't eat up CPU time.

 

 

better continue.png

 

Kelly Bersch
Certified LabVIEW Developer
Kudos are always welcome
0 Kudos
Message 3 of 19
(3,848 Views)

thank you. i got it.

0 Kudos
Message 4 of 19
(3,814 Views)

Make sure the "continue" button is latch action (right-click..mechanical action...latch when released).

 

Personally, I would probably use an event structure instead. Do you really need to configure the serial port with every iteration of the loop? How often do the inputs change? Most of the controls are not even visible, replace them with diagram constants instead.

0 Kudos
Message 5 of 19
(3,811 Views)

but actually i want to make when the led is on then i need to press and when led is off i dont have to press. for your program i have to press for both case.

0 Kudos
Message 6 of 19
(3,803 Views)

Just add a simple case structure

continue.PNG

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 7 of 19
(3,792 Views)

how to instantly off the LED after i press ok? i tried but seems like its lagging. offing each 1 by 1.

0 Kudos
Message 8 of 19
(3,787 Views)

Hello,

 

Changed it for you.

Though I don't think it will make any sense to do this.

When you press the button it will only put the leds off for 200ms.

Because after the iteration the program will measure the leds again, and put it instant on.

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 9 of 19
(3,777 Views)

hi can u take a screenshot? my labview is the older version so im unable to open it. thank you.

0 Kudos
Message 10 of 19
(3,747 Views)