Enum to control VI's

I have 4 small but different VI programs on the same BLOCK diagram. Is it possible to control from the ENUM in the PANEL to execute only ONE VI? Or If I press the ON button the VI's will run one after another. I just want to run one vi at any one time.

Look at this:
The shift register keeps the value from the last iteration. In each iteration the value of the enum is compared to the last value, and when it changes, the True case executes. The same can be done by using the small OpenG VI shown here (along with its code). Because that VI was made reentrant, you can place it on any wire you like and it will tell you if the value of the wire changed since the last time it was read.
As a suggestion, you may wish to avoid using the green edge for the case structure. That is usually used for error handling and can be confusing.
Try to take over the world!
Attachments:
Enum.gif ‏15 KB

Similar Messages

  • Int to enum type loookup

    I am iterating in a while loop and using the index terminal to build an array of differnet values of the same enumerated type control that are from a strict type def enumerated control. What I want to do is to iterate and do a comparison and if the comparison holds, I want to build an array of the correlating enumerated types so that I can use this later on.
    I am using a Function that came with the state diagram toolkit called "int to enum" that the state diagram uses when calculating its next state info. It seems to bomb out when I attempt to wire my enum type control to its input.
    Any ideas?

    I have not used the state diagram toolkit but have extensively employed enums from typedefs. This is very convenient since for comparisons just compare it to a constant version of the typedefs. If you use a strict typedef remember that almost everything must be identical and this causes many problems. Since typedefs of enums rarely have to be strict I would think about why you chose a strict type def as opposed to a normal typedef. One additional added feature is that when wiring a enum typedef to a case structure you can populate the case with the enum named cases. I would speculate that your problems are due to the use of a strict typedef which is only necessary when you are concerned with more than just a typdef's structure and values (i.e aesthetic properties). Hope this helps (again I have not used the state diagram toolkit).
    -Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • How can I programaticaly replace an Enum with an other inside a cluster

    Hello,
    In my programm, I'm using a Queued-State-Machine architecture to pass Datas (in variant) between main VI states and SubVIs states. I'm using 3 types of tests (where my sequence of axis motion is a bit different). These 3 types of tests have their own Enum to control some process (Enums don't have the same items). The Enum is placed in cluster named "Type & # Fonctions" which is itself placed in the main control (see MainControl picture). This main control is in a shift register, in a while loop.
    My idea would be to replace the Enum (e.g. replace "Enum Type 1" with "Enum Type 3") . The limitation is that some Bundle functions and Variant to data function, wait to have exactly the same data type (same Enum Items), and I just want to unbundle the "Type & # Fonctions" cluster from my main control to have the correct Enum (see BD picture).
    An alternative solution shoud be to have 3 controls with their own Enum (ex.: Main control Type 1.ctl - Main control Type 2.ctl - etc), and select the correspondant Main Control in accordance with my test; but I want to reduce the number of controls, so that the programm could be as autonomous as possible.
    Therefore, I would know if there is a way to programaticaly replace the Enum in my Main (cluster) control..?
    Best regards
    Fred
    Solved!
    Go to Solution.
    Attachments:
    TypeDef MainControl.png ‏52 KB
    BD SubVI 1.png ‏39 KB

    Why can't you just use one enum with all the states in it? Since you are using a queued state machine, you can queue up only the states you want based on which mode you are in. Maybe I'm misunderstanding what you are trying to do.
    CLA, LabVIEW Versions 2010-2013

  • Can strictly type refnum control do type coercion?

    Hi all,
    Can strictly type refnum control do type coercion? NI says yes:
    A control refnum terminal that is strictly typed can only accept control references that are strictly typed to a compatible type. For example, if a subVI expects a control refnum of type Slide(Int32), you can wire a control reference of type Slide(Int32), Slide(Int8), or Slide(DBL), but not of type Slide(Cluster of DBLs). Wiring in the Slide(Int8) or Slide(DBL) will result in type coercion (no error) and thus a coercion dot as these representations are being coerced to Int32. Wiring the Slide(Cluster of DBLs) will result in a type conflict (error) and thus a broken wire. This is because the Int8 and DBL are numerics like the Int32 and can thus be coerced to be of Int32 representation. The Cluster of DBLs however, is not a numeric, but a totally different data type. Therefore, a cluster being of different data type than the numeric will result in a type conflict if wired together. Strictly typed references are most beneficial when you know exactly what type of data you will be using.
    http://zone.ni.com/devzone/cda/tut/p/id/3159
    I have seen this help file for long time, and been confused by it for long time. I don't think strictly type refnum control can do type coercion. If I put a U8 Enum refnum control on subvi's front panel, I can't connect it with a U16 Enum refnum control.
    I don't know if I am right. 

    What is an "enum refum control"? Can you attach a small VI containing the various controls?
    steady wrote:
    Besides, I don't know what Slide(Cluster of DBLs) is. I can't generate such data type.
    A slide control with multiple sliders is a cluster datatype. One cluster element per slider.
    Just place a slide, right-click it...add slider. Voila!
    LabVIEW Champion . Do more with less code and in less time .

  • Tab control customization

    Hi,
         How to customize the Tab control in such a way that,the place where we are writing the tab name should be in one colour and body of the Tab control in another colour.See the picture.That is the colour below the black line should be one colour and above should be another colour.Is that possible??
    Thanks as kudos only
    Solved!
    Go to Solution.

    Hide the Tabs - under Visible Items.
    Create an Enum / Ring control with the Tab Names then wire the Enum to the Tab Node. Changing the Enum changes the visible tab.
    Visualize the Solution
    CLA
    LabVIEW, LabVIEW FPGA
    Attachments:
    Tab Control.vi ‏8 KB

  • How to make my applicatio​n programmat​ically switch between English and Russian

    Greetings from Colorado...
    My application needs to be switchable between English and Russian.  Future languages to add are Spanish and Chinese.  The user selects a language
    from a control before starting the program and then the program changes the Captions, Boolean Texts, Graph Labels, and Enum Type Strings to the
    chosen language.  For Russian, this requires a different set of characters.  I have made substantial progress by:
    Control Panels>Region and Language>Keyboards and Languages>Change Keyboards added Russian>Keyboard>Russian on my development
    computer.
    In the LabVIEW.ini file, I added UseUnicode=TRUE (thanks to a suggestion found in this forum)
    Made property nodes for controls and used properties such as Interpret As Unicode (True for Russian, False for English), Text, Font Name, Font Size, etc.
    I have used fonts Arial and Arial CYR for Russian and MS Sans Serif for English
    Set the keyboard for Russian and enter Cyrillic characters into text constants that are set for Arial or Arial CYR font.  Sometimes one works and
    sometimes the other works.  As long as I set the font name in the property node the same way the text went into the text constant, it generally
    works.  I wish I could understand why one works sometimes and the other works other times!
    I have had trouble with the Boolean Text going off-center when changing fonts and languages and it seems that by setting the Lock Text In Center
    property to False and then True again, it seems to work.  Often changing Boolean texts between short and long texts causes some of the long text
    to be non-displayed; I have remedied this by explicitly setting the width of the Boolean text in a property node.
    Often, the Russian text appears as gibberish with strange right-angle characters, :s, =s, and tiny numbers.  I have been able to remedy this on my
    development computer by ensuring that the text constant on the block diagram has the same size as the caption is supposed to have.  This
    is not necessary for normal programming in English, but it seems to help here.  But it doesn't always solve the problem.
    Sometimes the English text appears as Chinese gibberish in an Enum Type selection list or in a graph label.  On my development computer,
    it seems that making the text the last property to change helps here.
    By changing the sequences of assignments to a single property node with a long list of properties, I have been able to make some of these
    controls to switch between languages without gibberish showing up.
    A few hours ago, I had the Russian strings in the Enum Type control working, except that when selecting from the available items, only the first
    word of the Russian string was displayed.  Two of the items start with the same word, so the user can't distinguish them.  
    At that time the English strings were appearing as Chinese gibberish while the list during the selection process displayed in English.  As soon
    as I changed the selection, future attempts to change the selection gave Chinese gibberish during the selection process, too.  But this was only
    a problem in the executable version; the source-code version worked fine.
    In an attempt to get rid of the Chinese gibberish, I made new constants and retyped the items into them.  This worked!  But then, the Russian
    stopped working and gave gibberish angles and tiny numbers, even though I didn't touch any of the code that sets the properties in Russian mode.
    After trying a few sequences of setting the properties for the graph X label on page 2 of my tab control, this label started working correctly for both
    languages.  But the text of that label comes through on page 1 of the tab control, partly obscured by other controls on that page.  After the
    program runs a few more seconds, these shadows disappear.
    Most times I restart LabVIEW, I get an error message saying there was a crash due to fontmgr.cpp, line 7494.  But there actually wasn't a crash.
    My computer has Windows 7 64-bit.  Deployment Computer has Windows 7 32-bit.  LabVIEW version is 8.5.  
    I have probably 50 or 100 more controls and indicators to change to language programmability and figuring out all this stuff for each one is
    terribly time-consuming and there is no assurance that all of them will ever work.  
    At this point, I'm hoping that I am on an entirely wrong path and someone will send me a clue to get me on a path that is more predictable.
    Thanks in advance to all who post ideas!
    Cheers
    Halden 

    Hi All,
    I've made a lot of progress on this translation, but it's been really hard.  There are lots of weird things going on that must be logical because they're in a computer, but I can't figure out what the logic is.  When changing a font on a caption using the front panel, it sometimes changes the font on the caption and sometimes doesn't although the indicator always indicates the new font.  Removing the first character of the unicode font string being sent to the caption seems to help...huh?  Anyway, tabs still can't change language programmatically, and niether can ring controls (some kinds will take the new list of strings, but when selecting, they only display the first word of the string!).  Boolean text can be reprogrammed, but only if the boolean text is set to be the same for both true and false states.  When reprogramming captions on a non-displayed page of a multi-page tab-controlled user interface, the new text appears on the current page until I change pages back and forth.  What a pain!
    Sooo, NI....does LabVIEW 2011 have support for unicode fonts?  Or, is there anything else in the new control style that will support programmatic language changing?
    Halden 

  • Ni 5640R drivers

    Hi Sir,
    I am vasu.I have started working on your  NI-5640R(version 1.1) LabVIEW card with LabVIEW 8.2.
    i have some doubts on this card.
    i seen in C:\Program Files\National Instruments\LabVIEW 8.2\examples\instr\ni5640R\Driver four VIs.
    how can use these VIs.By using "Stream from Disk" VI i can get(i'll give sine .dat file) sinewave from card DAC output.
    By using "Stream to Disk"VI can i get waveform what i given as input to the card.
    tell me how can use these VIs for  my requirement( i have to generate QPSK and GMSK signals).
    regards
    B.Vasu.

    Hi Vasu
    There were two issues to get the VI to remove the broken run arrow in the host VI.
    The first issue is that the ni5640R DAC Enum.ctl and the ni5640R ADC Enum.ctl controls were somehow replaced with the ni5640R FPGA VI Reference.ctl control.  So there was a mismatch in the data type.  I’m not sure how this could have happened. 
    When creating a new project from one of the existing shipping examples, the instructions for “Using the ni5640R Template” in the “Getting Started with the NI PCI-5640R IF Transceiver and the LabVIEW FPGA Module”.  Even though it describes starting from the Template project, the steps apply to starting from one of the other examples as well.
    The second issue was that the VIs need to be bound to the ni5640R FPGA VI Reference.ctl control.  This is an option on the popup menu when clicking on the Open FPGA VI Reference VI.  In some cases, it may already be selected in the popup menu.  In this case, unselect the Bind to Typedef option.  For good measure, I usually selected the FPGA VI to use with the host VI, and then I reset the Bind to Typedef option.  In most cases this should fix the ni5640R FPGA VI Reference.ctl control mismatches throughout the VI.  In some cases, I have to Save All, close the host VI and all subVIs.  Then reopen the host VI.  This has always working in all cases for me. 
    If you still have an issue, it is probably another issue than what I saw in these VIs.
    Jerry
    Attachments:
    test_exmp_v02.zip ‏3113 KB

  • Airport Bases Stations are they good for serious usage?

    Hello, I was looking for a forum about the base stations in general but this is as close as I think I'm going to get.
    I love apple and apple products but I'm feeling a little let down by the base stations. Here is the deal. I'm setting up wireless access in my company and I decided to go with the base stations not only because of my love of apple but also I've heard that they use them in schools, etc and they are solid products. So I went out an got a few. currently I have two set up with WDS and they work fine but only when there a few people on the network. As soon as the load increases they stop dead in their tracks.
    eg. I checked and at one point I had 37 people connected to the units. both units sharing the load. I constantly had to reset them as they would stop dead in there tracks at random points.
    So my question is; Is there something that I'm doing wrong?, are the units not as good as they say they are? or is there a limit on the number of clients they can handle.
    You guys should also note that I thought the issue was limited these base stations so I went out and got two new ones and I have the same problem.
    I'm working the base station extremes, the ones before before the new wireless n models.
    Any help would be wonderful, thanks all.

    SiegeX wrote:
    Hopfully it's OK to talk about OpenG code here.  I just installed the full OpenG compliment via VIPM and I noticed a pallet for Message Queues.  I've used your standard LabVIEW queue to synchronize data between loops, usually sending an enum to control a state-machine, so I was curious what these Message Queues buy me that the standard Queues do not? I notice that the "Insert Msg Queue Element" VI has a boolean option called "Generate Response Notifier" which seems new and interesting.  I don't have any experience in using notifiers either so maybe this is where I aught to look to first?  I tried looking on the OpenG wiki for usage cases but I couldn't find any.  I'd just hate having a really great tool that I could use under my fingertips and not know how to properly use them.  Thanks
    Hi,
    This is to notify you that I've posted a response to your message, here (on the OpenG forums).  I've included an example with screenshots.
    Thanks,
    -Jim

  • How to get I32 enum text out of a control (i/p terminal config, active edge of DAQmx vis)

    Hi,
     I am using DAQmx VIs create channel.vi and sample clock.vi, they have inputs (input terminal configuration) and (active edge) both are I32 and have enum looking drop down options. i want to use those text values to put into my excel file, but they give out numeric codes related to respective option. is it possible to get the text as it is.
    it is not an enum but I32 which looks like enum..
    plz help..
    Thanks
    Solved!
    Go to Solution.

    Note: This assumes that you have an actual control on the VI. If you have a
    block diagram constant, then that won't actually work. In this case to get the actual text you need to pick from list of text items. To further complicate things, the actual values that are generated are not sequential. You can use either a case structure or a 2-step lookup.
    Attachments:
    Example_VI.png ‏7 KB

  • Enum control not editable in specify module

    I created an enum control in LV8.0 and am trying to use the VI in TS3.5 as an action.  When I specify module, the drop-down control for the enum is missing and the value is can not be editted.  I've tried changing names of enum choices to as simple as ""one", "two"", but still can not edit it in TS.

    Hey Josephio,
    Have you wired the enum up to the connector pane in LabVIEW as an input?  TestStand will not recognize the enum control from your VI (or any other controls or indicators, for that matter) until you wire them to the LabVIEW connector pane. 
    Are you seeing the enum at all in TestStand's specify module window?  Is it showing up as an input, however the dropdown window doesn't appear?  Please post a screenshot if the above advice doesn't help you and I'd be happy to assist you further from here.
    Derrick S.
    Product Manager
    NI DIAdem
    National Instruments

  • Multiple selection with control key in ring, enum, or radio buttons on Speedy-33 ?

    Hi all,
    I want to create a list of entries via ring, enum, or radio buttons. I just want the user to be able to select more than one entry from the list.. This is normally doable with windows applications by using control key. However, how could I do the same thing or let the user choose more than one entry from the list? Any idea is greatly appreciated..
    Thanks so much!

    Hi Casiopea -
    To answer your question, I'm not sure I've ever actually seen a ring, enum, or radio button control exhibit the "CTRL+click" behavior you're describing.  (In fact, I think all of those user interface elements are designed specifically so that only one value can be selected at any one time.)
    However, I have seen plenty of list boxes allow multiple selection, and LabVIEW's list boxes can do the same.  A group of checkboxes can also end up looking like radio buttons if you group them with some "decoration" and would allow you to select multiple options (because you can check/uncheck each box independently).
    I'm not quite sure, though, how your question relates to LEGO specifically.  Did you accidentally post this question to the wrong discussion forum?
    To address Eagles Coach's statements, the official Move block uses checkboxes in the "Port" section of the configuration pane in the MINDSTORMS software, not radio buttons.  The Motor block uses mostly radio buttons, and I didn't see any sections that allow multiple selections.
    James Blair
    NI R&D

  • Edit Items for Enum and/or Ring control yields weird dialog

    Whenever I right click on an Enum or Ring control on my FP and choose Edit Items... I see the following image. It's almost like I am missing a dll or something that brings up the info for the Edit Items Page Properties Dialog Box. Any Ideas?
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~
    Solved!
    Go to Solution.
    Attachments:
    DumbEnumEdit.JPG ‏18 KB

    HAHA!!  That would be awesome eh? 
    Fact of the matter is I don't know what contributed to it.  I do have a couple ideas though:
    I opened a VI that was created on an older version of LabVIEW (don't know which version).  The VI contained some enums and I tried editing those.  I think that could have messed it up.
    The other option is that I downloaded the entire OpenG library to play around with some of their VIs. 
    This happened shortly after one of these two incidents.
    I have a huge deadline to meet next week but after that I'll give it a whirl and let you know how it goes.
    Later,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • How can a block/free​ze a ring or enum control element when I Boolean signal is set?

    Hello! I am still a starter with LabView (working with 6.1).
    On the Front Panel of my VI the operator can use a ring control element to choose some (6) options. I am searching a way to block the scroll down menu of this ring element when a Boolean Signal is set. Only when this Boolean Signal is false, my operator should have the possibility to chance the ring or enum element.
    Is this possible?
    Hopefully
    Lars

    What Gerd meant was that you need to create a property node. Right click on the control or the terminal and select Create>>Property Node. Then, select the Disabled property, right click it and change to write and set the value you want (0, 1 or 2). You can change the boolean to a number by using Boolean to 0:1 from the Boolean palette. This property is common to all controls, not just rings.
    To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
    Try to take over the world!

  • Why Ring control or Enum Control auto scrolling

    Hi all,
    Recently we saw our Labview application with some Ring control or Enum Control automatically open and scrolling for a few minutes causing the application to hang and later recovered to work normal.
    Any of you experienced this in the past and what could be the cause and how have you fixed it?
    Thanks,
    Kimberly

    If you have another keyboard and mouse laying around then just replace them and see if that fixes the issue. I would worry about any free software that does something like this unless it came from the mouse manufacturer.
    =====================
    LabVIEW 2012

  • Controls Property Array being defined as an ENum

    HI,  I have an example of an event handler that I am attempting to use with my menu.  I am using the controls[] property for the VI Panel and all is well with its execution.  The problem that I have is that I am going to have lots of controls and do not like the way that I have to use strings for the case structures using labels.text to determine what control to handle.  TYpically, I like to implement enum types for controls so that the case structure compares the numbers yet displays the text for code readability. 
    Is there a way to systematically convert teh controls[][ property to an enum type for this purpose?
    Attachments:
    controls[]3.llb ‏26 KB

    Enum values can't be set when the VI is running, so they have to be set at edit time. You can write a VI which will extract the names of the controls into the Strings[] property of an enum and then copy that enum into your VI, but the enum will be out of date if you change your controls.
    Try to take over the world!

Maybe you are looking for

  • Production order with pipe line material

    Production ordre created and got confirmed  and found pipe line materials got stuck in COGI and on analysis found in that specific ordrer ordre pipe line material are not activated with special stock key indicator i.e. 4. Due to this it got stuck in

  • Inspiron 20 3000 can I add a solid state drive to boot for speed ?

    I'm looking to purchase an inspiron 20 3000. I asked sales if I could get it configured with an SSD drive, and they said no. I'd have to purchase it and then the drive myself. But on Dell's web site I don't see any SSD drives, or hybrids listed as co

  • Embedding Tamil font

    Hi, I want to embed Tamil Font in my webpage.How can I ? Please help me.... Thanks in advance.

  • Eliminate metadata?

    Originally posted this in Bridge General, was suggested that I repost here... Trying to eliminate the shooting data from image files using Bridge (including shutter speed, f-stop). I see options to affect virtually everything except for those two thi

  • Gaussian Blur glitch?

    Hey forum, every time I simply change the color of text in Illustrator CS5, the loading bar window appears and says it's working on applying a Gaussian Blur to the text, yet nothing happens after. The text's color changes, but that's all. No Gaussian