Ducc Posted September 10, 2004 Report Share Posted September 10, 2004 Hey, I'm not really sure how to even search for this, so I'll have to ask you. I have a button that tells some equipment to start taking measurements. When the measurements have been taken, the program reads the info from the equipment, parses it, and sends it to an array. But sometimes we click the wrong button. And when we do, we curse. So I want to include a Cancel button that will ignore the data that comes from the machine. My problem is, it reads the value before it lets me click the button. It won't even register that the button was clicked until the equipment is finished. LabView is so linear, I guess my question is "how do I do two things at once?". Thanks -James Quote Link to comment
aledain Posted September 14, 2004 Report Share Posted September 14, 2004 Wow! LabVIEW is not linear at all!! The reason that the buttons do not respond is that they are in the same while loop as your communications. (LabVIEW reads the state of the buttons just once per loop iteration, turn the globe on to see what I mean), so the buttons don't get re-read until the next iteration of the while loop. Move your communications into a separate while loop and then your GUI will respond in a more timely fashion. However, this does not solve your problem really, in that once the communication starts, your program needs to be able to interrupt it, so you'll need to do some design work on the comms (e.g. have a flag that is checked routinely at each stage of the communication) to allow the user to push a 'cancel' button and your comms will then abort back to a known state. Quote Link to comment
Ducc Posted September 14, 2004 Author Report Share Posted September 14, 2004 LabVIEW is not linear at all!! Yay! I'm self-taught, so I still have some learning to do. Okay, that sounds good. I'll see if I can't figure this out. Note: I don't need to interrupt it, I can just ignore the output when it finishes (the time doesn't matter so much as the data being overwritten). Thanks. Quote Link to comment
mase Posted November 19, 2004 Report Share Posted November 19, 2004 how do you actually tell the button to do something after it's pressed? I want some values to be read in from multiple controls into an array when the button is pressed, but I don't know how to wire that. Thanks! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.