CASE STRUCTURES WITH TAB CONTROL

Hi,
I have created  tab controlled  case structures for three different cases,
Tablet type
Machine Input
Output
It seems that data is not interlinked while switching betweeen the cases.
I have to select the start buttun for each tab to get results.And also if I skip the second tab and jump to third tab, it doesnot give results. SOmehow the data is not acquired.
Can anyone help me out for the same.
Attached is the main VI (PAR_LAB_ATT_00_01)followed by a sub VI(gen time array)
Thanks
Sumit
Attachments:
PAR_LAB_ATT_00_01.vi ‏200 KB
Generate Time Array.vi ‏15 KB

Please don't use all CAPS when posting your message subject.
How are you running your VI?  I don't see any while loop in it, so it only runs once.  Which means only the case structure associated with the tab that is currently highlighted before you press the run button will actually run.
The vast majority of the time, a tab control is only used to control what is displayed in the front panel and is not used to actually control the execution order of the program.
I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

Similar Messages

  • Case structure with more than 200 cases, slower lab view app

    Problem Description :
    i am currently making a vi which compose of a simple case structures, a case structure with more than 200 cases, what i noticed is that the more i added cases the slower the labview reacts, it takes time for me to route wire on each of the cases.
    i dont know if there are any setting in the labview environment that i can increase the buffer size? i dont know... but its getting slow (only on the
    vi with more cases in a case structure)
    mytestautomation.com
    ...unleashed the power, explore and share ideas on power supply testing
    nissanskyline.org
    ...your alternative nissan skyline information site

    Can you clarify what you mean by "slow". Does it run more slowly or does it feel sluggish during editing?
    Could you attach the actual VI?
     Overall, I agree with the notion of local variable overuse. For example, you read the same local variable twice in the same case. Is there a need for this? Is there a chance that it varies between the two reads? Typically, you would place the terminal in front of the case structure and wire to all the locations where you need the value. This ensures that the data is consistent. Still, this should not cause any slowdown problem.
    (On a sidenote, the code in the upper left corner is inefficient. You convert the same data to lower case with each iteration, so you might want to place this before the loop and do it only once (well, if you are lucky, LabVIEW will fold the operation, but still....). Also your "index array" operation can be replaced by autoidenxing of the 2D array on the outer loop boundary.)
    LabVIEW Champion . Do more with less code and in less time .

  • Please give me a idea with sample code explainingBDC  with TAB control

    Hello,
    Can anybody give me a idea of doing BDC with TAB control.
    Regards
    Mave

    hi, you need to show the BDC script in TAB control?
    then you can reference to the screen of SHDB, maybe
    thanks

  • Lock Tabs with Tab Control

    Hi all,
    I am working on a LabVIEW program with a tab control that creates five tabs with questions on each tab page.  I would like to lock the tabs such that the user could not move on to the second tab by clicking on the next tab, but only by clicking on the correct answer to the question displayed on the tab.  If that is not possible, I would like to at least lock the tabs so that the user could only move on to the next tab after a set unit of time, or that they were automatically directed to the next tab after that amount of time.  I'd really appreciate any help that could be offered!
    Thanks!
    Lora

    You could use an Event structure to detect when the user tries to move to a new tab and test for your conditions there.
    Message Edited by jcarmody on 04-17-2009 08:03 PM
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
    Attachments:
    Example_VI_BD.png ‏5 KB
    Untitled 1.vi ‏12 KB

  • Execute Case Structure with Button Press Slows Down VI

    Hi -
    I'm fairly new to LabView, and I am having some issues with using a button to run a timed while loop.
    I am writing a VI that outputs a timed voltage pulse to an output channel on a DAQ; meanwhile, the VI reads and graphs the voltage on three input channels on the DAQ. When I use a timed loop that automatically executes when the VI runs, the program works. However, I would like to include a button so I can control the timing and number of voltage pulses sent to the output channel, instead of sending only one voltage pulse each time the VI runs. I have tried to do this using a button wired to a case structure. If the button is 'true,' the VI should send the voltage pulse. If the button is 'false,' the VI should keep the voltage at zero.
    When the button is 'false,' the VI runs normally; however, when the button changes to 'true,' the VI slows down and never sends the pulse. Why does this happen? How can I fix it?
    Also, how can I send the voltage pulse only when the value of the button changes?  I only want the timed loop to execute once when the button changes value.
    Thanks for any help or advice!!!
    Attachments:
    Sensor Read6.vi ‏85 KB

    The graph is in the same while loop as the case structure.  The while loop won't iterate until all the code inside of it has completed.  So the graph only gets updated once, and won't update again until the while loop iterates again.  If you need more continual updating you may want to put that in a loop that executes a couple of times, or completely separate your code into 2 while loops.  Is it that long of a wait considering your pulse length is 1 second?
    Your analog output code is just writing a voltage out (7 volts) until it eventually writes out 0 volts.  There is no reason for it to drop down unless you have some sort of electrical problem between your DAQ device and the device on the other end that is reading the 7 volts.  What are you connecting that analog output too?
    What if you don't use LabVIEW and try to test out that analog output using Measurement and Automation Explorer?  Does it do the same thing?

  • Modify Case structure with VI Scripting

    This is possible:
    you need a file, where only a case structure is on the BlockDiagram (BD).
    This file is called (e.g. Test1.vi)
    Then you start this VI:
    And in your test1.vi you have updated the case structure ( CaseStructure ) with VI Scripting
    Sometimes you will need this
    BR
    Eugen Wiebe
    Eugen Wiebe
    Bernstein AG
    CLAD - Certified LabView Associate Developer

    I now understand what you were saying about inlining a subvi.  I did as you said and made a subvi with a case structure and an indicator within it.  I use the New VI Object node to add that subvi to the slow-inlining parent VI.  Then I tried to inline it using the invoke node, but I got error 1399, which make sense.  Is this what you meant for me to do, or did I misunderstand?
    Also, I tried the ControlTerminal reference approach you mentioned earlier.  Unfortunately when I called the move method on the control terminal property and had the 0th frame of the case structure as the owner I got error 1060 again.
    I really appreciate your help.  Do you have any other thoughts?

  • How do I use a Case Structure with Strings?

    I need to use a string list to set up a set of cases to be performed. Is it possible to tell a single case structure to do "a, b, c, and d, but not e or f" or "do a, c, d, and f, but not b or e" etc... when you use a string containing the cases to be used?

    Blackavar,
    A case structure will only execute a single case at a time. If you want to have multiple cases execute in parallel, then you would need to have multiple copies of the case structure and split the string apart and wire them to all of the needed case structures.
    This could be done with reentrant subVIs to run truely in parallel. Anther method would be to have 6 different case structures, all with 7 cases each. The 7 cases would be "a", "b", "c", "d", "e", "f", and "0". Your input sting will need to be built up so that it will always be 6 characters long and then split up so that each character goes to one of the case structures. You would have your needed code for cases a - f. Case "0" would do nothing.
    Randy Hos
    kin
    Applications Engineer
    Nationsl Instruments
    http://www.ni.com/ask

  • Graph range problem with tab control

    Hello.
    I am using LabVIEW 8.2.1
    I have five XY-graphs in a tab control, with five tabs. One graph in each tab. When running, theese graphs is constantly written to, but the user is only allowed to watch one at a time.
    The program also contain a maximum&minimum chart, containg the maximum and minimum value for every plot in the viewable part of the graphs. The user can zoom in on a graph, and then watch the max&min values in this picture. The values are calculated by taking the range to each graph, and use theese ranges to cut out the viewable part from the input data to the graphs.
    The problem is, that the program only see the last viewed range. If I view a graph in a tab, the max&min values for this graph is correct, but the four other graphs dont get the correct values. The graphs data is written correctly. It seems like the ranges from the "hidden" graphs dont get updated when not viewed. Does anybody know how to fix this problem?
    I have uploaded an example to this problem. See how the range just freezes on the not viewed graph, even the two graphs is exactly the same.
    Thanks
    Fredrik, Norway
    Message Edited by Kalman on 06-19-2008 01:58 AM
    Attachments:
    graph_range_problem2.vi ‏24 KB

    Frederik,
    the reason for your issue is autoscaling. If the graph is not drawn, autoscaling will not take place, so you will not get any correct values, you will get the last autoscale-values.
    The behaviour therefore is "works as intended" since it reduces CPU usage.
    So the best way to work around is something like seen in the attached VI: you should compute the scaling for each graph on your own and use this to update the scales as well as the indicators (which i left out in my VI).
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.
    Attachments:
    Scaling.vi ‏25 KB

  • Dynamic event registrati​on wont work with Tab control

    In LTR volume 11 No1 we find the "Dynamic Event Handling.vi".
    I had placed the controls on a Tab control and now this example wont work.
    Is there a solution to this problem?
    Scientia est potentia!
    Attachments:
    Dynamic_Event_Registration.vi ‏51 KB
    Dynamic_Event_Registration(controls_on_Tab).vi ‏64 KB

    Yes. The first stage of the code registers mouse down events for all the controls. When you added a tab control that meant that a mouse down event was registered for the tab as well. So now when you click on an object on the tab LabVIEW must decide whether to fire the mouse down on the tab-event, or the mouse down on the object on the tab event...It goes for the first but since there is no description for the tab no dialog will be displayed. If you add a description for the tab you'll see that it fires the event with the tab and you get a dialog with the tab description.
    So - how to fix. Well, it's not that simple, one might think that to exclude the reference to the tab when you register the events would do the trick, but it rather seems that LV will always t
    hink mouse clicks are on the tab and not on the objects on the tab.
    The solution though is to get the references to the objects by reading the controls on page property of the tab control. So instead of reading the controls array from the front panel read the pages references of the tab and then the controls on page array from that and then register mouse down events on that array.
    MTO

  • How about an Error Case structure with warning?

    Hi,
    while wiring some vis and thinking about error handling....
    In most cases the simple case structure feet by the error cluster will do the job. However in some cases when you deal with warnings, wouldn't it be nice to have an additional (optional) warning case that is true for a not empty source string and/or an error number?
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

    I forget to mention: Of course there is a solution possible by unbundling the cluster and check the error number and string followed by a case. I still remember the time when the case selector couldn't handle the error cluster ... (started with LV3.1 )
    I just thought it would be a nice thing when you wire the error cluster to the selector and get the red and green case and you can right click, add a case and get a yellow(?) case named 'warning'
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'
    Attachments:
    Example_BD.png ‏2 KB

  • Case structure with two selectors

    Hi all
    Once again I'm wondering...
    ...if it is possible to wire more than one value to a case structure. I'm just working on a project and came to a point where I have to nest case structures. I have two enums and depending on both enums I set a value.
    How would it be to have more selectors so that the following code extract could be "drawn" with just one case structure?
    enum X1 = {manual, auto}
    enum X2 = {red, green}
    if(X1 == manual && X2 == red)
    else if(X1 == auto && X2 == red)
    Maybe something useful for new LV versions, if it does not exist yet.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...

    @David - Great solution. I might remember it one day .
    @Shane - You could have given me at least "en stutz" . Well, I see your point, but in every textual language exists this possibility. Although your argument is acceptable (the compound enum), I prefer to have enums without combinations. Ok, maybe the values would make some sense, but I like it better if they are separate. In addition, what should I do if one input is an enum and the other a boolean? And now don't say "use DavidCrawford's solution" .
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...

  • Possible bug with Tab Control and Context Help?

    I created Description and Tip text for each Tab of a tab control I am using on my front panel.  I have a subVI that is called by selecting a menu item from my main front panel.  The subVI's front panel also has a menu system and a Tab Control.  I have Description and Tip text written for each of the tabs on the subVI's front panel.
    When I enable context help from the menu of my main VI, the proper help text shows up for the tabs on the main vi and, when I bring up the subVI's front panel, for its tabs as well.
    So far so good...
    Now I builld the application and run it as an executable.  For ALL of my panel tab descriptions, I get the tab's label in bold text, but no description (just a blank area).
    Is this a bug in LabVIEW?
    Kevin 

    wired wrote:
    I'm still seeing this behavior in LV8.2.1.  Does anyone know if/when it was fixed?  Also, my tip strips show up in the corner of the monitor when I mouse over a tab (in both the executable and the development version).
    I see it still even in 8.5.  
    The Help part of the bug is still NOT fixeed by NI.
    But I dont get the tool tip appearing in the corner of the monitor, it is showing up as usual.
    - Partha
    LabVIEW - Wires that catch bugs!

  • Keyboard Navigation with Tab Control

    We have a tab control in a form and it has several pages.
    On one of the tabs we show data from a multi row block, the first 3 columns are on the tab canvas, then we have a stacked canvas that scrolls left/right that shows the rest of the data. We fix the first three columns as they give context to the rest of the rwo that is scrolled within the tacked region.
    Now the problem:
    When focus is on one of the columns displayed on the tab page we can press CTRL-TAB and the tab switches to the next tab page.
    If focus is on one of the fields on the stacked canvas CTRL-TAB doesn't navigate to the next tab page - it attempts to switch windows.
    It looks like the items that aren't onthe tab canvas, but are on the stacked canvas, aren't party to the CTRL-TAB event?
    Has anyone else experienved this problem? Or know of a work around?
    Regards,
    Bren

    When I use CTRL-TAB just the trigger key-next-item fires. In our environment we use CTRL-PageUp/Down to switch the tab canvas. But I think the event that is really fired is key-nxtblk. So on forms-level I added the triggers key-nxtblk/prvblk that call my procedure next-/previous-tab-page.
    In the when-new-forms-instance trigger I initiate a plsql-table, that has the following record type as a rowtype:
    TYPE TabPage_Rec IS RECORD
    (TabPage Varchar2(80),
    First_item Varchar2(80));
    So each tab page 'knows' its predecessor and successor. I then implemented two procedures next_tab_page and previous_tab_page, that iterate the plsql-table and set the canvas_property TOPMOST_TAB_PAGE to the requested value and navigate to the first item on the tab page.
    That way you are mostly independent of the way your form is designed (blocks, items, order in object navigator). It is a bit of an investment and you have to keep it consistent to the way your form changes tabwise, but I found it quite handy.
    Hope this helps.
    Regards,
    Bettina

  • Building a case structure with four boolean (true/false) inputs.

    I currently have two boolean inputs that I would like to use to select cases in a case structure. I would like to have four cases, each one dependent on the true/false condtions of the two booleans. If boolean 1 =true, then case 1 should be used, if boolean 2=true, then case 2 should be used, etc.
    What structure should I use to convert these boolean inputs into numeric cases?

    Or build them in to an array and "Search 1d Array".  If you are only looking for a single bool being true, this would be easier because your cases could be {0,1,2,3} instead of {1,2,4,8}

  • Start stop while loop with tab control

    I want to be able to start and stop a while loop by entering and leaving a tab.  I am using an event structure to do so but it doesn't seem elegant or the right way to do this.  The only way I was able to get it to kind of work is by unchecking the lock front panel box in the event structure.  I have attached a sample vi of what I have so far.
    Solved!
    Go to Solution.
    Attachments:
    Loop test.vi ‏16 KB

    The problem is that you can't even stop the program by hitting the stop button until you leave the tab, which is not a friendly user interface.
    Event structures should just handle basic user events.  Any given event case should not take a long time to run.  While you are in the diagnostics tab, your code is stuck in that while loop.  Although fixing the lock front panel allows you to do other things, the LabVIEW is just queuing up all of those other UI events (like Stop button value change) and can't handle them until the inner while loop stops and allows the outer while loop to iterate again.
    You should have a parallel while loop to handle the waveform graph.  You can use notifiers or queues or an action engine FGV (see Ben's Action Engine Nugget) to pass the starting or stopping of the waveform graph update to the parallel while loop.

Maybe you are looking for

  • Airport Extreme speed limit to 130 Mbit

    Is it normal that the maximum speed of the Airport Extreme is always limited to 130 Mbit when you've configued it as 802.11b/g compatible? I've use the Network Utility to check the Link Speed. I need the 802.11 g mode because sometimes I need to conn

  • Why are some of my still images (jpeg) Ok in my timeline, but skewed ofter output?

    why are some of my still images (jpeg) Ok in my timeline, but skewed ofter output?

  • Problem Joining JDBC theme to XML NSDP file

    I've created a basic map of Germany with different layers for regions etc. I've then added a dynamic JDBC theme using the following code var baseQuery= "select geometry, name from world_sample.world_city_metropolis where iso_country_code = 'DEU'"; va

  • MIRO - Amount Split Tab - additional field

    Hi All In the T-Code MIRO, under the Amount Split Tab I have entered three line items. However, I need to maintain Text for all of them separately. My Doubt is, can I add additional fields in the Tab for Text. Regards Abhishek Kumar Edited by: Abhish

  • Speeding up Leopard on a PowerBook 1.67 PPC

    I have an older PowerBook (1.67mHz PPC) and I had upgraded it to Leopard, thinking I was doing my son a favor by upgrading. Silly me, it is now so slow that NOTHING goes on except for the spinning beach ball of death. he says it will get to a screen