Tips to remember when using the state machine in queue

I was able to work through the convert my architecture of State Machine for a BAU, thus eliminating the use of nodes of property/local variables to send data values to my machine of the State, but rather to send through queues.

I would like some advice/tips on taking to serve perfectly. Especially, "is not to make" things with queues and how to effectively release a queue, etc.. What is the convention when using queues? Thank you!

V


Tags: NI Software

Similar Questions

  • Question of copy/move when using the VMware Machine by more than an operating system

    My Mac Pro runs like a machine triple boot with Ubuntu 10.04, OS X 10.6 and Windows 7. I use my virtual machines in OS X (VMware Fusion) and Ubuntu 10.04 (VMware Player).

    When you start a virtual machine, that I always wonder if the machine has been copied or moved. An insider tip to avoid this? It is not really a biggie but well anyway.

    Thanks a bunch for reading my post.

    A.

    You just need to insert uuid.action = 'keep' in the vmx file.

    See http://kb.vmware.com/kb/1541

    André

  • Use the state machine to fill cluster

    Hello

    I am trying to create a state machine that is running two States, each State has two items up to a Bundle function and in the cluster. I want the two elements of the State first across, then the second State should run and pass the last two items. Currently, I get only the data of the final State. I have one the vi attached.

    Thank you

    Chris

    You don't actually have a state machine.  What you have is a simple loop, and nothing of what is happening in the previous iterations of the loop is spent in later iterations.

    You must create the cluster in the loop itself and maintatin into a shift register.  Use the bundle by name to update the respective elements of the cluster in each picture of the structure of the case.

  • Race conditions manifested in the state machine in queue

    Hello

    I ' am developing a vi in which I use a design of producer-consumer model.
    the producer s enqueue States for the consumer. but at a certain point in execution of I want to enqueue the next state of the statemachine consumer, within the State of the consumer himself. This causes a problem?
    in other words I have given queue in the loop of consumer can also. so the man the next state of consumers will depend on the data in queue

    Thank you

    I make extensive use of Handleres of Message queue where the "producer" and the consumer enqueue for the same queue.

    A "Firinstance" of work today: here are two screenshots of a part of the same code

    The top loop controls the State of a semi autonomous process where data is collected.

    1. an event is detected, triggering the start of the measuring cycle
    2. Data are being gathered
    3. Another event tells the top loop that it's time to stop collecting data and "Analize" is sent to the end opposite to the consumer
    4. The buffer empty analize, formats the data and continues to the State of "Log".

    The thing to remember is to use a priority queue.  Enqueue to place free and flush properly, in front of end control.  See also 'A trip to Grandma's House'.

    It is a very powerful technique for applications where you want abstract on the 'what' and 'When' the how and just leave a "do".

    And Yes, if I had chosen a unrestricted data (string, var) rather than an enum type and built the lower loop as a child class, you have a "player".

  • State machine in queue

    Hello

    I use a State Machine in queue which is controlled by a Structure of the event. In this example, the State Machine has 3 cases: inactive, State 1 and State 2.

    I need to trigger execution of State 2, in the Interior of the State 1.

    Thank you

    Dan07


  • For the State Machine logic makes me Mad, ideas?

    Hello

    I am a complete newbie to Labview and up to the help of kind people on the forum and tutorials tips, State where I implement a state machine.  However, I can't it behave using logic.

    What I try to do is to test the relay using an automated test procedure.

    The procedure takes the following measures:

    1. a card reader and transistor NI9472 DO turns the relay power via the power of the coil (needs of the variable time period). (It's OK)

    2. account of how can cycles the relay contacts worked, it will easily exceed 100,000 cycles. (It's OK)

    3. every 10 cycles (new variables), the contacts are held closed, load circuit "15A in the state machine" (the current relay is switching, which will be 15 a at 30V) is turned off.

    4. While the State of 15A is off, I need to switch to 'State of 1' and the 'State of the measure' , that it allows the measure to take.

    5. Finally, the "State measure and the"State of A 1"must be turned off and the"15A State switched back on .

    6. this process continues for another 10 cycles and repeats.

    I tried to do by using the States and the logical selection function for different States, where she part works, it does not seem to flow completely.  I'm I missing logic.

    Hoping someone may be able to help, thanks

    Andy

    I really didn't thing you want to be returning this Boolean value in all States.  You should probably also have a different evolution register for each line of output.  Then you simply adjust those that you need to.

  • Need help created the state machine which is based

    I need assistance with my labview program. My goal is to write a program that allows the user to activate a switch. When they do this, it will start a loop witch goes on a digital switch for 45 minutes and then 30 seconds and so on until the user did switch the switch off. The time doesn't have to be precise. I use the NI 9476 digital output card.

    I wrote the code to activate the on/off switch. I know add fuction in loop for 45 minutes a stop 30 seconds. I guess that the most effective method would be to use a state machine, but I struggle to understand.

    The program that I wrote so far without loops is attached.

    Thank you

    Barrett

    I couldn't open your vi because I do not have some of the Subvi.

    Nothing wrong with the first example posted, but I interpreted the specification a little differently.

    Edit: There was a small bug in the first zip file.

  • Engine using a state machine control logic

    Hello

    I'm trying to implement motor control using the logic of the state machine. My requirement is simple. I have a voltage from data acquisition value that corresponds to the couple (initial value = 5). I need my feeding motor a positive (right-hand rotation) and negative (counterclockwise rotation) speed depending on whether the value of this tension is between the top (7 V) and the lower thresholds (3 V).

    In other words, the motor starts to turn in a clockwise direction at the outset; the voltage is declining, as soon as we get to <= 3="" v,="" it="" changes="" direction="" and="" moves="" counterclockwise="" till="" it="" hits="">= 7 V, then changes direction again and this repeatedly for, say user-defined number of cycles. I tried to write this logic, and when I run the program it starts well, is to see the first time, entry happens under a low threshold, changes direction but oscillates at the same position. He won't until > = 7 V.

    I enclose the code for your reference. Logical machine state in queue can be of any help? Also, can I present a State in which after that user-defined cycles are more the engine back to a position where the voltage is 5 V.

    Thank you very much.

    Ravens fan is OK.  You need to know which direction you are moving before deciding what to do comparison.  Look at this simple diagram that shows how to use a shift register to keep track of which direct that you use.

  • Elapsed time delay does that once in the state machine

    Hello.  I have problems using the delay to show the seconds remaining on an expectation not in a simple state machine.  I have a front panel countdown indicating the time remaining for the step.  I thought that the delay of elapsed time was the way to do.  The problem is the vi work correctly the first time.  But then after that the calendar does not seem to reset at the time I had put.  If I remove the delay and just stick a waiting time in the State, the vi is exhausted because I expect.  This is just to give the user an idea of the time remaining.  What I missing when using the passage of time, or it's just the wrong tool for the job?

    A small question, is that I would like to move the tasks, in this case the LED outside of the loop, so I don't have to repeat the code.  But when I tried moving them outside with only allow constants within the State, they do not work as I expected.  If you have tasks such as operating a set of Boolean values that you are used in several States, what is the the cleaner way to do it without repeating the code?

    Thanks for the help.

    See how it works for you.

  • Buttons does not return to the early state in the state machine.

    Hello

    I downloaded a program that is used to back up data. I used a machine to States with different States. State 1 is initialization, where it moves automatically select the State, which allows to select one of the remaining States to copy the data. The selection is made by command buttons. Once u pressed a button, it goes to that respective State and in this state when you press the backup, the backup of data occurs. Once the backup is located the program goes back to the selection state. So far, it works fine. The problem then. Once he returned to the selection state after that copy was made, then none of the buttons are working properly. Then when it goes back to select State and I tried to select a State, nothing happens, not even the stop button works. I don't know why this is happen. Please help me solve this problem. Thanking you in advance.

    You have many States where you have the event structures ("All data" "given more older that '" young data that ' 'Defined Data') (worse there are two of them in "Data set")

    Each of these event structures are for a "Backup" mouse event down.  A singularity is now why you use a mouse event down on a button.  This really should be a value change event.  But this is not the big problem.

    The big problem is that all of these structures events are set to lock the front until the end of the case of the event.  Well, when you click the mouse down on this button, all 4 of these structures tail event this event.  If you are luckly, one of the event will execute and process the event.  Others, that you will never run because the state machine will not get through these cases.)

    You have multiple structures of event you VI and certainly not buried in the event.

    Reading guard and recommendations when using events in LabVIEW

    Then fix your VI architecture.  You must limit the structures of the event or a separate parallel loop, or to a single case of your state machine that your code will frequently return to, without any other user interaction, in order to service the structure of the event.

  • Error message indicating the r300 display driver stopped responding when using the full screen.

    Original title: driver atikmdag error message when using the full screen.

    Error message indicating the display driver r300 unresponsive, but has recovered, usually when enter full screen mode.

    Hi Peterrichardson,

    1. when exactly you get this message?

    2. what player do you use?

    3. you remember to make changes to the computer before this problem?

    Method 1:

    You can try to reduce the hardware acceleration and check.

    a. click the Start button, Control Panel.

    b. now, select appearance and personalization, and under display, select adjust screen resolution.

    c. now, select adjust the resolution.

    d. click Advanced settings.

    e. now, click the Troubleshooting tab, and select the change settings button.

    f. in the Security dialog box, click on continue.

    g. move the hardware acceleration slider to the third notch.

    h. click OK and restart Windows.

     

    Method 2: Update your display driver

    Updated a hardware driver that is not working properly

    Hope this information is useful.

  • Hello! My question is, why so many photoshop is making selection when using the quick selection tool, before that it was unable to myself. Can someone tell me aolucion, please. Thank you!!

    Hello! My question is, why so many photoshop is making selection when using the quick selection tool, before that it was unable to myself. Can someone tell me aolucion, please. Thank you!!

    Hi Axe_Juan,

    Could you please let me know the version of Photoshop installed on your computer?

    Also you want to State as Photoshop not to do a quick selection?

    If so, then head over to the Photoshop preferences, then the performance tab and click on 'Big and flat', restart Photoshop and then use the selection tool.

    If something else, please let me know.

    Kind regards

    Tanuj

  • I a s 6 more and when using the phone, if my face touches the screen it clicks on the logout button and the phone hangs up the call. Is it possible to prevent this without holding the phone away from my face when calling?

    I a s 6 more and when using the phone, if my face touches the screen it clicks on the logout button and the phone hangs up the call. Is it possible to prevent this without holding the phone away from my face when calling?

    iPhones have a proximity sensor which is supposed to automatically turn off the screen when you hold it in your face. If this is not the case you can take the phone and have it checked.

  • I6 fire babysit device when using the internet? any solution?

    I6 fire babysit device when using the internet? any solution?

    Let's define "overheating". If the temperature of the phone reached a dangerous level the phone turns off it to cool down. This phenomenon occur? If this is not the case it is not overheated.

    What is your cell signal? If the signal is low, the phone must increase its power to maintain a connection. This may require as much as 10 times the energy as a strong signal, and the phone gets hot under these conditions. If will also drain the battery very quickly.

  • Satellite A200 - IE7 windows 'restore down' when using the Tracker pad

    Hi, I recently bought a Satellite A200 - 1VO and when using the laptop without a windows mouse explore 'restore down' at random.

    I found a thread on the site of the Internet USER who said that if his past not with a mouse, it may need tracker drivers up-to-date.
    You can also consider its under warranty.
    Any ideas anyone?

    Hello

    It s a bit confused what you´ve writes down. What do you mean exactly, where´s the problem and what you want to tell us when writing:

    > and when using the laptop without a windows mouse explore 'restore down' at random.
    >
    > I found a thread on the site of the Internet USER who said that if his past not with a mouse, it may need tracker drivers up-to-date.

    Whereas it should be, where´s now the problem?

    Please give clear and understandable feedback, then I and other users you could point to the solution.

    THX

Maybe you are looking for