Structure of the event within the structure of the case run once

Hi all

I am a controller using myRIO and labview where the program compares a value of the probe in a "Preset" and then choose a structure case depending on what type of air supply is required. What can be seen on the picture, for example, is 0 if saturated air supply is necessary.

The structure of the event is used to send a signal to step to the stepper motors to open the valves (closing is still pretty much in the same way). In any case, the event turns my valves 90 degrees. I read the sensor all a second, however, when the case remains unchanged, the case runs the event again causing my engines running at 90 degrees per second (essentially continuously). What I'm looking for is a way to send the signal to step only once until a new case is selected.

He is not on the photo, but this is all within the large loop.

Apologies for any bad/cringeworthy coding, it is literally my first program always using labview. I can post the full VI if you need.

Any ideas would be very appreciated! Thank you

Simos wrote:

crossrulz you have a simple example by chance that uses the feedback node?

See if that helps

Tags: NI Software

Similar Questions

  • structure of the case runs bad deal

    I have a Subvi, which has two structures matter.  The internal structure of the case seems to be running the wrong case.  I joined highlight the Subvi execution.  You can see that the terminal selector TRUE being feed into it, but the case that is running is FALSE.  Does anyone know what the problem with the code?

    Appreciate your help

    Sarah

    Also, your whole VI seems to be based on constants of diagram (I see no control!). There could be a lot of current folding . You can turn your input string into a control for a more realistic experience.

  • structure of the event within the structure of the case? error or limitation of LabVIEW?

    Hello

    I am trying to reach a structure of the event within a box structure. The event is triggered by a mouse event (mouse down, move to the top).

    This vi tries to simulate behaviour of the device with a sensor, so the mouse triggered the structure of the event, won't be there in real working environment, so I can't remove the structure of the case.

    But as I noticed that if I try to click on the drawing (that my mouse events are triggered with) before activating the Boolean condition of 2D, I can access is no longer the component front (button, leads, etc.).

    They seems to be frozen. But if the case is true before you try click on the 2D drawing area, everything seems to work well.

    Is - this protected by a kind of LabVIEW bug or there is a limitation?

    These are my screws.

    Thank you

    Hello Nefertari,

    Use a Standard Architecture.

    I changed the code. I hope now that its fine.

    Please find the code updated the joint.

    LV 2012.

    Kind regards

    Leila

  • Switch timer within the structure of the case?

    Hello

    I am relatively new to LabVIEW, hoping someone can help me with something that I am trying to solve. I am working on a system for the acquisition of data for a formula SAE car and try to design a VI that will be time how long it takes for the car complete the trial of acceleration of 75 m. The timer will be actvated in now the pedal for 5 seconds and save time for the file when 75 m is complete.

    I've set up a business structure that works in the following order.

    1: Check the brake pressure (if threshold, go to 2)

    2: how long the brake was pressed for time. (If more than 5 seconds switch to 3. If the brake is provided within this period, date back to 1)

    3 whether the movement of the wheel (wheel strats move, go to 4, otherwise, keep control)

    4. begin to measure speed and distance. (once reached, proceed to 5)

    5. replace all over again, save the file (then return to 1)

    I'm pretty happy with everything but part 2. I tried a timer pending within a sequence of flat, check that the pressure is fine, but pedal pulses rather that now he can active it, and using a true/false with the same function case structure waiting does not like LabVIEW bed not true/false value, once within the structure of the case.

    I would be grateful if someone could point me in the right direction!

    Thank you

    Kevin

    get rid of the sequence, here your timer elapsed, also got rid of your case to check brake pressure, do not use ms of waiting for your timing of sequence...

  • Problem with the event and the case of Structure

    Hi all,

    I get the problem in my program, I'm using the two structure one is the same and other structure box.

    In the structure of the case, I had the button as an entry to the SPL and the case structure as the output of the structure of the case.

    And in the same, then I had the two text box (num control A and B) in that I had put the event changes its value. Then, even I put the value has

    num or num B control control control this corrosponding num value will save seeing num C. Now the problem is when I click on

    the theLEB button does not blink until or if you don't put the value of one of the corrosponding num control.i didn't post my file in version 8.5 and 8.6 Please find tha.

    Hello

    It should work like that or I misunderstood what you want to do.

    If Boolean is true, boolean 2 is true, at the same time, you can change the value of A so C or B then C.

    See attachment

  • Event Structure... the mouse down or to the cases of change of value

    I feel, it is a simple problem, but I can't seem to find a solution.

    I have a VI that is supposed to communicate with a stepper motor drive.  I'm working on the Boolean setting keys on the Panel before (acting as of the momentary switches) that will jog the hourly engine or counterclockwise, as long as the button is pressed.  Once the user releases the button, the motor should stop jogging.

    I tried to use the mouse down and value change event.  With the help of the mouse down, for some reason, the time-out occurs almost immediately even while holding the mouse on the button.  This translates into what seems like nothing is happening.  Although the engine receives all orders he has to run, it receives the stop command immediately after.

    Using the value change case, the procedure works and the motor turns, but when you release the button (another change of value), all orders of jog are returned to the engine stop control tracking.  Sometimes the motor continues to run after the shutdown command has been sent, and I think that might be involved because it receives all the shortening of orders (again) and the judgment of control both.

    Is it possible to cnage my case event to run the way I want to what he... Send commands to the button click on... Send different command button.

    Thank you.

    Thanks for the suggestion...

    I could solve the problem I had.  Previously, I was trying to display the timeout to-1 to a value greater than 0 to launch the timeout on a button release event.  To solve the problem, I just removed all of the code that has been changing the value of timeout and left the default to-1.  I also removed all the code in the case of timeout.  Then, I created a new mouse event that is fired by releasing one of the buttons and copied in the code that used to be in the case of timeout.

    Now, the works of VI exactly as I need to... where an event occurs on a mouse a click of a button and a different event happes when the button is released.

    A very simple solution, however I've only worked in BT for about a week and I have not seen the mouse event when I scroll to the event.

  • test of the structure of the case

    Hi all

    I use the Structure of the event in a tab control.

    On page 1, there is a Table control and when the mouse is clicked on it, it returns the value of the cell. The event is ablsolutely very well work, but the problem is that I have no idea how to do to prevent the event.

    I enclose my Vi here. PLS, have a look at it and let me know of a possible solution.

    Thank you

    Ritesh

    ritesh024 wrote:

    But, this means that the events of Page 1 are getting triggered even when the control is in Page 2.

    Who would take the unnecessary memory and the time there is no need for Page 1 events to run when the control is on another page.

    No, the event will not get "fired", because if you're on the other tab it is impossible to raise the table event and a mouse upward may not occur. The structure of the event is in memory no matter what and placing within a structure of matter is only complicated the code and peut you cause problems.

    The structure of the event must always be in the data flow, the position of the tab is not relevant. Never hide an event within a structure of business structures.

    Here's a quick example (LV 8.5). Tab 1 has your table and detects the position of the cell. Tab 2 contains a light switch. As you can see there is any necessary structure.

  • case structure: to run once when the condition is true

    I have a case structure in my program. I use this to count the number of cycles in my experience. I have a knot of feedback (image of the program here attaced) within a box structure. I want the case structure to run only ONCE when the condition is "TRUE". Each "TRUE" represents each cycle. The problem that I'm facing here is that the box structure is permanently running as long as it is 'TRUE' instead of running once and wait for the next 'TRUE '.

    Temporaritly I use a timer inside (as you can see in the picture) to contain the program for the next 'REAL' to come. I hold as by case so I know exactly the time. Is it possible to make the case structure running only once when the condition become ' TRUE and wait for the next "REAL"?  OR is there any other loop that case structure that make this work?

    Hi aneps,

    PtByPt_BooleanCrossing is your friend!

    You really need to work on the analysis/description of your problem: you don't want to run the case as long as the entry is set to TRUE, but you want to run the case at the entrance of the past from FALSE to TRUE!

  • problem of data flow in the case structures (using a state machine)

    Good day everyone.

    I'm having a problem with the flow of data between the structures of the case.

    I try to use an example of a state machine for this simple problem. but when I try to send data of a box structure to change the State of the code. It will change not in the desirable output, instead, it offers the possibility that the exit options emul.

    could someone please point what I'm doing wrong here. Any kind of help would be very appreciated.

    With a quick glance at your photos a question you have is that you use not data flow. You write your status updated in local variables value. Your State should pass through the case structures are a single wire. Playback of your order "Enum", happened in the register shift on the right side of your loop probably get running and reading before any processing occurs within the structure of your business. That's why you're reading the old value of the State and not the update. or have a classic case of a race condition in your code.

  • Store/communicate IMAQ image (binary) between the structures of the case

    Hi all

    I am trying to build a VI for a controlled industrial vision system and it has 2 process: first an image of calibration comes a sequence of discrete of images. After that, the user can start and stop the continuous controlled process of machine vision. This process then uses the calibration image to remove some background objects etc..

    As the two processes cannot run at the same time, I programmed it as an event-driven state machine (following this tutorial: https://www.youtube.com/watch?v=RuIN31rSO2k) combined with continuous acquisition.

    My question is how to store and communicate the image of calibration between the structures of the case. It is basically a static image that is generated at the start of a race and then used once during the continuous control loop.

    Now, I tried storing in an IMAQ control with a local variable, but it does not work when I try to read the image. Preference image must be passed the bottom without any interference of the façade. I could probably make it work if I pass on the image in a table and then convert it back, but I want to avoid unnecessary conversions and understand how to manage the images correctly.

    Joined codeblock showing the part where I (attempt to) store the image and how the process of continuous measurement is connected (Yes, I know the live view is wired incorrectly in the scheme of the latter, it was a test to show a colleague).

    Thanks in advance for any help!

    Consider placing the image, the data record in a turn on your main WHILE loop.

  • I want to display strings that are in the structure of the case, in a text area

    Hello

    I write a vi, which has the structure of the event inside that one

    structure of the case.

    I have a problem, I have two cases.

    (1) when the value is true it executes the real deal, first it reads the string constant and second string indicator which is my out is put.

    (2) in the case of false it is pritty much even.

    I want to display the entries and exit puts different situations in the same text box is one for input and one for output.

    Someone can help me.


  • Structure of the case: selector values are not unique

    Get the error: case Structure: selector values are not unique...

    With the help of producer-consumer architecture w / SW-events and comms of queue.  DevSuite - LV2014

    My loop of consumers use a typedef for case selection control.  The typedef is an enum and the names of text for each value.  All my files are in quotes and there are no duplicates in the typedef or structure of the case.

    Help

    JF

    Jeff.F wrote:

    Get the error: case Structure: selector values are not unique...

    With the help of producer-consumer architecture w / SW-events and comms of queue.  DevSuite - LV2014

    My loop of consumers use a typedef for case selection control.  The typedef is an enum and the names of text for each value.  All my files are in quotes and there are no duplicates in the typedef or structure of the case.

    Help

    JF

    I don't know what you're doing exactly what I think. Do not write text in quotes for values box. Wire the enum in the switch case, right-click on the structure of the case and select "add a case for each value.

    It might be a little different because I'm teliing memory.

    Ben64

  • Do nothing in the case structure with loop For

    Hello

    I am trying to extract data from my signal (0.3 0.4 0.6...). I want to extract values greater than 0.5 and put it in a table. If I use a loop For which I can determine each index of my data to be compared and it happened in the structure of the case. In the 'Real' box, I wanted the value to extract outside the loop For. And I want to "do nothing" if my value falls within the box 'False. ' However, it displays error, saying "' Tunnel: lack of assignment to the tunnel '."

    I tried to select 'Default', but it does not work since I use a Boolean comparison. I tried to use the registry to shift, but in vain too.

    Someone could guide me on this to extract only a value greater than 0.5 and index them?

    For example "0.6 0.7 0.8; 3 4 7 index.

    Satisfaction will be given.

    Here you have

  • Get the button to change automatically after the structure of the case is completed once.

    Hi all

    The purpose of this VI (which I lightened it for the purpose of the present) is to do nothing until the START button is true. Then the structure of the case, and the string will be sent to the MSH. I need this too such that the stop command can be sent at any time and will be sent when the STOP button is true.

    At the present time, nothing happens until the BEGINNING is true, then the case structure begins and ends inside while loop. BUT then the outer while loop restarts again and the inside of a cheek through which returns once again the order of the string to the MSH (an unwanted process) because the START button is always true.

    Is there a way to get the start button to return to a State of false once inside while the loop is over?

    (Other solutions giving the same result would be very appreciated also!)

    BBRO says:

    The purpose of this VI (which I lightened it for the purpose of the present) is to do nothing until the START button is true.

    Well, your code sends a command to stop immediately after starting the program while consuming all CPU running the inner loop in parallel as fast as the computer allows. (Since there is no dependence on the data, the inner loop and the stop code both run at the same time. LabVIEW does NOT run left to right!).

    All you probably need is a simple while loop, a structure of the event with three cases and all the buttons in the action of locking.

    See attached a simple change, LabVIEW 9.0.

    (And please don't maximise front panel and diagram for full screen, especially if there isn't much here.) Sometimes we want to work on other things at the same time, for example to write this response!)

  • delay in the structure of the case

    Hello

    I use a structure of cases within a while loop.

    I want to put a delay of about one second whenever the case goes wrong (it must remain false until 1 second) then comes to the usual routine. I tried to use the function wait (ms), but then it effects the while loop. is it possible to put a delay without the normal time of the while loop operation?

    I enclose an example simple vi to clear my point.

    Thank you

    Here is an example of using the last timer.

Maybe you are looking for

  • Big Fish Games chat doesn't recognize Firefox 3.6

    I belong to Big Fish Game Club and if I want to use their live chat, it tells me that my browser is not compatible and use Firefox 3 or earlier (and several other browsers). I have Firefox 3 but I asked and BFG about this problem and they cannot reso

  • Re: Auto Turn Off after inactivity

    Hello Toshiba Satellite Pro L500 Where can I change the settings to know how well before the computer turns off after a period of inactivity? Thank you

  • Circle of scale on the graph XY

    I found a post from 2005, showing how to draw a circle on a xy chart knowing the Center and RADIUS. http://forums.ni.com/ni/board/message?board.id=170&message.id=146782&query.id=2708998#M146782. My xy grid is rectangular and Altenback mentioned a sol

  • error 0xbfff003a

    I have a couple of quirks happening.  I'm trying to control a device (solenoid driver) through the USB port via an interface card that has a PIC18F1450 on it.  I managed to control the device with the code in the image (without the VISA read).  The C

  • Unable to connect to the computers that are visible on the network.

    Yesterday the computers on our network available via remote desktop sharing, this morning they are not. Today the computers are all visible on the network, I just can't connect to them or browser all network shares. When I click on one of the compute