03-12-2018 11:00 AM
Hello, everyone, I would like to make two toggle switches, one is TO static ON/OFF, another is TT static ON/TT dynamic ON, both switches is selected at switch when pressed. I make the condition is that one can control another toggle switch which is when turning TO static ON, TT static will also ON, when turning TO static OFF, TT dynamic will on. Vice versa (when turn TT static ON, TO static will be ON, when turn to TT dynamic, TT static will OFF). However, I would like to make a pop-up message when I make TO static OFF (or make TT dynamic ON) to let me confirm the action. Attached is the test VI. Thanks for the help.
Xiao
03-12-2018 11:30 AM - edited 03-12-2018 11:38 AM
First thing: eliminate you race conditions by getting rid of the local variables.
(Will have a look at the rest later. My head spins trying to read your description)
"Something" OR "NOT something" OR "something else" is always TRUE, right?
03-12-2018 11:42 AM
Hard to explain, run the code you will understand. When it's running, the two case structure is always false. If I put the dialog pop-up inside it, it won't disappear when I click OK or Cancel, I want to have switch when pressed mechanism, but I do not want to insert the stop 2 button. Thank you, dude.
03-12-2018 02:40 PM
I don't understand what you are trying to do here.
Explain what the end game is, that is what is this part of the program really going to do in your main program, not just change a control and pop-up a dialog.
03-12-2018 03:07 PM
Sorry, the main loop is way complicated to explain here, it's just a control of three data collection mode, I managed to do that with a shift register to check the value of the previous iteration and current value, if previous value is true and current value is false, then pop-up the message, if not, no action. Thank you.
03-13-2018 07:44 AM
Look up "event structure" in the examples, it might help. Also, if you OR a value and the negated version of that value, the output is always going to be True.