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

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 .

  • How to append S950 Info structure with the structure ZS950

    I have created Info structure ,now How to append S950 Info structure with the structure ZS950

    Refer this link:
    Addition of a new field to a standard table .
    Regards,
    ravi

  • 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

  • How to use a event structure with a state machine

    First, I would like to inform you that I only work on LabView part time, and have much to learn.  Anything I do learn, I usually forget until I need it again, because I only work on it part time.
    Using your StopWhileLoopMOD[1].vi, I am trying to put a state machine inside the event structure.  
    Related link: http://forums.ni.com/t5/LabVIEW/How-to-stop-while-loop-in-Event-case/td-p/465564/page/2
    Here is my application:  on the front panel, the user can select any combination of 7 different tests.  I have created cases to perform each step of each test in the correct order, but if the user presses stop, the tests won't stop because some of the cases have a while loop inside the event structure (like you mentioned is a bad idea).  The user should be able to stop the test, reselect tests to perform, and re-start the tests. 
    When the start button is pressed for the event structure, I need all the cases to run in the proper order, unless stop is pressed.
    In the past I have indexed an array and used that to run the state machine, but it won't stop immediately.  
    I have sub VIs that are built in while loops because the outputs of the product needs time to stabilize.  The state machine stops and waits up to a certain number of iterations.  If it passes the test, the while loop stops and the next state starts.  If it takes too long, it exits and reports an error.  Maybe I need to just use the state machine and not an event structure?
    Is there a good example of an event structure?
    metzler CLAD
    Solved!
    Go to Solution.

    I'm not sure exactly what you are asking, but it sounds like you want to script a bunch of tests and if the user says stop, to immediately stop the current test and abandon the others?  I'm going to assume that you know how to clear the array so that it will abandon the others, so I'm guessing that you are having trouble abandoning the current test?  If this is indeed the case, then the problem is that you are not able to propagate the message from the main VI FP which is the GUI to the sub vi which is the test, where the test may or may not have a GUI (FP visible) of it's own.  Threading was the first thing to come to mind, but this may not be necessary using events.
    You can do this by passing a refnum of the stop button to the subVI, where you can then add that wait to the event case structure.
    I've attached 2 VIs, mainvi.vi which is just a loop displays the count*2 (number of seconds passed since running) that will call subvi.vi and then check to see if the stop button is pressed.  mainvi.vi is by no means a state engine, it is just a simple loop for demonstration purposes.  subvi.vi just waits 2 seconds and leaves, it is a better structured state engine with an init state to start a poll case to wait for events and an exit state to clean up.  You can modify this any way you wish to get it to do what you want.  You will note that even if subvi.vi is being executed, it will terminate immediately when the stop button is pressed.
    Hope this helps.
    A
    Attachments:
    mainvi.vi ‏17 KB
    subvi.vi ‏33 KB

  • 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 to manage a case structure Untill a value is reached

    Dear all,
    I am collecting data with DAQmx and after a value is reached i want to do smthg else, for this reason i created a case structure and i put to the case selector that if a value is smaller than "10" then it is true. If it is false it should stop and do what i say even if the value gets under "10 again". 
     So how can i make this: "once the value is reached then do what i say  even if  the case selector value is back to true state after a while"
    Thanks.
    Kind regards.
    Solved!
    Go to Solution.
    Attachments:
    False-CaseStructure.png ‏15 KB
    True-Case-Structure.png ‏19 KB

    You can use the shift register to make a condition so once it enters into the value greater than limit case then it will not go to the other case even if the value goes below.
    The best solution is the one you find it by yourself
    Attachments:
    Case Selector.vi ‏7 KB

  • How can i set case structure always true on boolean impulse?

    Hello everyone! I need a little help. All i want is to set a condition when to acquire data from my acquisition board. I have a sinusoidal pulse and when value its near zero (between 0.5 and -0.5) i want to start to write data and also stop condition. How can i make my case structure to remain set to true until next condition? Thanks in advance!
    Attachments:
    Untitled.png ‏104 KB

    sdadasdas wrote:
    Thank you! I'm a beginner in labview and any advice is welcome!
    I highly recommend tutorials if you are really new.  Otherwise, just keep asking questions.  You'll figure it out soon enough.
    3 Hour Introduction
    6 Hour Introduction
    LabVEW Basics
    Self Paced training for students
    Self Paced training beginner to advanced, SSP Required
    LabVIEW Wiki on Training
    Learning NI
    Getting Started with NI Products
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Please Clarify the Errors (Case Structure)

    I am using numeric case structure but I don't understand the errors, can anyone clarify what they are mean and what I have to do to change it. Thank you in advance.

    (This is a new problem, so you should have started a new thread.)
    The solution is simple: Things are case sensitive!
    A case labeled "Divide" is different to a case "divide"! Correct the first characer for each case and you're all set.
    In scenarios such as this, easiest is to hook up an empty case structure to the radio control, then right-click the case structure and select "Add case for every value". Voila! No chance for mispellings!
    Message Edited by altenbach on 08-07-2006 09:49 AM
    LabVIEW Champion . Do more with less code and in less time .

  • How to change the case structure to string input?

    Hi,
    I have the inner case structure that it will decide to set "DC Voltage" or "DC Current" mode. The "Output Function" contained the selection of function "DC Voltage" or "DC Current". So far it only work with DC Voltage not DC Current. My question is how do I change the case structure to string selector? When the output function is selected to DC Voltage then the case structure is selected DC voltage case. Please help Thanks.
    Attachments:
    test.vi ‏35 KB

    You don't really need to convert the value to a string? The problem is that the value of the individual ring items are not 0 and 1, as you assumed. The values generated by the controls are:
    DC Voltage: 1006
    DC Current: 1007.
    You can find this out by viewing the properties for the "Output Function" and going to the "Edit Items" tab.
    So, all you need to do is change the 0 to 1006 and the 1 to 1007 for your case items.
    By the way, your sequence frame serves no purpose.

  • 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

  • How do I get case structure to recognize tab names?

    I have a tab control.  In my VI, I use a local variable reference to this tab control to switch a case structure.  When I first made this program, it made sense to call these tabs CS0-CS13.  Long story short, that no longer makes sense.  I have changed the names of the tabs in the front panel, but in the case structure they still show up with the old CS names.
    I tried deleting the local variable, recreating, and hooking it up to case structure, but no difference.  If I manually delete the name CS out of the case structure and replace it with the new name, it doesn't recognize it.
    In other words, it seems to be only remembering the name from the first time I created this tab.  Where do I change this?

    bmishoe wrote:
    I'm using the same version...
    Something (major) I somehow forgot to mention, although I'm not sure why it would make a difference....the CS names were temporary.  I then programmatically change the names during execution because the final name of the tab I want to be dependent on what board the user selects.  So the very first time I created the tab, I named them CS, then changed them programatically.  The case structure still recognized them by their CS name, which makes sense to me.
    In any event - these tabs are nested inside a parent tab.  I just checked and you're right...on my parent tab, the changes show up immediately.  So I'm thinking this has something to do with the fact that I change them programatically.  But still...that info has to be stored somewhere, but I don't know where.
    Hmmm, I think it might be time for some code. 
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • 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?

  • How extract data from case structure

    Hi all, I would like to extract the data from case structure, it's circled in red in the attached file. How should I do it? Thanks for taking your time to look at my post. Your help is greatly appreciated.
    Attachments:
    bp.jpg ‏161 KB

    Thank you guys for your prompt reply.
    As u can see from the vi, there's an error, I need the values in the circled area to be passed on to the block ( Bundled by name)
    Thanks !
    Attachments:
    fyp_bp_only.vi ‏90 KB
    fyp_bp_only.vi ‏90 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...

Maybe you are looking for

  • NF980-G65 and 1075T

    I have a NF980-G65 with a 1075T I can get it to get into the bios but thats about it... I tried the MSI Forum HQ USB flashing tool however when I try to start it from the flash drive it just shows blank. Graphics card 470 MSI Geforce, G-skillet ram 4

  • Problems with item cost & batch table

    Hi experts, I have developed a crystal report recently, to retrieve all the data from batch table (OIBT) and present it in a report. Valuation method: moving average Begin: Item ABC               (batchnum)A1  blah   (qty)3   (itemcost)10.00  (whs)01

  • HDMI Live Video Input into new MacBook Pro?

    We current use FireWire into an older MacBook Pro to stream live video. Want to go to HD camera that has HDMI output. Can new MacBook Pros take live video input from HDMI?

  • Windows requirement

    I have windows ME. can i use a ipd mini with this? i can't download the cd on my computer.

  • Change DHCP with command thru web request

    I'm trying to write an DMP initializer to get our DMP's set up correctly thru a windows forms program. The DMP's are 4400G using version 5.2.1. I'm sending a number of commands, and they all work except for disabling DHCP and setting the IP-address.