Labview State machines Edit Items

Iam using a state machines, Iam having a problem with updating new items in the state machines..
What happens when I right click on the enum attached to the shift register and try to add new item to it..
the cases change to numbers istead of actual choices..
what can I do to fix this.
Thanks

R U Sure 
I can do it 
Thanks & Regards,
Kunal Raithatha.
CTD - CLAD (I wish I can take off that A, and maybe use it later to replace D :-)
Easy Tip :- "To copy an image to a VI icon, drag the image file and place it on the icon
located in the upper right corner of the front panel or block diagram" ...If you know any
more reply back.
Attachments:
SK0480.vi ‏5 KB

Similar Messages

  • How do you create array of enums for transitions in a state machine?

    Hello,
    I am trying to build a state machine, but, I am struggling with understanding the methods for determining which state to transition to next.  In other words, I have several states, but, I don't want to go in any particular sequence.  If I have states numbered 1 through 10, I want to be able to go 1-4-2-5-6-2-6-1-10 etc. in no particular order. I want the transition to the next state  (and actions) to be determined by the streaming data, which can be random and require access to any of my 10 states at any time and in any sequence.
    I saw this picture on the "Application Design Patterns: State Machines" white paper, but, it leaves out some important details.  How does one create the structure in BLUE shown in 3C?  When I try to create this array of enums, all of them are the same. I am not able to make a list of different enum values.  In other words, when I type in "2", then, all the values in the array display as "2."
    There is a nice, simple video example of a state machine for dispensing soda for $0.15, however, this state machine moves in a single sequence, from 5 cents, to 10 cents to dispense; it does NOT illustrate how to select a state "out of order."  I need to understand how a state machine can move from "5 cents" state to dispense directly, with the addition of 10 cents to the "5 cents" state.
    Can anyone suggest a really good tutorial on how to make the selector work in a state machine?  I have been reading some of the available material on ni.com, but, I can't find a good detailed explanation of how to do it.  I remain confused. 
    Or, can you just explain how they created the BLUE array in the attached picture?  Maybe I can figure it out from there.
    Thanks,
    Dave
    Solved!
    Go to Solution.
    Attachments:
    next state.jpg ‏75 KB

    Hi Kathryn,
    Yes, this is EXACTLY what I want to accomplish...
    So it would basically run:
    State 1
    Read input
    Determine next state (say 3)
    State 3
    Read input
    Determine next state
    State
    Read input
    Determine next state
    And so on...
    But, I am quite new to programming Labview state machines, and can't figure out how to even start when the sequence of states is random instead of fixed!!! I can do 1,2,3,4, like the vending machine VI example, but,  not 1,3,2,2,2,5,2,1 etc. based on external input.  Is there some simple example case I can study?  I can't believe I am inventing this for the first time.
    "select the state to run" 
    But, HOW do I do this???????   This is exactly the question I am asking...how is this done?  Please see the attached 3-state system....how do I hook this up????  I am totally lost here...can you help me understand how to wire this thing??  In this simpe RED/GREEN/BLUE case, my input is just the number a user would input on the front panel....  Apparently, there are two files necessary... a vi and .ctl???  What  is .ctl?
    Thanks,
    Dave
    Attachments:
    forum nov 12 red green blue.vi ‏7 KB
    forum nov 12 red green blue.ctl ‏5 KB

  • How to do state machine using events .

    Hi all.
    i like to create a state machine using events methos .
    i have 4 functions 1,2,3,4. (event based functios) (seperate sub vis)
    1.i will trigger the 1 function.
    then end of the first function should trigger the next function.
    like state machine .
    how to create this method in labview .. i tried value signaling its still not working . what i want.
    Solved!
    Go to Solution.

    JGar wrote:
    Wouldn't it make sense to have the entire state machine within one event case?  When you trigger the event case the state machine then executes like a normal state machine.
    DO NOT DO THAT!!!!!!  Long parts of code do NOT belong inside of an event case.
    The Event Structure should be in its own state and the state machine should to to that state every once in awhile to check for user events.
    Alternatively, you could put just the state case structure inside of the Timeout event case.  Something like this: http://www.notatamelion.com/2015/03/02/building-a-proper-labview-state-machine-design-pattern-pt-2/
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • New LabHSM Toolkit - Agile development of complex event-driven maintainable LabVIEW applications with active objects / actors based on a universal Hierarchical State Machine / statechart template.

    Dear Fellow LabVIEW programmers:
    Most of the systems you deal with are reactive. It means that their
    primary function is constant interaction with their environment by
    sending and receiving events. But most likely, they can have something
    happening inside them too, even when they are not processing messages
    received from outside. So, such systems have to continuosly react to
    external and internal stimuli. Right? Moreover, most likely, they
    consist of subsystems that are reactive too and, in turn, can have
    their own "life", to an extent independent from other parts (with
    which they still communicate, of course). Reactive (event-driven)
    systems are more naturally modeled with active objects. So, why then
    should we try to model and code them with GOOP and its passive
    ("dead"!) objects?
    "Flat" State Machines have been known for decades to have severe
    limitations. It's been more than 20 years since Dr. Harel invented
    Hierarchical State Machines (statecharts) to fight those limitations.
    Then why does NI still tout the same old good Moore FSM as the
    ultimate tool for event-driven programming in LabVIEW in its $995
    State Diagram KIt?
    The LabHSM toolkit we are happy to present, makes it possible to
    easily create and then maintain complex event-driven applications in
    LabVIEW as a collection of HSM-driven active object VIs using a higher
    level of abstraction and agile software development methodologies.
    These active object VIs are created based on a universal Hierarchical
    State Machine ( HSM or statechart ) template. So. all your code looks
    similar regardless of its functionality!
    We all love just jump to code, right? However, to be good boys, we
    need to do design first. Then implement it in code. If the logic is
    modified we need to redo the design first and then redo the code. When
    using LabHSM where behavior information is abstracted into a separate
    HSM data file editable with a supplied editor, there is no need for
    coding separate from design any more. The modified behavior becomes
    code automatically as soon as the HSM file is saved. Design is code!
    The implementation basically follows Dr. Samek's Quantum Programming
    paradigm. (see http://www.quantum-leaps.com). However, as already
    mentioned, LabHSM stores the behavior information in a file separate
    from the code itself. It also adds state dependent priorities to
    events, a separate queue for public events/messages, and, of course,
    some LabVIEW specific code like capturing front panel user events and
    putting them into the private Events queue. Communication and
    instantiation functions are also rather specific for LabVIEW.
    It is available for UNLIMITED PERIOD trial. Please visit
    http://www.labhsm.com for details and download. The site also contains
    references which you may want to check to learn more about
    hierarchical state machines and active object computing.
    Since this is our debut we will appreciate any comments and
    suggestions. Our contact information is available on our site, of
    course.
    Have a G'day!

    Symtx is currently hiring the following position. Please contact me if interested.
    Amy Cable
    Symtx, HR
    [email protected]
    Symtx, the leading supplier of functional test equipment, hires the brightest & most talented engineering professionals to design & manufacture complex custom electronic systems for advanced technology leaders in the defense, aerospace, communications, medical, transportation & semiconductor industries. Symtx’ challenging & dynamic work environment seeks to fill openings with highly qualified electronic engineering design professionals.The ideal candidate will be responsible for defining the requirements, software design and code development, and integration of test control software for custom functional test systems. Candidate should be familiar with data acquisition concepts, instrument control, complex test, measurement and calibration algorithm development and definition and implementation of control interfaces to hardware. Prefer familiarity with instrument control via GPIB, VXI, MXI, RS-232 desirable. Requires BS/MSEE and 3 -7+ yrs of experience in one or several of the following test applications in a Windows NT/2000/XP environment using Labwindows CVI, TestStand, Labview, Visual Basic, C++ and knowledge of RF systems is a plus. Job responsibilities will include software design, development, integration, team leadership, and interfacing with customers( includes PDR’s & CDR’s).

  • Add an item to all state machine constants

    I have a state machine using an enum for the state indicator.  In
    the current state, the next state is indicated by an enum
    constant.  If I want to add a state, how can I update all of the
    constants?  Here is the problem.  If I add (or delete) an
    item in the selector of the case structure, it is red because the enum
    constants do not have that value in them.  Conversely, if I add an
    item to one of the constants I can "Add case for every value" and add
    it to the seletor, but then I have to manually add that item to each of
    the other constants.  Also, the way I usually create the constants
    is to pop-up on the exit tunnel for the enum in the case structure and
    "Create constant".  Unfortunately, that tunnel retains the choices
    of the old enum and the new choice must be manually added.  Is
    there any way around this?  I would like a method that allows me
    to add or delete choices at will and have all of the constants
    automatically update to match.
    Roy

    Well LabVIEW has just what you need in the "type def"! The next time you create a enum, right click on it, select create a control go to the front panel, right click on the control and select "Advanced" and then "Customize" to enter the control editor (if you have selected in your front panel "tools", "options", "front panel", "open the control editor with a double click", you can ust double click on the control to enter the control editor). In the control editor you will see a toolbar pull down with the "Control" option. If you pull it down and change to "Type Def" you can modify the control and all copies of it will now get automatically updated, including constants created from the type definition. The strict type def controls the look of the control as well, so it is most often used to make sure that operator interface instances of a control look the same. When you save this new type def it should ask you whether to update all instances, which will update the original control , you will have to go back and make a constant from the new control type to replace that original one, but now every copy made from that one will update when you update the type definition, and you can do that from the constant on the diagram by right clicking and selecting "open type def".
    P.M.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • LabVIEW Queued State Machine as Parellel Process Enabler

    Hi
    LabVIEWs Queued State Machine Architecture is a detailed article on its application for parallel process programming geared to take advantage of LabVIEWs hyperthreading capabilities and multi-core processor PCs of today.
    I am writing future book chapters as blog articles so your critique/comments are appreciated.
    Anthony L.

    I have really enjoyed the articles on ExpressionFlow.  I also like this one, but I think it could use just a little work.  I think that the content is good.  However, about 1/4 of the way down, you have:
    A general layout of QSM-PC architecture comprises of the four objects annotated by the encircled numerals 1 to 4 shown in Figure 1.
    These objects are namely: (1) Queue reference object; (2) User events
    object (optional for head-less embedded applications that require no
    user interaction); (3) Main state machine object; (4) One or more
    parallel processes subVI objects.
    You then go on to have
    Item (1) The Queue Reference
    Item (2) Consumer Object State Machine
    Item (4) Parallel Process SubVIs
    You need to reconcile the two.  I think that a separate (probably earlier??) chapter/article on event structures including dynamic (user) events could be referenced as item 2.
    Thanks for the articles and I hope that this helps!
    Bob Young
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

  • Create Multiple tasks for Single Item in List using state machine workflow in sharepoint

    Hi,
    I want to create multiple create tasks for Single Item in List based on Assigned to column using state machine Workflow through visual studio
    Here Assigned to column allows multiple users. so i have to create task for every user based on column .
    I'm trying for this but i didn't got any solution
    Please provide solution for this.

    Hi,
    According to your post, my understanding is that you wanted to allow multiple users to approve.
    There are some articles about creating parallel tasks in state machine workflow, you can have a look at them.
    http://www.codeproject.com/Articles/477849/Create-Parallel-Task-in-State-Machine-Workflow-in
    http://msdn.microsoft.com/en-us/library/office/hh128697(v=office.14).aspx
    http://social.technet.microsoft.com/Forums/office/en-US/b16ee858-4360-479a-a686-4ee35b7be9db/sharepoint-2010-workflow-creating-multiple-tasks?forum=sharepointdevelopmentprevious
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Unable to install the State Machine Toolkit in LabView 8.2

    I am in the process of upgrading my version of LabView to 8.2.
    I have the State Machine Toolkit working (well) on 8.0.1.  I am attempting to install it in 8.2, but I have not had much success.
    I can view a State Machine diagram in 8.2, but do not have the function in the palette to create one.
    Any ideas ???
    Thanks,
    Chris.

    It is a PAIN but it works.
    http://digital.ni.com/public.nsf/allkb/58be852cb35237c786256a290079df39
    Matthew Fitzsimons
    Certified LabVIEW Architect
    LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison

  • How can A state machine be used to monitor flow from a micro motion using bridgeview/labview

    I want to be able to use a state machine to monitor if the flow stops during a chemical charge. Currently I am using labview 5.0 and this monitors flow but I need an alarm to let me know if flow stops during a charge. Any suggestions?

    this example might explain what i meant.
    A Rafiq
    Attachments:
    statemon.vi ‏55 KB

  • Data acquisition in a state machine

    I've recently learned how to implement state machines, but I have a question that I haven't been able to find an aswer to.
    Question:
    How do I record uninterupted data (presently i'm using the DAQ assistant to record a single channel at 10kS/s at 1kS intervals) without interfering with my state machine?  
    Background:
    I have a time sensitive test setup (measuring pressure in a rocket chamber), and I'm using labview to both record a single pressure transducer as well as operate the valves (O2, N2, igniter, etc).  I'm using a state machine Labview architecture (just learned how).  Presently, the DAQ assistant sits in the "Idle" state, and timers (valves need to be turned on at specific times) and manual buttons control when the other states are activated.  I have a 10ms timer controlling how often each state is run, and this is the root of my concern.  
    Main concerns:
    I'm worried that:
    1)  I'm forced to change my data recording to 10ms intervals to match the 10ms timer, and
    2)  The 10ms timer will interrupt my data recording when it's in another state.  
    It's very important that the pressure data is recorded without interruption but that I have high time resolution in controlling my valves as well.
    Thoughts:
    1)  Maybe I put the 10ms timer in the "Idle" state only, and this way the other states won't interrupt the data acqusition
    2)  Maybe there is a way to completely isolate the state machine for controlling the valves and the data acqusition.  I'm not sure how to do this.
    3)  People on the forums have been talking about Queuing their data acqusition, but I'm not sure how this would benefit my situation.  
    Thanks to everyone for their feedback!

    The data acquisition and state machine timer do not have to be equal, you should however have the same data write rate as you have data read rate, otherwise over the course of long running programs you can build up a large buffer of data to be written using a lot of memory, or lose data.
    Your data acquisition should be continuous, the most common way of doing this is every time you receive data write it to a queue, then when you are in other states except your data write stage you simply build up data in the queue that is to be written when you enter the write state again.
    Think of it as traffic reaching a set of lights:
    The traffic represents the data acquisition, there is a constant flow of it always coming through, the state of your state machine is the lights, green is the data write state clearing the queue, red is when in any other state, letting the traffic build up behind the lights.
    It is just important that the light is green long enough to let the traffic not build up too much, otherwise you have a jam.
    EDIT: For the basics of how queues work, look at the Queue basics example from the example finder. 

  • Handling menu selection in multi states of states machine

    Hi everyone,
    My application uses states machine architecture, I have to handle menu selection in two different states and the 2nd of them has to be handled by the event case structure.
    The problem is that when I use event structure in the 1st state it is also handled later by the event case in the 2nd state and it is impossible to handle menu selection in the 1st state by the "Get Menu Selection" block because according to it's descripton if event structure is configured to handle the same menu as item as this block, LabVIEW ignores this function.
    I would be greatful for any clue.
    Greetings,
    Mariusz
    Solved!
    Go to Solution.

    Thanks for respond.
    Here's a code explaining the main idea.
    Attachments:
    Untitled 1.vi ‏9 KB
    Enum_States.ctl ‏5 KB

  • Simple State Machine Vs Queued State Machine

    Using LV2009 + WIN7+Pentium 4 @ 2.5Ghz with 3 GB RAM.
    I have a machine control code inside a 10mS main loop that has 7 ( yes seven ) Queued State Machines (  QSM) and I find the  Finished Late boolen keeeps poppping often. Not a very good sign if you ask me.
    And the code itself does not have too much of computation or FP activity. But it has four Graphs with one plot on each of them. These are updated once every 10ms. Can slowing this update ( say once every 250ms ? ) help ? 
    A simple query : In terms of performance overhead, does a QSM  demand more than a  Simple State Machine ( SSM ) ? Can I avoid the Finished Late warning by switching over to SSM at least in three of the cases out of the seven ?
    Thanks 
    Raghunathan
    LV2012 to Automate Hydraulic Test rigs.

    I think your question demonstrates my point.  Unfortunately, I don't have a good example to point you to and don't have the time to write one.  I will try to explain better.  Let's take a simple example - a landscape watering controller (sprinkler controller).  This controller will have several states (e.g. initializing, waiting, watering, closing). Each of these states will accept several commands, but not all commands are accepted in all states.  For example, if the system is watering, a command to start watering could be ignored.
    In most programs, at least some states should be interruptible.  For example, if it starts to rain, the watering system should stop watering immediately instead of watering for a set length of time.  However, if the system is in the initialization state, this will probably not be interruptible (but also short).
    As you said, the classic LabVIEW way to implement such a thing is to have a case statement to represent the state, and a case statement (usually queue driven) in each state frame to handle the commands.  You thus have a loop with a double case structure.  This can get somewhat unwieldy for large programs.  Note that which case structure represents what will be determined by the relative number of each item. For example, if you have fifty commands and three states, the state should go into the command case.
    So how do LabVIEW classes help?  They can eliminate one or both levels of these case structures through the use of dynamic dispatch.  This is done as follows.  A parent class is created that is a generic command.  It has commands for each state.  For each actual command, a class is derived from the parent class.  There are VIs in the specific command class for each state.  A command is generated by creating the correct object for the current state, then calling the parent class command.  Dynamic dispatch will execute the code for the correct command.  The command execution loop is then reduced to a single command VI which dynamically dispatches based on the actual command and the current state.
    In practice, things as usually not quite this simple, and you may want different cases for either different commands or different states so that you can change the connector pane of the dynamically dispatched VI as needed.  Look up the LabVIEW examples on dynamic dispatch to see this in action.
    I am afraid I have still not made myself clear.  Keep asking questions and I will try to keep answering.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Other events interfere with abort for state machine started by an event

    In the attached VI there is a state machine that is triggered by a boolean “start” change event.  There is also a boolean “stop” that stop the state machine, a numeric “voltage” that has an event handler and a boolean “exit” that has an event handler.
    The stop button works as expected unless if the voltage value is changed before the stop button is pressed.  I was thinking this might be because there is an event for the voltage value change but there is also an event for the exit button value change and the problem does not occur if the exit button is pressed before stop.
    If anyone could explain the reason I am only running into the problem with the voltage value change and/or how to properly implement the stop/abort function I would appreciate it!
    Thanks,
    Dave (LabVIEW 7.1)

    Well that certainly solves the problem I was having!  The case in a while in a case in a while reminds me of the 10-level deep if statements I used to end up when starting C programming.  I guess the inner case/while are required for the state machine and the outer while is required for the Producer / Consumer.  I always find myself thinking in terms of "if/then" statements and the case/comparison took the place of that. 
    Regardless, problem solved.  If anyone has tips on how to make it (attached) look better, please post them!
    Lynn, I wasn't quite sure about your instructions on passing the exit and stop commands through the queue.  I went with the idea of keeping the long-running loop separate.  I know I still have a bit more to work out such as use of exit button while state machine is running, and the stop button only works in between state machine iterations.
    Message Edited by davey31415 on 11-27-2006 07:04 PM
    Attachments:
    PowerfoldMeasStat.vi ‏158 KB

  • Performance of state machine with enum vs string?

    I am laying out the groundwork for a very large state machine. It will have about 60 to 100 states. I kind of want to use an enum for selecting the states for convenience. But then if I use a string I can use Jim Carmody's case select tool so that wins out in convenience in one respect.
    One concern about using a string is performance. Since an enum is just an integer wouldn't the selections perform better? I need to squeeze out every ounce of performance and in fact this state machine will be set for subroutine priority. Another concern that I have about a typedef enum is that I have heard something about the possibility of them getting "out of sync" between VIs when you edit them. Is there some way to avoid that, such as making sure all VIs that use this typedef are in memory when editing it?
    =====================
    LabVIEW 2012

    Steve Chandler wrote:
    As for the number of states, I am pretty sure that it has to be one state machine. I'm afraid I cannot give a lot of details.
    I am having trouble figuring out the "has to" part.
    See this thread for designs I have posted previously.
    In this SM
    please look the section that is entered from "Change Request 8 " can take multiple paths but all ends at "Stop Monitoring? 15". I could have implemented that as a sub-SM and it would have reduced the number of state required for that part of the work from five to one.
    Any time I see "single entry, fan out, merge" I think sub-SM.
    This could also help with your shift register as well because (again seea bove) the bulk of the ose states deal with Logging so rather than use a SR, put what would have been in the SR (file path or ref) to be used there OR possibly an AE that can be used in each of those states.
    So I still don't understand why sub-SM aren't a possiblity.
    Trying to help,
    Ben 
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Queued State Machine, not a state machine?

    I've been reading up a bit on design patterns that seem popular among LabVIEW users, and I have a question with regards to the design pattern described in the following article:
    http://expressionflow.com/2007/10/01/labview-queued-state-machine-architecture/
    I don't see how this is a state machine at all. To me it just looks like a producer/consumer pattern for queuing up actions (what is described in the article as states) to be executed in the consumer loop. I don't see where a state machine comes into play, determining state transitions based on current state and inputs, like shown in the following:
    http://zone.ni.com/devzone/cda/tut/p/id/3024
    Am I completely off?

    Yeah exactly.
    I was thinking a nice way to implement something QSM-like would be to produce instances of a message handler object that maintains its own state and a message queue. You could produce a new object for network I/O that inherits from the general message handler, one for managing the UI, data aquisition etc. They would communicate in a network by passing messages back and forth to their respective queues and each would be a true implementation of a state machine.
    Has to be right up LabVIEW's visual alley
    Edit:
    Now that I come to think of it, this would be almost exactly what could be done compactly with LabVIEW event handlers and user-generated events.

Maybe you are looking for

  • Training and Event Management_Winword Not displaying

    Dear Friends When i try to print an attendance list, i am not able to export the attendance list to a word document. The reason being, i am not able to see the Winword display in the top of the report.  Kindly help and do let me know the setting so t

  • Com.sap.security.core.ume.service failed. J2EE Engine cannot be started

    Hi, I have configured SNC on NetWeaver 7.0 (ABAP+JAVA) System on Windows 2003 Server with MS-SQL 2005 Database. After the SNC configuration restarted the Server but the JAVA Server process is going down with EXIT Code -11113. The SNC Configuration is

  • This Computer is not authorized to play "". Would you like to authorize it=

    Is what itunes is saying to me everytime I try to play a song I just bought. I then go to authorize it with my other email address and it says authorization successful! You have authorized a total number of 1 machines out of your available 5. So I hi

  • Integration Engine Issue - PI 7.0 !!

    Hi Experts, In sandbox we have 2 clients 020 and 030 . We have configured 030 as PI integration engine . We ran couple of scenarios . It worked fine . For configuring alerts i made few changes in Exchnage profile and instance profile . In exchnage Pr

  • How to set lowercase/uppercase checkbox in function module/RFC

    Hi2All I m importing username and id in a RFC. i want this username as it is when we pass it in function module. if we set the check box lowercase/uppercase option when executing function module, it will keep all input as it is (means will not conver