State machines are well... Thanks to you all

Thank you!!!

For several months I struggled to learn how to use LabView, at all... much less efficiently.  With the help of the forum I was finally able to combine a display for our Lab Manager.  It was slow and unresponsive no and completely event-driven and completely unmanageable.  With the help of several key members of the forum (and I'm sure that the wishes of the rest) I learned about the State machines, queues and other good habits.

Within 2 days, I rewrote the project as a state machine and it works beautifully.  It uses a typedef enum for the definitions of the State and a sub.vi for the variable initialization.  The BD is readable, simple, and can be seen on a single screen (almost... have to scroll down a bit to see all error.)

I can't thank you all enough.

Hummer 1


Tags: NI Software

Similar Questions

  • Hello, a few months ago, I joined a CC + adobe stock subscription. I downloaded my first 10 images of the first month and paid the other. The problem is that since the second month, I have not my 10 free photos more... why? Thanks to you all

    Hello, a few months ago, I joined a CC + adobe stock subscription. I downloaded my first 10 images of the first month and paid the other. The problem is that since the second month, I have not my 10 free photos more... why? Thanks to you all

    Hello

    Sorry - I've added the image apply to your account.

    Kind regards

    Bev

  • Save the data of State machine after each iteration, then write all the data at once

    I have trouble finding in the best way to manage data generated by my state machine. Here are the data that it will save:

    * When pressure is set, a set point is returned.

    * When the pressure is set, a reading is taken a multimeter.

    What would be the best way to do this? Would it not be better to store all the data in memory, and then write all the data at once? If so, what would be the best way to do this? I want to use the tool to generate report after have set all the pressures. I joined my current application. Thank you all!


  • PID state machine problem

    Hello.

    I have a problem with my design of State machine and I need help to know what to do.

    I m using a state machine six steps for HVAC test machines. Password-> Idle it down-> Run-> Acquire-> Report--> Shut. Run and acquire the States have PID controls in them (almost identical States) and very fast three-way-valves they´re for the desired control of the temperatures of the water mixture. I m running try to get static values for temperatures and I m satisfied with them, moving to acquire the State to get the data in the report. My problem is that when the race to acquire, PID control outputs from scratch and at that time there static temperatures have disappeared. Worst case is that the tested machine HVAC stops following liquids from bad weather and I start from the beginning.

    Is there a way to tell the PID.vi the release of starting a specific value? In this case, continue to the last value that they released in the State of enforcement?

    I know that scheluding of gain would do (machines would be not closed) but I Don t want to use it because the original problem would still be there.

    Arctic_Fox wrote:

    So PID vi:s remove from the state machine, placing them inside the while loop that surrounds the state machine and leaving all necessary writing DAQmx-functions inside the race and the States Acquire would make corrections on the positions of the valve only on those two States. Right?

    It is a good idea.  I leave the DAQmx functions outside the state machine as well.  If you need to write a fixed value for the outputs when the PID is not running, use the PID that you already have to determine the value to write (output PID or anything else) on/off switch.  In addition, I would make sure the reset of PID entry is true whenever the PID is not running.

  • State machine with acquisition different modes/loops

    Hi all

    I did a machine design to State (as described here) to organize three (mutually exclusive) process / States: idle, measurement of calibration and continuous measurement. Calibration must be performed before measurement, because the result of the calibration is used for measurement. The data entry is a camera that should run continuously, also in rest mode.

    The problem however is that this state of calibration and continuous measurement (should) have another method of data acquisition. The measure is continuous and the images are processed in real time. To calibrate a number N of images should be accumulated and treated (simply create a background image).

    In the state machine as I have now (see attached image), I have the acquisition of vision outside the state machine in order to have a live view at any time. The problem now is that the inner loop in the State of calibration (the loop that must accumulate the framework) accumulates of course that the first framework N times, it is not question for all new managers during this State.

    Of course, I could fix this with an if/else statement in the first calibration mode accumulate images (if I< n,="" accumulate="" frame="" in="" buffer="" and="" continue),="" but="" i="" am="" not="" convinced="" that="" having="" a="" lot="" of nested="" loops="" is="" the most="" elegant="" way="" to="" do="">

    This also got me thinking, is the state machine, as I built it here all the best way to manage these two processes/acquisition modes? Or are there better ways to do this?

    Contributions and comments are very much appreciated!

    Note: I know that loop as scheduled now in State calibration is wrong with shift registers. It was a test before I realized that the fault was in the interweaving of the state machine altogether.

    Please do not attach pictures, but rather post executable code, screws (easier) or as extracts from LabVIEW (which became the screw when you drag in a block diagram).  If you have more than three attachments, compress the folder and attach the ZIP file.

    I was once describing a system similar to yours, and one of my students, who was a computer science major, said "it's not a State Machine."  I had a similar situation to yours, where I had a procurement process which took time and a 'Stateful' routine that does different things with data (in your case, use it for calibration, waiting to 'Go', absorbent, etc.).

    I understood that it was correct.  I ' D 'opposite' model, with the Acquisition, always running and "driving", the calendar and make 'Appropriate Action' on each set of data, where the Action could (and did) vary according to other conditions.  So I renamed my state machine 'Action engine', and everyone was happy.

    So I won't bother looking at your code (a quick glance showed me that I have only would be frustrated by the limited view), but will give you a suggestion for an alternative architecture.

    You want to (ideally) two parallel loops.  A single loop simply acquires the data (images) at some rate.  For each Image, it signals the loop else it's time to 'Action' on the acquired data (to do this, use a queue or the notifier).  You want that engine of the Action to perform independently the Acquisition loop, just in case a particular Action takes, say, 1.2 times sample to complete - you don't want 'Miss' samples!.

    The loop of the engine of the Action is a unique, appropriate Action at the time, on the newly acquired data.  If you are in the 'State' calibration, the Action will be "add to the calibration.  When you have accumulated enough data to do calibration, set the following Action to (for example) 'wait to start the Signal.  When you receive the Signal to begin, take Action to "acquire, process and save data.  And so on.

    As it happens, I did my code exactly in this way, but it was the idea General - Acquisition was the 'King', he ran the clock and led the ' Machine/Action State engine' to 'do the right thing, appropriate to the time' with the data.  See if this type of model is appropriate in your situation.

    Bob Schor

  • Help with State Machine user Sequentail events

    I'm trying to create a program using the state machine which include events genreated user to jump between States. Also, I want the program to require a sequence of events to be genreted before entering in some States.

    For example:

    States: Init, idle, a-1, A-2, A-3, B - 1 and stop

    If a-1 State is selected, the user must enter the setting and select the condition A-2.
    The user cannot directly jump without having to access the mode a-1 to A - 2
    If the user selects the a-1 State, he should have the possibility of not input parameter and jump to another State as B-1 or Stop

    State A-3 can be entered automatically by State A-2.

    How to program the machine in order to do what I want? I've updated a sampling program. I'm not sure if I impleted the program properly. The user Panel hangs if I enter State a-1, and then press the Stop button. It does not allow me to leave the a-1 State and forces me to go to State A-2.

    A few other questions:

    -How to initialize all values of boleean to 0 during my Init State?

    -Why is a timeout value?

    Hey there, I developed example of Jacobson on a bit here to illustrate the case "Idle, how far to walk, ' your state machine diagram.

    Some keys on the front panel when you are in the bad condition will do nothing, as you can see, because I only check for buttons, I would like to respond to each State. For example, by pressing "Start on" the State of market won't do anything because this isn't a valid button, but pressing "Quit" will bring you to Idle. To implement the rest of the state machine, it is up to you!

  • State machines

    I'm new to Labview programming and working on some exercises OR is in state machines. For the Enum spend all you need to do is pull down the arrow to switch, but what happens if it does not allow you to switch how do you from the first to the second?


  • Images on the screen are HUGE. Can you help me with this?

    The images on my screen are HUGE. I can't read a page without sweeping left and right.  If I try to play a game, it is impossible, because the game does not appear.  This has happened without any changes to the computer.  In addition, several times when I go on Facebook, the police is so small I can't read, I have to click on 'zoom' and set it to 125 in order to read it.  An example of how out of whack it is, when I turn on my computer, there is a circle of color just before the authentication page rises and this circle is now an oval.  Please can someone give me detailed instructions on how to solve this problem.  Don't forget I'm a novice on the computer and don't know most of the 'computer language' thank you very much in advance. LATER THAT DAY... Problem solved, thanks to you all.

    Right-click on your desktop, click Customize, then click the bottom display settings and you can change the resolution in the new window that opens

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

    Hello

    I am trying to build a state machine, but I am struggling with understanding of the methods to determine what State to move to the next.  In other words, I have several States, but I don't want to go in any particular sequence.  If I States numbered 1 to 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 data stream, which may be random and require access to one of my 10 States at any time and in any order.

    I saw this photo on the white paper "Application Design Patterns: machinery of State", but it leaves out some important details.  How do I create the structure in BLUE showed 3 c?  When I try to create this table of enums, all are the same. I am not able to make a list of different enum values.  In other words, when I type '2', then all values in the Bulletin Board "2."

    There is a nice video example and easy to a state machine for the distribution of soda $0.15, however, this state machine moves in a single sequence of 5 cents, 10 cents to deliver; It does NOT illustrate the selection of a State "out of order".  I need to understand how a state machine can move State "5 cents" to distribute directly, with the addition of 10 cents in the State "5 cents.

    Can someone suggest a very good tutorial on how to make the switch to operate in a state machine?  I have read some documents available on ni.com, but, I can't find a good explanation of how do.  I remain confused.

    Or, you can just explain how they created the BLUE table in the attached picture?  Maybe I can understand it from there.

    Thank you

    Dave


  • Virtual machines are not able to access the network after you have moved the host

    We moved our 4 ESX host to a different physical switch and now our VMs cannot access the network.

    I can access the host via client vsphere.  Our host has 2 network cards.  They are both members of the vSwitch0.  I have 1 VM network defined, and they are both members of it.  The network adapters, vmnic0 and vmnic1 are also part of my VMkernel which I do not know that I need because I have 1 ESX Server and do not use iscsi or NFS.

    the two cards are also part of my service console.

    According to my host "configuration / display: vitual switch, it looks like all my virtual machines are defined to use the vswitch."

    the two physical network adapters is connected to the same switch.  I did not go to any configuration on the switch.

    Picture 4.png

    The steers would be appreciated.

    Thank you

    Paul

    Picture 3.png

    Welcome to the community,

    It sounds as if the physical switch ports are not configured correctly. Please check that port security is disabled on the switch (switchport mode access) ports and spanning tree portfast is (if any).

    André

  • I have several purchases through the iTunes Store on my bank statement and I don't know what they are for. Can you help me? Cannot maneuver through this system to see the purchase history.

    I have several iTunes Store purchases that appear on my bank statement and I don't know what they are for. Can you help me? I'm unable to maneuver through this system to view previous purchases.  I wonder if I pay for extra storage, it is always advising me that I'm pretty sure.

    Hello

    Open iTunes on your Mac and click your name (if you are not signed in, then sign to see your name). Then click on account information. Once you enter the account information screen, you will see a section called historical of purchases. Click 'View all' to see the list of purchases and the ability to watch the dates more.

    See you soon,.

    GB

  • There are two select statement, which are as follows: 1) select project id, the name of ppm.pm_projects project_name and request_id 2) select id, name from request_type_name to kcrt_request_details. There is a column called entity that allows you to store

    There are two select statement, which are as follows: 1) select project id, the name of ppm.pm_projects project_name and request_id 2) select id, name from request_type_name to kcrt_request_details. There is a column called entity that can store a value i.e. project or request. I want to write a select statement containing a condition that is if the entity name is project and then run the select statement 1 otherwise, if the name of the entity's request, then run the select statement 2. All this must be written in a select statement. Can someone help me how to write this select statement type.

    Hello

    Hello

    2726057 wrote:

    ... There is a column called entity that can store a value i.e. project or request. ...

    In which table is this column?  Assuming that it is in a table called entity_table, you can do something like this:

    SELECT project AS id

    project name AS the name

    OF ppm.pm_projects

    WHEN THERE IS)

    SELECT 1

    Of entity_table

    Entity WHERE = "Project".

    )

    UNION ALL

    SELECT request_id ID

    request_type_name AS name

    OF kcrt_request_details

    WHEN THERE IS)

    SELECT 1

    Of entity_table

    Entity WHERE = 'ask '.

    )

    ;

    This does not have anything on the number of lines is entity_table, or what are the values in the column of the entity.  In other words, the query works in all cases.  If any line in entity_table entity = 'Project', then the pm_projects data will be included in the result set.  If any line in entity_table entity = 'Request', kcrt_request_details data will be included.

    I hope that answers your question.

    If this isn't the case, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the results desired from these data.

    Explain, using specific examples, how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002#9362002

  • All virtual machines are dead

    Hi, I discovered today that all virtual machines on my ESXi 4 has been arrested.  There are balls I can check what happened?  4 virtual machines are all CentOS 5.5 64-bit and very lightly loaded (IE TOP shows 0.1 for loading).  There is no more validation of CPU or memory.

    You can... How to do this depends on your configuration... For example, if you use vCenter or not. If this isn't the case, then connect to the host, go to the tab "Configuration", under the heading 'Software', ' Virtual Machine Startup/Shutdown ' select and then click on the 'Properties' link (top right of this window)... This is where you can select the VM power on with the host country, what order they put under tension, or if they "Manual start" value when the host starts.

    If you do the settings on the host computer, vCenter will extract these settings in the configuration... I would suggest testing to confirm that the auto-start settings stick when you vMotion a computer virtual to another host (if you have more than one host) or not.

    Network administrator

    VMware VCP4

    Review the allocation of points for "useful" or "right" answers.

  • THANK YOU ALL!  MY SHORT TWITTER TIME NOW IS DONE!

    Finally, after some daunting technical difficulties, my short time Twitter is over.


    I faced some stinging criticism from members of this forum on the gaps in the film.  I took this advice to heart and no one can, in my opinion, can legitimately claim that the first part is boring.  Quite the contrary!

    I have listed Bill Hunt, Colin Brougham, Jim Simon, Shooternz, robodog2 and joebloepremiere for a thank you with all my heart in the credits.

    Thank you all; you did a much better movie!

    I also wanted to have the film into two parts; the first part on the overload of information and experience exponential acceleration and the second on human who answers whether the women, movie, planting trees, a walk in the woods or anything to slow down time.

    While I got this part and intent, I wonder if perhaps you have filled the screen, near the end of the opening, with the info. While I liked the look of the clean 'framing', which could be lost on others. I found with some viewers, we should rather "hit over the head," just a little more, WE would like to. Subtle is often lost on the masses, even if I like it.

    I could see the fill area with flashes of "titles," they said, if you want, and then when the screen is full, everything did a very slow fade to black. I don't want to adultrate your vision and like the opening, but was just thinking, trying to put myself in the seats of the "public". Doing so, at a frantic pace, in total counterpoint to the soundtrack could be a useful way faster and faster and more crowded, until the BOOM - a beautiful and quiet forest - tension and counterpoint builds and then... it ends with the 'message '.

    Just thinking here.

    Good luck

    Hunt

  • Spyware can be installed in an Internet café, for which all the machines are in working groups

    I have an Internet café and all of the machine are not in the same workgroup, I want to ask if it is possible for spyware to be installed in cyber, because I had the problem of spyware for which all the machine has deep freeze.

    As long as systems are on the same local network and do not allowed of individual firewalls (that is, they rely on the firewall of the router), if the malware gets on one, all are at risk.

Maybe you are looking for

  • Why the 'Cancel loading' button is not placeable right next to the button "reload page"?

    Hi people, I have a quite unusual question with Nightly build 15.0a1 for Windows x 64 (x 64).I can't place the button to cancel loading a Web page next to the page reload button - everywhere else, it is possible to place, but not in this exact spot.

  • Satellite A660 - FN keys without function

    Hi, once again its me :D in any case, I noticed that FN + f keys do not work. I can't lock my computer with him, I just can't cut it with fn + esc, I can't adjust brightness with fn + f6, f7 and so on. Any ideas what could be? Function of the lighted

  • Need driver modem for L20 - 197

    Hi, anyone know where I can get updates for the above modem please that I keep getting disconnected from the internet. The current modem installed is version 7.25.0.0 as of the 20.6.05 Thank you

  • Backup fails with the error code 0 x 80070422

    Can not execute 'change settings' in the backup.  I get a message: "service cannot be started because it is disabled or don't no enabled devices that are associated with.» 0 x 80070422 '.  I am running Windows 7 Professional on a 64-bit computer.  An

  • RE: Software for winXP x 64 OfficeJetPro8600

    MY oper sys was XP x 32 when you purchased this device.  My computer crashed and was installed Win XP x 64. Now, I find that the software supplied does not work in XP 64 - bit. I downloaded the base for printing driver, but cannot use scan or fax. Wh