If-Then constructions in LV

When using BT State computer for scheduling of the machine, I have a problem. There is no problem on the coding of State machine, but to get there, I need to check about 4 conditions:

1 is a condition OK?

2. If A is OK then is condition B OK?

3. If B is OK so C is OK?

4. If C is OK so is the condition D OK?

If D is OK then enter the State Machine code.

After the start of the SM, if one of the conditions A - D fails, abandonment of SM.

This time A condition is checked in a case structure and in the ACTUAL State of this, any resident. The State Machine is in the Interior more condition TRUE D case. The arrangement works fine, but somehow with so many nesting structure case, there doesn't seem to be very elegant.

If the conditions A - D are FP then a struct EVENT. could be used, but these are of the digital inputs of the machine and the DIO cards support not all DI event triggers.

Other options to manage the conditions A - D without case true/false?

In this case, the four conditions can be controlled individually in four different States. If one of them breaks down, you go immediately to a case to restore output / Abort. Seems to be a good choice for me.

If you start using state machines, then I'd certainly learn a bit about the State machines in queue. Since I started using them I never picked up using a 'normal' state machine Queued state machines can do everything a regular state machine can simply queue from one State at a time, but they also allow the flexibility of the queue a sequence of States and creating type macro steps.

For example, you might have two steps from the macro called to check preconditions and start the Test. The place to check preconditions States [A, B check, check verification C, D check, start the Test]. If none of the preconditions fail, they empty the queue of the State and enqueue a demolition macro case which will stop safely and then return to the inactive case.

The biggest advantage of the State machines in queue on the ordinary State machines, is that it becomes very easy to reuse States in different sequences. It is very common for the steps in public-type service as report error, write the log file or display the front panel. It is very difficult in a standard state machine to reuse a State in different sequences, because this State always hard-codes what state they go to another. To reuse a State in two different sequences of States, where this status should change to different States, you will need to have a complicated logic to decide what transition State to. Believe me, it's not fun.

The great thing about the State machines in queue that resolves this problem is that most of the States generally specify what state comes next. For example, in the case above check does not specify B check then. Instead, it allows just the state machine are the next in the queue state. This means that you can easily rearrange condition controls without actually editing one of those States. Or you might enqueue a precondition in the middle of a test, if you wanted to.

Here are a few good links on State machines in queue. I especially like the JKI model! They put a lot of thought into how to structure a MANUAL so that you don't have to start from scratch. You can also get things like integrated handling error.

State JKI machine

DevZone

Expression workflow

Tags: NI Software

Similar Questions

  • How To Build exe for previous Versions

    I am a bit new to LabView and still struggilng with all the files associated with a project, so I don't know that it is a simple question.

    I'm under LabView v10 for development, but wants to create an exe that run on a version of the runtime v8.5. I've seen threads that suggests it's as simple as 'Save for the previous Version'... but for some reason I can't seem to make this work. I tried to save the vi for 8.5, then by choosing to build the exe, but to be invited to create a project, I thought it has not saved changes - that the Subvi have been converted to version 10. I tried to reduce the changes and opting to use those memory, but it does not; exe built then gives me a runtime error, complaining that isn't time LV 10.

    I tried to save the project with 'Save for the previous Version', and then construction. Yet once, it works not even if when I opened, and then immediately close or the project, or it contained VI, I thought it has not saved changes where it was converted in LV10 - implying the indeed saved files in LV8.5 format.

    I seem to go along in circles here. What is mind someone on the steps needed to build an exe that run on a previous runtime environment?

    Thanks in advance

    To my knowledge, none of the device drivers of OR may have multiple versions co-exist.  Now, who does not necessarily mean if you use any material that you will encounter problems.  If the material is material OR, then they will also have specific drivers that may be conflicting, but if they are from another manufacturer, it will come down to NI-VISA probably.  If you use data acquisition cards, then you have installed DAQmx.

    As long as your program is not access to these devices, you're OK.  Do not update the drivers if you do not use the equipment.  You need to look for in the relase notes each of the drivers you need to update and see if you can find a version that supports 8.5 and LV2010.

    Even if you do this, it is not 100% guaranteed that you will have problems.  I wrote an application for a client once used OR-DAMA.  I had a control on the front panel, based on a typedef in the pilot.  I've updated my laptop for a new project, but later had to come back and do an update for the original project.  The typedef had changed and caused a recompilation.  Nothing broken on my end.  When I sent the update, it crashed on the PC of the client due to the change of the typedef.  I ended up bringing to upgrade the driver on their machine.

  • How to 'continue' a 'while' loop using an "if"?

    I have a loop 'while' continuous operation, by taking a step at each iteration. In each such iteration I save this measure unique to the file AND display it on a chart. From time to time, I have "out-of-range" measures, which are displayed as 1E-37 or 1E + 37 on the graph and poured on the record, and are not relevant (for me, it is). With the help of a simple interpreter, like python, I could use an 'if' statement to check if the reading is indeed irrelevant and if so, 'continue' in the loop 'while' so that it stops the current iteration and starts a new.

    How we not implements such a thing in LabVIEW?

    Thank you

    Amit

    Hi Amit,

    There was no 'cynicism', not at all! You ask a few notions of LabVIEW base so I suggested where to find that...

    "but this would require having wrap all code inside the"while"loop."

    OK, then you should explain the difference of a IF/THEN construct textual languages. Made a simple

    IF test

    {do something here}

    ON THE OTHER

    {do something here}

    not wrap the code inside a structure?

    A CASE structure does exactly the same thing and I don't see anything more simple as followed by comparison of two cases. What is complicated in a case around another structure design code?

  • Push the cert with creation of App error

    The push cert expires on June 23, 2014

    But give App Builder be this error, do - does anyone know what is happening?

    Screen Shot 2013-06-24 at 3.50.15 PM.png

    I tried to remove the cert in the keychain and download them to Apple once again. But I got the same error message (time has not changed).

    It is a known issue with App Builder Version 26 where the newly created certificates are not considered valid until several hours after the actual creation time. If you wait until the time listed in the dialog box, they will work. Some customers have had success setting their clock system forward to later, and then construction.

    We have a fix for this version 27, due mid-July.

    Neil

  • Several drop down menus E-mail to multiple recipients

    Hello

    I try to get 3 different menus to determine the multiple recipients of a form sent. I can't seem to get them all to work at once,... .only one or the other. It is the click event script that I use on the submit button. Could someone help me identify what's wrong with my syntax (particularly vEmail portions)?

    // First check if there are null values, then construct email using script
    var vEmail =  "";
    var vSubject = ""; 
    var vBody = "Attached to this email is a Field Service Issue - Parts Order Form."; 
    var vName = ""; 
    var vCC = "[email protected]"; 
    var vFormat = "PDF"; 
    var errorMessage = "You have not provided enough information:";  
    
    {
         vSubject = "Field Service Issue - Parts Order Form"; 
    }
    
    // Check email address field and build error message
    if (Page1.SendFormTo.rawValue == null || Page1.RSM.rawValue == null || Page1.CST.rawValue == null)
    {
         errorMessage = errorMessage + "\n - Please select who you want to send this form to, including RSM & CST."; 
    }
    else
    {
         vEmail = Page1.SendFormTo.rawValue, Page1.RSM.rawValue, Page1.CST.rawValue;
    }
    {
         vCC = "[email protected]"; 
    }
    
    // If fields required for script are null, warn user and do not initiate email
    if (Page1.SendFormTo.rawValue == null)
    {
         xfa.host.messageBox(errorMessage, "Sending an email", 0, 0); // Send out a custom error message if any of these fields are null
    }
    else
    {
         // Everything is OK, send email
         event.target.submitForm({cURL:"mailto: "+ vEmail +"?subject=" + vSubject +"&body=" + vBody + "&cc=" + vCC,cSubmitAs:vFormat,cCharset:"utf-8"});
    }
    
    

    Kind regards

    ZeroZone

    I guess the problem is with your concatination... I see a problem with the following line of code...

    vEmail

    = Page1.SendFormTo.rawValue, Page1.RSM.rawValue, Page1.CST.rawValue;

    I would like to use next... to concatinate all email addresses...

    vEmail

    = Page1.SendFormTo.rawValue + ',' + Page1.RSM.rawValue + ', ' + Page1.CST.rawValue;

  • How can I apply a current color fill for a stroke, then adjust the construction of the color of this race?

    Hi all, I am trying to find a way to automate a simple process, but repetative I do countless times a day. Ideally, I would like to attach it to a combination of keys to speed up my work flow.

    I'm working on the drawings to the mark and color for the shoes, so the way I'm coloring these forms and lines helps separate the various materials and parts of the shoe.

    The coloring of the line drawings, I'm working with Pantone spot colors as fillings for closed path objects. I have then manually apply that same color for once, the value of the stroke weight 0.5px, convert this color CMYK spot and add 15% of the value of K.

    I found a code in a former post office to apply the fill color of the object selected in the race, but I'm going to but I can't the next step to find how to take this spot stroke color and convert it to a generation CMYK that I can then add black to 15%. -What is still possible? I spent an hour playing with the script and had luck for the fill color or by turning the white line. Thanks for the help!

    OK try this, I added the spot color option

    // make stroke color same as fill color + 15% black increase
    
    if ( app.documents.length > 0 && app.activeDocument.pathItems.length > 0) {
        for (var a=0; a100 ? 100 : black;
    
                    sel.strokeColor = col;
                    sel.strokeWidth = 0.5;
            }
            catch (e){alert(e)
            }
        }
    }
    
  • When you go to the official site, covering the Hoover Dam bypass bridge, I can't set up the camera to the site to view construction activities, but I can do this successfully with Windows Explorer 8, following the instructions by clicking on the appropria

    When I try to see the construction of the new Hoover Dam bypass bridge, to do this, you must click the icon (while holding down the CTRL key) on the camera to the site to raise the camera. This will not work with my latest version of Firefox, but I can do this with Microsoft Windows Explorer 8.

    This has happened

    Each time Firefox opened

    Is once installed Firefox recently

    Works for me on Firefox 3.6.6 - hold CTRL and click the Web Cam on the left side of this page - http://www.hooverdambypass.org/ - then hold down the Ctrl key and click the link click here in the pop-up window.

    It crashed Firefox once for me, but after that I have re-opened Firefox it worked fine for 5 minutes that I tried the pan control and saw the cameras the Nevada and Arizona. No Java perspective worked for me also.

  • Need a plan of construction or images of Satellite Pro 6100 for BT / WLAN position

    Hello

    I need a 6100 construction plan or some pictures of the location of the device Bluetooth and WLAN.
    This parts are modifiable or not?
    Because I have bad RTC 6100 with WLAN and Bluetooth and another who works without this two devices so I want to build this parts in the workbook, but I don't know where they are or if it is possible to do.

    Thank you

    Here is the plan for the two, BT and Wireless Lan for the Toshiba 6100
    http://Weller.WS/Toshiba/antenna.html

    The BT card slot is accessible from the bottom of the laptop. (just a screw to lose)... you will see the pink BT antenna wire there, too.

    Internal MiniPCI wifi requires that you remove the keyboard first (two screws covered by plastic on the top of the F1... F12 keys) then open a plastic cover that hides the Mini-PCI card (the location is where would be the "F6" key). It requires a force to remove this plastic cover ;)

    Concerning

    chain

    P.S. All additional cards (BT and WiFi) are sensitive parts of static electricity. If you plan to trade on your own, take the necessary precautions. If you are not familiar with this, please consult your nearest Toshiba service.

  • In construction to be shipped the time

    Can then someone tell me what is on average the time of under construction to the navigation? I received the email "under construction" Wednesday afternoon but have yet to hear anything else. I just hope someone has an idea that they could share.

    Time to call Motorola Customer Service and ask them to check the order number on the top of page 1 of your email in order to Motorola.

  • How to use an external webcam instead of the construction in the Sat A215-4757

    I would like to connect a webcam Genius instead of building behind closed doors to get better angles to capture. Could intall gentle Genius, but images still come from the construction in camera. Tried to disable built in camera but activate camera Genius, but no image has been shown.

    Please any help, thanks.

    Edgardo, buenos aires

    Hello

    What applications do you use to use the other external webcam?
    Generally, if more then one device has been installed, you must choose and activate the right one.
    The same phenomenon occurs if multiple printers are installed on the OS. You must first enable one and assign it as the default value.

    Check if you can mark your external webcam installed as default webcam.

  • Has been approved - has blocked for now, and then unlocked - no more shows. RSS feed problem or what?

    See you soon,.

    I was in the last phase of the construction of my podcast site (http://fontoradio.fi).
    I wanted to send to iTunes in advance to make sure I can get it out here too, as soon as I publish my Web site.

    Everything went very well: my podcast has been approved, and the iTunes search tool found, with two episodes of test I had included in the RSS feeds (real episodes that are intended to be implemented later). Then, I wanted to make sure that nobody'd, as I had already begun Fonto Radio talking to friends etc.

    I published a new RSS feed (using the app charger), with ' block in iTunes: Yes "and behold, my podcast do not appear in iTunes. Excellent!

    After completing the site, I've made a new RSS yet, with ' block in iTunes: No. That was five days ago.
    Fonto Radio can not always be found on iTunes.

    Well if I choose 'send the podcast' drop iTunes and paste the feed URL (http://fontoradio.fi/FontoRadio.xmlhttp://fontoradio.fi/FontoRadio.xmlhttp://fontoradio.fi/FontoRadio.xmlhttp://fontoradio.fi/FontoRadio.xmlhttp://fontoradio.fi/FontoRadio.xmlhttp://fontoradio.fi/FontoRadio.xml) in the box, he gets up and I can listen to the trailer, the only published point/episode.

    What do you think of that cause?

    Thanks for any informed guesses or made in advance.
    Best,

    City

    The store normally does not accept feeds with episodes of test, so it is possible that you have been deleted for that reason - when you said it was available, it was in the iTunes Store, not only in the iTunes application? Have you received an email of acceptance by giving you the iTunes Store page? If it has been removed you should have received an e-mail saying so - check your spam trap.

    There is another question - your image podcast is too large to 3 889 x 3, 889px and 2.5 MB. With this image, I am surprised that you have been accepted in the first place.

    If you need create a new image, 1400 x 1400 minimum and maximum 3000 x 3000 and less than 500 KB. Then you need at least a good episode in the power supply.

    Then try to submit to https://phobos.apple.com/WebObjects/MZFinance.woa/wa/publishPodcast . If you receive a message saying that it's already been submitted you could try to change the name a bit (you can change it back once accepted).

    Otherwise, go to https://itunespodcasts.zendesk.com/hc/en-us/requests/new and click on the triangle to the right of the field "Choose a topic" - select "Reactivate feed" and proceed from there.

  • dynamic distribution and an order for various devices of construction

    I have a code that is written on a device. The device will be changed, but perform the same basic (frequency setting, power etc) commands. So, I wrote a dynamic dispatch VI that takes a command string predefined and written to the appropriate device based on what communication mechanism is used (SNMP, VISA, etc.). My question is related to the predefined command string that feeds this VI. I think that the creation of the chain of command VI should also be dynamic distribution and should build the command appropriate for the given device. But some devices might have several parameters required for the construction of this string (for example, snmp) and something like VISA may not be only one parameter. Dynamic distribution screw must have the same connector components, so what is the best way to handle this? I thought about having a class of 'settings' in the connector pane that holds all the specific parameters for a device. But it seems exaggerated to make a class for something like this, when a variant would do the trick as input. However, having a variant as it tends to make me think of distribution dynamic is not necessarily the right choice in the first place because you force a similar connector component.

    I also consider if some necessary inputs are, in fact, the State of the object and that it could be found in the object itself. This would reduce the connector pane entries and can mitigate some of these problems all together.

    Thoughts?

    for (imstuck) wrote:

    I also consider if some necessary inputs are, in fact, the State of the object and that it could be found in the object itself. This would reduce the connector pane entries and can mitigate some of these problems all together.

    That's what I'd do. Make settings of the object data, so when you then call the function to generate the dynamic distribution VI command string has all the right data available to it.

  • Change to error in the export file in the order of the elements in the array of construction

    Hello world

    Some time ago I wrote a vi file that performs the following operations:

    As a first step, it initializes a camera and chooses a region of interest (ROI). Data on the return on investment will be eliminated.

    Then he raster scan engine stage in x and y axis, in bidirectional mode (meaning that x alternating between sweeping left to right and from right to left as is inreased).

    For each point of the analysis, the spectrum is collected, which is then integrated into lambda to give an idea of the total intensity.

    Then the intensity is plotted, as well as the spectrum at each point.

    The final results are exported to a text file.

    The problem:

    If I reverse the order of the son in the 'build' table prior to exporting the file, place the Total Count (intensity) wire instead of thread of the spectrum, the export file fails. By "fails", I mean it's the .txt file contains characters that resemble Chinese!

    Why is this?

    I enclose my .vi, as well as two screenshots that show the problem.

    Hooovahh wrote:

    Such a small change, should not have such a strange result.  I advise to use some debugging tools like highlight the enforcement tools, probe and breakpoint to see what data is when it runs.

    http://www.NI.com/gettingstarted/labviewbasics/debug.htm

    The Source is in 2011.  I see an opportunity and a potential work around certain things to try.

    1. take the following steps

    • Select each stacked sequence right click and "convert flat sequence.

    • Select each flat sequence and delete the sequence

    It could simply fix it by itself you want to turn auto-growth on surrounding structures

    2 allows to observe the data in the table build

    • For all wires that are sgl heading construction table insert a dbl and a copy of Allways

    What I suspect LabVIEW is incorrectly re-use of buffers for the inhabitants of sequence

  • RT construction specifications: category of component definition does not

    Hello

    I use LabVIEW 2013 SP1 f2, with real-time 13.0.1

    When I open the properties page of a build specification Application in real-time (to run on a cRIO-9075) and select the category of component definition, I find that the following occur:

    -LabVIEW unresponsive and think for a while. It takes about 20-30 seconds to finally display the component definition page.

    -When I click on create a component definition file (.cdf), nothing happens. As I write this, I see 'required software components', and then they are grayed out: "The software component Description" and "Software version" - but there is nothing to choose or change?

    -If I click on another category, it takes in the order of 20 seconds to finally see the establishment of this category.

    -To close the build specification (press OK), it also takes a long time (more than 60 seconds).

    -Things are fine with the construction specifications if I ever fall into the category of component definition.

    Everyone knows this?

    Any help would be appreciated.

    Hey Chris,

    I believe that the next patch is the solution you're looking for.

    LabVIEW Real-time Module 2013 SP1 Application Builder Patch details

    http://digital.NI.com/public.nsf/allkb/D72B45C6905D327A86257CC800547992?OpenDocument

    There is a link to download the patch at the bottom of this page.

    Kind regards

    Ryan

  • Toshiba not gave me no CD of restoration of my laptop, its construction?

    How do you want that I reformat my drive hard evryonce in awhile, if I put t have a CD.../.this is the last toshiba I'll NEVER BUY... WHAT A PIECE OF JUNK THIS NOTEBOOK IS...! AND THEN TRY TO DO FIX IT, SEEMS LIKE EVERYONE WHO FIXED MY COMPUTOR * IT UP MORE? SO MY QUESTION IS... IS there LINK I CAN CLICK on GET STARTED IN REFORMATER MY COMPUTER PORTABLE OR WHAT...? NOTHING BUT B.S.OUT HERE

    Original title: Toshiba models, not gave me no CD of restoration of my laptop, its construction. ??? Bull!

    On Saturday, July 7, 2012 21:49:30 + 0000, johnweisdorn wrote:

    How do you than me

    Me? How I reach you...?

    I don't expect you to do anything. Apparently, you think that it is
    Microsoft please you, but it's not.
    It is a forum for peer support. We're just all users of this version of
    Windows here, help each other if and when we can. We are not
    Microsoft employees (not even those of us with 'Microsoft MVP' behind)
    our names; It is an honorary title for having consistently provided
    useful tips) other than a casual employee.

    If you want to complain about something to Microsoft, please contact
    them directly. Try to do here is just a waste of (figuratively)
    breath.

    to reformat my drive hard evryonce in awhile

    I mostly do not expect to do you this, because as far as I am
    concerned, it is a very bad thing to do.

    If I have a CD.../.this is the last toshiba I will NEVER

    Almost every computer brand these days it comes with no CD or DVD.
    Instead it lights with a partition recovery and instructions
    How to burn the content of this partition on a CD or a DVD. This is one
    of the most important things that you should do (fear that the crash of your drive)
    before you do), and it should be one of the first things that you do
    When you get to the computer.

    Oh, did not read the instructions? Sigh.

    There is nothing special about Toshiba in this regard. Almost every
    Manufacturer does exactly the same thing.

    BUY... WHAT A PIECE OF JUNK THIS NOTEBOOK IS...! AND THEN TRY OF the DO REPAIR, SEEMS LIKE all the WORLD WHO FIXED MY COMPUTOR * IT UP MORE? SO MY QUESTION IS... IS there LINK I CAN CLICK on GET STARTED IN REFORMATER MY COMPUTER PORTABLE OR WHAT...? NOTHING BUT B.S.OUT HERE

    Ouch! Please do not yell at us. We can hear you if you type normally,
    in different cases.
    Ken Blake, Microsoft MVP

Maybe you are looking for