Multipule cases choosen by boolean buttons?

How can i choose multipule cases for one case and only one for another case? FOr the one case i am using the build array function along with the search 1-D array function which works great. But when i want to choose multipule cases at once using the same 4 boolean buttons as when i choose only one case, I can't get more than one button to work. I get the zero case to work but not cases 1,2,3. i tried using individual build arrays and search 1-d arrays, but that doesn't work either. I would appreciate your help, thanx!
Attachments:
MultiTruss2.vi ‏861 KB

If I understand your question correctly, you might want to try using the Boolean Array to Number function then take the results of that to the case statement. You can have a separate case for each number, or you can have a case that handles different numbers (i.e. 2,3).

Similar Messages

  • Numbers into textfield using boolean buttons and case structure?

    Hi!
    I'm very new to these forums, and to LabVIEW in general. I'm currently trying to implement a calculator-ish, but without the operations (+ - * /).
    I have 10 boolean buttons, named 0-9, and with these I want to basically write a sequence of numbers into a textfield. I've managed to solve the problem using an Event structure, but now i'd like to achieve the same result using a Case structure instead. The problem is that I can't identify which button has been pressed, so I can't make the program go to the correct case (0 to 9). Is there any simple solution to this that you guys could help me with? Maybe a property node that's generic for every button? I dont know
    Anyways, I'm attaching a simplified version of what I'm trying to achieve, withouh the code I don't know how to write obviously.
    Thanks for your help in advance!
    /Sebastian
    Solved!
    Go to Solution.
    Attachments:
    help.vi ‏12 KB

    Here is a way to do it: bundle the boolean values into an array, turn that into an 8 bit number and wire that to a case structure with a boolean radix
    Message Edited by jmcbee on 03-31-2009 02:29 PM
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
    Attachments:
    helpMOD.PNG ‏13 KB
    helpMOD 80.vi ‏20 KB

  • How to create a table with strings active by boolean button

    Good morning.
    I have a problem to create a table and did not find any topic in the forum who could help me solve this problem.
    I need to create an alarm table.
    That is, every time an alarm was activated (boolean button), the table will show the time,date and where that alarm occurred.
    For example, when the garage alarm is activated, it will to table:
    Date // Time //  Garage // Presence ON
    And so on, when the alarm is activated the room:
    Date // Time // Room // Presence ON
    If anyone can help, I'd appreciate it enough.
    Thank you.
    Solved!
    Go to Solution.

    Giuliano06 wrote:
    So I can show the alarm, but when the button is not selected, it is sending null value (blank string) for the table through the shift register.
    Also, when I select for example the 2 bedroom, he is moved to another column in the table and not just below the last alarm obtained.
    My VI is attached case someone might have an idea.
    your constantly polling the value to your table, ofcoarse this vi is designed according to the mechanical action of the boolean switch...
    Attachments:
    Sensors table.vi ‏10 KB

  • What is the difference between "System" buttons and boolean buttons?

    I'm writing a VI with an event structure that allows me to push different buttons to control external instruments, but I found two types of buttons worked: "System" buttons and "Boolean" buttons. On the surface, the functionality seems the same: I can write the VI so that either one works, and they work in the same way, but which one is right?
    Here is a little more info on what I'm doing. I have a case structure that has one "timeout" case, which just measures the position of a movable stage. Another case, if a "system"-type button is pressed, moves the stage to an absolute position. Another case activated by a "boolean"-type button moves the stage to the zero point. I could switch these and it would still work, but I don't understand how the buttons are different.
    Also, right now I'm using the "run continuously" function so that the loop just repeats. Is this the right way to do it? I could put everything inside a loop, and make my own stop button for it. Would that be better? Worse? --> I think I found the answer to my own question: run continuously will stop and start the code at each instance, so a while loop will be better because it doesn't start and stop repeatedly. (True?)
    Thanks,
    Karl
    Message Edited by Karl T. on 03-31-2008 05:43 PM

    Karl,
    You never want to design your program to have to use the run continuously button.  It is more for debugging than anything else.  Using a while loop with your own stop button is the preferred method of doing things.
    The System, 3-D, and Classic Booleans all basically work the same.  The appearance is different.  The System buttons look like your OS buttons that you see on all your other programs.  The 3-D were introduced in LV6 and remain standard across different OS's and are not affected by System color changes or System theme changes.  The classics behave similarly to the 3-D, but they are the older controls that existed prior to LV6 and have been kept for legacy's sake.
    There are arguments for using system controls vs. 3-D controls (I don't think most people use the classic controls much anymore).  So, you really have to make a personal decision as to which you prefer to use.  NI pushes the system controls, but you'll notice there is a large number of controls which are not available in the system pallette.  I have made versions that look like system controls, but they do not automatically update for theme or system color changes.

  • Print front panel by clicking on a boolean button

    Hi everyone,
    I need that a user can print the front panel just by clicking on a button in the front panel.
    Apparently I need to use Report generation ==> Easy print VI panel + a boolean button.
    But I have no idea how to make the connections. My code is in a while loop. Where I have to connect the inputs "VI path" or "contents" for example and then how to connect the boolean button ? (I just want to print the front panel)
    (I have seen the manuel help on ni.com but it didn't really help me...)
    Thanks for your help
    Best regards
    Solved!
    Go to Solution.

    You just need to wire a Current VI's path to the Easy print VI panel (VI path input). And that's it. It will print the VI front panel on the default printer.
    If you can't use the event structure just place a case structure and wire your Print button to the selector. First make it print on the default printer with default settings and then start to play with things such as contents.

  • How can i edit a boolean button so it can have three options. instead of two

    i.e. ON and OFF are the default. I want it to have three, ON, OFF, REDUNDANT
    can you help me. asap.
    thanks. rocky

    I'm not sure if I fully understand your question, but I'll give a shot at what I think it is. If you want a button that can be pressed so that its states go from
    "on, off, red., on, off, red." etc. you will have to use a bit of trickery. In this case it is best to use a picture ring to give the controls the image you want and place a boolean button OVER the ring control. Make the boolean control completly transparent, resize it to cover the entire picture ring, and make sure the boolean is ABOVE the ring by using "move to front". You will then have to have a loop checking the boolean button for a press, and then modify the pic ring accordingly and take your "control value" off of the pic ring. I'd suggest finding a work-around if you can, as this is a lot of work to go
    through.

  • How to start AND end a loop using a Boolean Button set to "Switch When Released" operation

    I have a Boolean button set to "Switch When Released" operation. When I press this button (now it's in the On state) I want to run a loop that does something continupously (for now, let's say it displays a simulated sine wave) until I press the button again (now the button is in the Off state) in which case, I want to end the loop. I am wiring my button to the loop condition that's set to "Continue if true" and have a "Wait Until Next ms Multiple" of 200 ms (I tried up to 500 ms). When I run the VI and press the button the first time, I see the sine wave displayed. But when I press the button again, nothing happens. It looks like it does not respond to the user interface. What's happening. What am I doing wrong? I'm using an Event Handler design pattern. I've also tried the Producer/Consumer (Events) design pattern. But I don't imagine the particular design pattern should make a difference. I've attached my code. Thanx.
    Fataneh
    Attachments:
    My_Event_Handler.vi ‏107 KB

    A simple solution would be to harness the timeout event, where you would put your data simulation. No need for parallel loops and local variables.
    The event timeout is starts out as  -1 (infinite) but pressing the start/stop button toggles between a 200ms and an infinite timout whenever it is pressed. Since the evet structure always runs, all other events (e.g. stop) are also serviced.
    Please ask if anything is not clear... Good luck!
    Message Edited by altenbach on 07-13-2005 04:20 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    My_Event_HandlerMOD_CA.vi ‏116 KB

  • Type def boolean button.

    hi, i'm korean.
    my english is it' too bad. that why i'm sorry.
    first i wanna make type def boolean button.
    it's not problem. but make triangle shape.
    happen problem. like that
    red box is notihing. but if i click there, that is change to true or false.
    i don't know how to make flexible area setting.
    plz help me
    GOOD
    Solved!
    Go to Solution.

    Here is one way to do what you are asking: link
    This thread has a VI (post # 12) that uses triangle butons that may be a good start for you.

  • Boolean button changes color briefly when pressed

    Hi, I am using Boolean button as a toggle, so I only want text changes when it is pressed with no changes to button appearance.
    I am able to change the color for On in properties to match the Off color (I am using the Silver palette so normally On is yellow), however when the boolean button is changes to On, there's a brief changes of color still. Is there any way I can get rid of it? 
    In fact some of my buttons blink black while others blink yellow. I have no idea where that is set.
    Thak you very much.
    Solved!
    Go to Solution.

    There are 4 colors for booleans ON and OFF plus going from ON to OFF and going from OFF to ON
    You only see the transition color when you have the Mech latching set to "latch when released"
    Set it to "Latch when pressed" and you will not see the transition colors
    You can set all 4 colors by using the Colors [4] Property
    Colors [4] Property
    Short Name: Colors[4]
    Requires: Base Development System
    Class: Boolean Properties
    To Use: Create a property.
    Array of up to 4 (Foreground Color, Background Color) pairs, where Foreground Color is the foreground color of the Boolean control and Background Color is the background color of the Boolean control. Color pairs include False, True, True to False, and False to True.
    You can set the color of the front panel object by wiring a hexadecimal number with the form RRGGBB or by wiring the color box constant to the property.
    This property is similar to the Colors option on the Appearance page of the Boolean Properties dialog box.
    If the Boolean control has four (Foreground Color, Background Color) pairs for the four states, this property always returns an array of four (Foreground Color, Background Color) pairs when reading. When writing, you can pass in an array of length 1, 2 or 4. If you pass in only one element, this property uses that element value for all four states. If you pass in two elements, this property uses the first element value for the False and True to False states. Similarly, this property uses the second element for the True and False to True states.
    If the Boolean control has only one (Foreground Color, Background Color) pair for all four states, this property returns an array of one (Foreground Color, Background Color) pair when reading, and uses the first array element when writing. You cannot change a Boolean control with one (Foreground Color, Background Color) pair to a Boolean control with multiple (Foreground Color, Background Color) pairs.
    This property only uses the True to False and False to True states when you set the Boolean control to latch or switch when released. You can get and set these (Foreground Color, Background Color) pairs even if you do not have the control set to latch or switch when released; they just are not used.
    Because this property does not change the data of the Boolean control, you can set it at any time.
    You can use the this property for Boolean controls on the Classic, Express, Modern, and Silver palettes. You cannot use this property for Boolean controls on the System palette.
    Omar

  • How to use one boolean button to control many boolean buttons?

    I would like to create a LabView control interface with boolean buttons.
    As my attachment picture shown, there are four boolean buttons.
    The button1 is the main power, if I press ON button1, other three
    buttons also turned to ON at the same time.
    How do I build up the LabView program in the block diagram?
    What should I do???
    Attachments:
    booleans.bmp ‏722 KB

    Controls and indicators function as variables. In a text based language, you could just write the name of the variable again. In LV, since each control only has one terminal, you need local variables to do this. To create a local variable, right click on the control and from the popup menu select Create>>Local Variable. You can have a local as read or write. Create a local for each of the buttons and wire the data coming out of the first button into the locals.
    There is something that is very important to understand here - when you use locals, you can disrupt the dataflow nature of LV and create race conditions. For example - if, after fixing your code, you were to click on one of the buttons, to set it to F, it would immediately be set back to T by the running code. This can be very dangerous. Also, I see you're using the continuous run mode. You should use a loop instead. Try looking for some LV by searching google for "Labview tutorials. Also, here's one you can start with.
    Try to take over the world!

  • When I try to convert my .pdf to Word, I get a sidebar that has fields for: the name of my pdf file, the type of file I want to convert to (In my case, Word), and a button that says "Convert".  My problem is that the "convert to" field isn't active.  I ca

    When I try to convert my .pdf to Word, I get a sidebar that has fields for: the name of my pdf file, the type of file I want to convert to (In my case, Word), and a button that says "Convert".  My problem is that the "convert to" field isn't active.  I can see the words "Microsoft Word" in pale gray, but when I click on the field, nothing happens.

    You have posted in the wrong forum.  Try posting in the forum for the product you are trying to use.
    Here is a link to a page that has links to all Adobe forums... use the drop down list to see all.
    Forum links page:
    https://forums.adobe.com/welcome

  • Two boolean buttons with colors and text?

    HI,
    I need two boolean buttons which will represent a power switch. So one will be ON and one will be OFF, but I need the text to be right on the button and I also want the buttons to switch colors. I have found only one or the other property (text on button or color) but not both on the pallette. Am I just not looking at the right buttons/properties? Please recommend what I should be using. (i.e. when ON is depressed I want it to be green, and OFF to be grey and viceversa)

    Programatically, there are two attribute nodes, one of them is strings, which will accept an array of 4 strings, being the following:
    1-OFF state
    2-ON state
    3-ON to OFF state (when latched or switched until release)
    4-OFF to ON state (when latched or switched until release)
    The other attribute is Colors, which is composed of an array of clusters of two numeric or color constants(controls):
    1-OFF sate foreground and background
    2-ON state foreground and background
    3-ON to OFF state foreground and background (when latched or switched until release)
    4-OFF to ON state foreground and background (when latched or switched until release)
    Hope this helps

  • Problem with boolean buttons

    Hello,
    I am doing a Labview soft, including many data entry.
    For each of these entry, the operator has to validate it by clicking on
    a boolean button.
    These buttons are implemented in while loop.
    But often, I have to click many times on the button to validate the and
    to display the next step.
    Does anyone can explain me how to do to have to click only once on the
    button ?
    Thank you for your responses,
    Bertrand.
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    Try putting a 100 ms delay in your loop. If the loop is executing at full
    speed, you are competing with the O/S for CPU time.
    Ken Trudgeon
    wrote in message
    news:8jb0ah$r45$[email protected]..
    > Hello,
    >
    > I am doing a Labview soft, including many data entry.
    > For each of these entry, the operator has to validate it by clicking on
    > a boolean button.
    > These buttons are implemented in while loop.
    > But often, I have to click many times on the button to validate the and
    > to display the next step.
    > Does anyone can explain me how to do to have to click only once on the
    > button ?
    >
    > Thank you for your responses,
    >
    > Bertrand.
    >
    >
    > Sent via Deja.com http://www.deja.com/
    > Before you buy.

  • LabVIEW 2012 SP1, Can't get correct mechanical action on boolean buttons

    I am trying to use boolean buttons and events to programatically change the properties of a graph.  I basically want to click a button on the FP, and have the graph change the desired property.  All the property changing is fine, but I am really struggling with the mechanical action of the buttons.
    I'll preface this by apologizing that I cannot post my code, as the computers with LV installed are isolated. My code is basically OK buttons, a while loop, and an event structure with a value change event for each button.
    I want the user to click and release the button. After the click and release, I want the button to be in the same state it started, and I want the value change event to only trigger once.  Sounds to me like I want the Latch When Released mechanical action.  The problem is that this isn't working.  I cannot create buttons that behave like this.  None of the 6 mechanical actions exhibit the desired behavior.
    To make matters worse, I have two OK buttons both set to Latch when released.  Both buttons are True before the click. One button behaves as intended (button is true again after the click and release) and the other button doesn't switch back.  I tried to copy the correctly working button, but still the copied button does not work the same as the original.  Both buttons fire a single value change event, dispite behaving differently.
    To answer the question "Where did I get the working button from?"  A while back I made a simple button test vi that tested all 6 of the mechanical actions and kept track of how many times they fired a value change event for a single click.  My buttons worked when I made this vi...eventually, i remember having trouble with this back then too.  The results of that trouble had me using switch until released buttons with mouse down events for a long time, until I got the button test VI working properly and learned how buttons actually work. But now buttons are being funny again.  I tried to copy working Latch when released button into my current program, but for some reason only one of the two copied buttons work as intended, despite them being copies of the same button.
    Is there some bug in LV2012 SP1 (64 bit) where mechanical actions don't work consistently?  Am I just being dumb?  I'm sorry I can't post the code.  I have this issue on both Windows 7 and Linux.
    A bit more info, as I wanted to make sure I tried eveyrthing before posting.  I tried to make a new button test VI.  The old one still works, but I cannot get the buttons in the new button test vi to behave the same as in the old one I made.  In the new one, Latch when pressed behaves the same as switch when pressed, and latch when relased behaves the same as switch when released.  Switch until released and latch until released behave slightly differently.  They both fire two value change events, but SuR actually switches twice (there and back again), where LuR just switches state once but still fires two value change events anyway.  I have checked to make sure the mechanical actions are set properly at least a dozen times.
    Pretty confused over here.  My old button test vi works as I expect it to, and the Latch when released button works like I want, but I can't for the life of me reproduce it.

    To Bob_Schor
    I realize the folly of mouse down events, and I'm trying to move away from them.  I originally started using them because I couldn't get the desired button behavior out of value change events and any other mechanical action.
    I use LabVIEW 64 bit because I was hitting the RAM limits with the 32 bit version.  I hit the limit when I try to plot a great deal of data in 3D, which I do fairly often. I get away with this because I don't interface with any equipment or use any of the specialized modules, but maybe I should consider only using 64 when it's absolutely necesary and get 32 bit on there as well.  But I have the same issue on Linux, which only has a 32 bit labview version (still 2012 SP1)
    There is only one event structure in the program.  I have two buttons because I'm just using them to fire two separate events.  My current situation is that I am plotting 9 plots on a single graph.  One of these buttons is a "check all" button for the visibility check boxes.  I click the check all button, and all 9 plots become visible.  The other button is an "Uncheck all" button, which does the opposite.
    That's for my current program.  I also have a button test vi which has 6 boolean buttons, each set to a different mechanical action.  A single event stucture in a while loop has a value change event for each button.  I made this so that I could see for myself how the buttons worked (i.e. I see that the switch when released mechanical action produced two value change events.).  I have an old version of this program which works as I expect it to.  This morning I tried to remake it (it's very simple) and it does not behave the same, despite the block diagram being pretty much identical.  I described the differences in the OP.
    I can reporduce the behavior on a second computer that is restricted.  Which is 32 bit labview for Linux. I don't have an unrestricted machine with LabVIEW installed.  If I did, I would have tried to rebuild my button test VI  (again) to see if it works.
    At it's most basic, create an OK button on the FP and set in the True state.  It defaults to the Latch when released mechanical action.  Throw an event structure in a while loop.  Give the ES a value change event for the button.  In this even just increment some counter to indicate how many times the value change has been triggered.  I did this using a shift register.  Run it.  For me, when I click the Latch when released button it fires one value change event and doesn't reset to true when after the click.  I can change the mechanical action of the button, and none of the 6 give me what I want.
    So my issue just boils down to Latch when released not behaving properly.
    In my original button test vi (which was this with 5 more buttons and 5 more value change events in the ES), the latch when released button DOES reset to true after my click.  Copy and pasting this button creates a new button which does not behave the same way, despite still being set to latch when released.
    My problem is not so much with the events, but the behavior of the button.  Am I correct that Latch when released is what I want?  A single click, and the button fires one VC event and returns to the same state before the click?

  • How to manipulate arrays using case statements and boolean conditions?

    In the vi that is attached I am trying to compare two values in two different arrays and delete the value that is equal to zero.  The values of each array are rounded to the closest integer.  Then I attempted to apply the ">0" boolean as the condition for my case statement, but I am getting an error.  Any tips on manipulating arrays with case statements?
    Attachments:
    Patient Movement Monitoring.vi ‏141 KB

    Thank you!!! that was a huge help. I don't think I need the case structures at all.  The next part of the code compares the 4 values in the array. 
    If columns 0 and 1 are both positive -> output 1
    If column 0 is negative and 1 is positive -> output 2
    If columns 0 and 1 are both negative -> output 3
    If column 0 is positive and 1 is negative -> output 4
    (0 is x-axis value, 1 is y-axis value.....outputs are assigning quadrants to the combination)
    Only one of the "AND" booleans will return true for each index.  Is there a way to initialize another array of outputs 1-4 depending on which AND returns true?
    Attachments:
    Patient Movement Monitoring.vi ‏144 KB

Maybe you are looking for