01-11-2011 02:34 PM - edited 01-11-2011 02:37 PM
Greeting fellow labVIEW users
Please refer to the attachement. I want 2 separate On and Off buttons to control the same case structure if possible. Essentially I want the VI to do the following
Thanks for all the help
mhaque
01-11-2011 02:43 PM
If I understand you correctly you can use something like this. Make a case for 0,1,2,3.
01-11-2011 02:52 PM
Nope does no work since it does not bypass the On button and the On button has to stay on before the program is run.
Thanks for your help regardless.
Mhaque
01-11-2011 03:03 PM
@mhaque wrote:
Nope does no work since it does not bypass the On button and the On button has to stay on before the program is run.
See, now you are changing specifications. Please provide a complete truth table.
There are 3 buttons, two have latch action, only one button is switch action.
What are the states at program start?
What should happen for all the following conditions (1: "On", 2: "Off", 3: "Cancel"):
01-12-2011 11:35 AM
I am very new to LabVIEW.
Actually, I am currently taking an introductory class.
I am wanting to do a switch circuit somewhat like the one being discussed here.
I want to have 4 buttons, but only one can be on at a time.
Button 1 ON, all others OFF
Button 2 ON, all others OFF
Button 3 ON, all others OFF
Button 4 ON, all others OFF
For example if button 3 is ON and you push button 2.
Button 3 is automatically turned OFF as button 2 is turned ON.
How would I go about doing such. There must be several ways to acomplish this.
01-12-2011 11:47 AM
01-12-2011 05:09 PM
Hello mhaque,
Can you elaborate more on what you would like to have done? Are the states as altenbach wrote?
Ricky V.
01-12-2011 07:45 PM
I Searched the internet and found the answer.
It was bizarrely easy.
I just wanted a radio button with 4 buttons.
The palette comes with just 2 buttons.
I just had to open up the buttons palette and drag more over to the radio button and then I had a 4 button radio button.
Like I said, I am just getting started so the simplest of tasks can be difficult.
Especially when the NI help menu doesn't explain how to do what I just described.:smileyvery-happy.:smileyvery-happy.
01-12-2011 07:50 PM
To smg:
That's probably because you fail to take instruction properly. 😉
01-13-2011 11:43 AM
OK the problem for 1 is that the Off is inside a False case based on the On button - so it won't be read unless the On button is not active.
The best bet I can give you is to look at event structures if you can. That way you can react to each situation.
Otherwise, check the Off button before the On button (so if Off it True send the value for off out otherwise if On is True do whatever it currently does) but you will need a default command to write. (Restructuring the architecture to have the VISA write/read in a subVI and calling it from within the cases would be a better option, but I'm not going into the details for that)
As for 2, put a case outside using the application VIs, and put an OR inside the loop before the conditional terminal.
Coming back to the structure - readability would be a lot easier (and it would probably be a more accurate behaviour) if you did the string manipulation and looked at the conditional terminal at the other end of the loop (so you read the string back, and manipulate it then). The shift registers to allow this functionality is really not needed.