Sub - Entered VI buttons activation do not Structure of the event

Hey everybody,

I have anissue with a Subvi, which takes a user file, play with the type of path of file data until it is in the form of a string, and then puts it in an array of strings in a list box. The issue I'm having is that I created the entries and exits to the buttons in the image, but the case event structures they control are not running when I press the buttons that are connected to the terminals of the Sub VI (the buttons move up one level in the image below).  They DO not work when I use the Panel front of the Subvi rather than on the front of the VI Panel that comes up to the next level.

So far I have tried:

-Move the buttons in the while loop

-Move the buttons in the structure of the event

-Case change event handling to run on a mouse click of the button from a change in value

Thanks in advance for any help anyone is able to give me!

Yes, writing a value to a Terminal never causes a value change event.  Think of it as an event "user has changed the value.  To trigger an event value programmatically, you must write to the Value property (Signaling) of the command or the change indicator.

Values Boolean locking belong in cases that handles the VC event.

You could read the terminal (use a local variable) before the time compare loop to the last value (use a feedback node) and use a case structure to determine if you want the event to VC based on the value passed in the appellant.

Tags: NI Software

Similar Questions

  • You will need to stick power button in its own structure of the event?

    I'm studying the Carwash review CLD VI attached.

    First question, I noticed that the Start button is stuck inside its own structure of the event. It is absolutely necessary, I can just paste it elsewhere?

    I guess it was put here because the Start button has no wiring so that it looks more neat to stick in its own structure of the event, I'm good?

    Second question, I noticed that the Stop button is already wired into the red while stop the loop, so by pressing stop the vi already. But there is also the change in value of Stop event, sounds redundant, right? Or is it really necessary? ?

    Both are necessary.

    1. the Boolean while terminal read when the event fires. Read this triggered the lock operation (if the button snaps back).

    2. the structure of the event were waiting for an event and nothing would happen until that another event is triggered. Only after that the structure of the event is "run", the value of the judgment is read.

    Felix

  • Button value change records in the structure of the event, but does not change appeaance?

    Hello world

    A quick question... I hope someone can answer...

    I have a code that uses a PS button within a structure of event to trigger a signal of AO... My code is below. The code works fine and the OD goes off when you press the button E-Stim... But when pushed the button does not change with reliability the appearance (i.e. of the gray 'off' red 'on' color)... Sometimes color changes; no other time not... If I remove the structure of the event and the survey button in the appearance changes as expected.

    What is going on? I would like the button to change the colors on the user interface to indicate that it works... Should I programmatically control the color?

    Kind regards

    Jack

    I guess that when query you the button you have some delay in your loop? Locking means that the button will change its value when you press it, then switch back to the original value once the value of the control has been used by the code. When you ask, this means that until he reaches the next iteration of the loop, but in the case where the structure that will happen immediately.

    The default setting for the buttons to modify its behavior as in most of the application would be latch releasing. You then raise the event when the button of the mouse over the control. This also allows "drag" control if you push down on the subject, given that you do not release control in this case.

  • Structure of the event does not clear the queue after his release from the Subvi

    OK I'm not sure if this is a stupid question or not...

    I was trying just a few tips and stumbeled on this problem...

    So I created a sample (not exactly)

    In qqq_Main.vi just press PressMe

    (it opens a Subvi qqq.vi)

    There are two buttons to stop "Alt1" and "pylone2".

    To close the Sub - VI press either on "pylone2".

    or press "Alt1", then "pylone2".

    with the latter method of the value of closing change pylone2 is registered outside the while loop and after the closure of the Subvi should not it be erased? (Or should manually clear us it?)

    For this reason not clear, the second time I press 'PressMe' change the value of pylone2 even goes off before you press anything

    I can't look at your code at the moment, but according to your description, it seems that the system works as expected. I guess you do a completely static record of events (open the event configuration dialog box and select the controls and event).

    The first thing to clarify is your use of the term "registered". In this case, it's a problem, because the registration in the context of the protests means asking to receive the event when it happens.

    Now that you know it's important to understand where the recording is happening, because that's what determines which events are stored in the queue. When you use this type of static record, registration happens from the VI the event structure is in run mode (Note: this does not mean that the VI is actually running, but just that it's the of running or reserved for the race) and the cancellation of registration only happens when the VI mode of execution. Who is right for which you get the events in the queue of the previous run of the VI - the VI is still in run mode, then the event is added to the queue and still waiting in the queue until the structure of the event to run again.

    You can work around something like that by switching to dynamic registration of events, where you can unsubscribe to empty the queue at the end of the VI, but requires more code. Also, in 2013 LV there are a few features added to events that could allow to do this statically (I don't study all the additions, so I don't know if this is possible for static recording).

    There is a good presentation on the events of NIWeek 2013 by Jack Dunaway. You can find details of how to download the video here - http://lavag.org/topic/16091-ni-week-2012-videos/

  • Structure of the event in primary vi and sub - VI with queues

    Hi all

    I have an application that uses the architecture of producer-consumer in which a queue transmits messages of a main VI by a Subvi, in response to the events of the user in the front panel. Inside the Sub VI, the queue is removed and treaty based on the corresponding message, and the result is displayed on the façade the sub of VI. User events are captured in the main VI using a Structure of the event. This works as expected.

    However, I also the controls on the Panel before the sub - VI to change the queue. My approach is to have another structure of the event in the VI sub for this. However, while the events in the main work of fine VI, events of sub - VI never treated.

    A simplified sandbox VI of what I'm trying to do is attached. As you can see, the main VI events are triggered as expected, but events in the sub VI are never triggered.

    I watched this white paper: detect an event in a Subvi from a high level VI , but it's not exactly what I'm trying to do. Instead, I'm just trying to detect an event generated within the Subvi. I searched this forum and found some research related, but none of them seemed to answer what I'm trying to do.

    Thank you

    Matt

    Your major issue here is the loop location.  While the structure should be inside the Subvi to make a message in the appropriate queue manager.  In fact, you should have 2 loops within your Subvi: 1) the QMH and (2) of the event loop.  You must use a user event to congratulate the event loop in the Subvi to stop.  You should NOT use the time-out of the Structure of the event unless you absolutely must.  And since everything in the Subvi is the message function, you do not have expectations.  They will be inactive (no CPU using) when there are no items to process from the queue or queue.

  • Front panel locked, but not due to the structure of the event

    Hi it LV community.

    I did a staemachine program that executes an oscilloscope (screenshot of a provided below... the State of the problem). I ran my program yesterday and it worked very well. Then, like a model, a dialog box opens and I just clicked on it in a hurry. now my front hangs as soon as I move the above-mentioned State "the Oscilloscope settings.

    As indicated, I have go a repeat loop that collects successive impulses of my oscilloscope and displays on the front panel (it works fine). In parallel, I have a structure of the event that makes the tail for the real-time feedback of changes to parameters that I placed on the façade (exodus of state change).

    Here's the problem: as soon as I State 'Oscilloscope Settings' using a Boolean button on the front panel for get me there, the front hangs... No event triggered by this point, and even if it did, I already deselected the "Lock panel until the end of the matter for this event" checkbox in the case where the structure menu.

    So WHY is my front lock now? Thoughts anyone?

    Read the detailed help for event structures.

    He urged that a single event structure serve in a VI. There are moments where more can be used effectively, but caution and a thorough understanding of the structure are needed.

    The problem is that you have several structures of the event in the various cases of the state machine and they are set to respond to the same events.

    When the button Set Oscilloscope, the structures of the event in the purchase Menu and home screen States receive the event. The two lock the screen, but only one of these cases may work. It can transfer control to the State of the Oscilloscope settings, but the other event responding to this same event structure maintains the locked Panel.

    The solution is not not to release any of the event. The default value is usually the best setting. The best solution is to spend on an architecture of producer/consumer (events). Who uses two parallel loops. The producer has the one and the only structure of the event and passes orders to consumer loop through a queue.

    Probalby want as the mechanical action on the buttons to lock when you press. Put kiosks inside the respective case of event changed value and local variables becomes unnecessary.

    Lynn

  • Structure of the event does not not at the exit of a Btn dialog box

    Hi all

    I have here a simple VI. I want to blow a One button in the user dialog box. I want VI to wait until the user clicks on the OK"" button. When we click on the OK button the VI should pop another dialogue a button and stops when you press the Ok button. The VI does not stop. The value change event is not captured by the structure of the event. Can't really understand why.

    What OK button you are wanting to trigger structure of the event?

    1. as you have connected it the case of the event is related to the OK INDICATOR on the front panel.  You don't have an OK button on the front panel. The OK button in the dialog box is not easily accessible to the structure of the event.

    2. programmatically change an indicator does not raise an event to change the value.

    3. you can use a Value property node (signaling) to trigger the occurrence.

    4. There is almost always a better way to do what you want to use an indicator and a value (follow the signs).

    Lynn

  • LabVIEW 2012 while the structure of the event does not stop

    I am LabVIEW 2012.

    An example of a while loop with the structure of the event inside can not be stopped with the stop key, Boolean.  Something wrong?

    Please see the attached VI.

    Thank you.

    Yes, something is wrong. You must add one for the event in order to detect a change in value on the stop button.

    The thing is now your structure for the event rest waiting for one of the event which she handles and ight now, it handles the "close panel" event, the 'timeout' event is too manipulated, but since you do not have anything related to the terminal of timeout (top left of the structure of the event) the timeout is - 1. So, when you run the VI the while loop is stuck in the first iteration and is waiting for a sign nearby, the stop button will only take into account after that same structure intercepts an event; I think it's because LabVIEW will execute the code related to the Terminal stop of the while until after the rest of the code that he has completed execution of the loop.

    Hope this helps

  • Programmatically trigger a structure of the event with the value (signaling) is not responding

    Hey, in my attached program I check if the two steps of translation are in a specific position. If Yes, I want my code to execute a sequence of movements. If this isn't the case, I'm asking the user if he wants contributed from this position anyway. It has three options: Yes, go to load (the specific position) and cancel. If he hits Yes, I am using a property of signal value which should update the controls Boolean true, allowing the sequence. Cancellation and work "to load" perfectly fine, but 'Yes' does not work. I think I need a structure of the event to ahndle the value of the Boolean control 'x' change event, however, the addition of this structure of the event for some reason any even do not allow me to click on the Start button of the procedure.
    Thanks for any help in advance.
    Doug

    Really, you should look into using a State Machine.  You should have really not what happens inside a structure of the event.

    In addition, I would like to use a shift register to store this value instead of a front panel control.

  • structure of the event recorded does not change value

    I have a VI that communicates with an FPGA via a telnet interface.  I have several Boolean controls on the front panel.  When you click a control, it sends a write command on the face i in telnet to the FPGA.  Similarly, if a process in the FPGA himself wrote the same registry (that control written when I clicked on it), an order is generated in the FPGA and returned to the VI and the control (via a local variable) lights or unlights accordingly (based on value).  In other words, these controls are read-write...

    It's all workers, except for one important thing.  I have the code that runs through a structure of event whenever the value of the control changes.  I can see that this code executes in fact when I click on the control via the front panel.  HOWEVER - when something is generated in the FPGA finally changes the value of the control, the structure of the event does not, even if I see the value of the change of control on my front.

    A specific example, I have a control named CLIENT_LB.  When I click on CLIENT_LB, I see it lights up, and I see the event structure code run.  Now, if I have the FPGA process to set CLIENT_LB to 0, I see unlight on my front, but does not run the code structure of the event.  I have probes in place who have checked the associated local variable CLIENT_LB evolving impact of values.  The structure of the event reads: 'CLIENT_LB': value change.

    Shouldn't an event structure "value change" run when the value changes, regardless of whether if it happened manually (i.e. me by clicking on the control) or automatically (i.e. the FPGA written in VI and changes the value of the control)?

    The VI is great, and you would not be able to test it in any case unrelated to the material, to remedy that I've attached 2 screenshots, I have described below.

    1. This is where the string from the FPGA analysis occurs.  The chain between the sub - VI, and then the data chain part is hidden to determine if the Boolean value of the control is true or false.  I put a probe on CLIENT_LB, and I see that as the FPGA changes the value of the register, CLIENT_LB passes from false to true as a result.  I checked this several times.

    2. it is the structure of the event.  This code runs when I click on CLIENT_LB on my face, but does not run when the peak CLIENT_LB #1 local variable is changed.

    Writing to variables never fires events to "change the value. If writing should raise this event, use the property "Value (follow the signs).

    Norbert

  • Need to reset the button by default when you use the structure of the event?

    When you use the buttons with a mechanical action "releasing lock" to only trigger the same structure with the same 'value has changed', the button does not jump upwards as you would expect.  I can get to behave as I want by adding a "default reset" invoke the node, but this seems somewhat exaggerated.  Is there an easier way to get the button to jump to the top after pressing on?

    The button will reset once it is read by the code. This means that the terminal is inside the structure of the event. If you move outside the terminal, it would read only the beginning of the race and then never and it will not be reset.

    If the terminal is learn the structure of the event, it is read by the code (even if it is not connected to anything) and it reset as soon as the event has a chance to run.

  • Structure of the event does not run

    Hello

    I have a Board who I am control with loop open using a stepper motor system.  I want to run some tests to measure to what extent and how constantly the motor can move the stage.  How my software works is that I give the engine a position (number of steps), then it runs until it reaches this position.

    The motor itself and then I want to set up a structure of event so that I can give different commands without having to restart the program each time.  The three cases, I want to implement are:
    (1) giving the engine a new job to run

    (2) telling the motor home again

    (3) stop the program at any time

    I watched tutorials on the structure of the event and cannot for the life of understand me why it won't work.  The motor houses himself, enters the while loop and just stays there.  When I change the values, nothing happens.  Can someone help me understand this?

    Riche29 wrote:

    Thank you for the answers.

    Would not has to do with the fact that I do run my software on a myRIO and not my PC, doesn't it?

    Yes, yes it would be.

    The myRIO is an on-Board Unit and has no video output, and therefore is not a concept of events based on user input.  I've never used a myRIO but I figured, would not allow even you put code on the myRIO if we used a structure of the event, but I guess you can have user events so maybe that's why no error was thrown.

    The code runs normally on Windows where I tested it.  I had to disable parts of the House and run the routine because I don't have the myDAQ or myRIO software installed but the structure of the event worked as expected.

    As for the change of Position value, the witness must be in case of structure, not only in the while loop.  If it isn't then you will read the last value not a new one.  You were probably just changes to test things because in the images you posted it was in the case of structure.

  • How can I set up a structure of the event that sends text when the user presses the button "Return"?

    I'm new to programming of the Structure of the event.  I am trying a program which causes the content of a control to the string to be processed when the user presses the button back in after typing in the control of the chain.  I think (I hope!) that it is simple, I just can't understand how do.

    Basically, I would take the attached VI and change so that the user can send the value of control 'String In' to the indicator "String Out" either by pressing the 'Return' key or press the button 'send string. '

    Any help would be greatly appreciated.

    This example has nothing to do with the RETURN key specifically.  It fires all simply whenever the value of the control is changed.  If you click outside the text box or on another still controls the value changes and still the event is raised.  This is often the desired so if it works in your application, you good to go.

    You CAN ONLY answer a particular key if you wish.  Set your event to meet 'This VI' > key down.  Then, read the proposal Vcle on the left side of the structure of the event and compare it to the RETURN (for example).  The Boolean result of the comparison gets connected to a structure to deal with your code to run inside.  You can also wire Vcle directly to a case structure and execute different code based on which key was pressed last.

  • structure of the event does not record local vars

    I have a gif of a FPGA based topology I want to show some telesignalisations in.  As the user clicks on the Boolean, vertical lines appear and disappear as they click on it again, showing the current topology of closure.

    To save resources, I opted to use a structure of the event.  So far I put it for internal RX_FAC and RX_TERMXCO4AU you see at the top left of the image.

    A single loop of RX and one TX closure may be on at the time, so one of the first things that happens when the user clicks on the Boolean value is that it defines the values of all other Boolean in the same row of fake, thanks to the use of local variables.

    The problem is - the structure of the event runs only when the user actually clicks the Boolean true or false value, but not if the boolean is false through the use of a local var.  In other words, let's say I RX_TERMXCO4AU true and false RX_FAC.  If I click on RX_FAC to set it's true, then you will notice RX_TERMXCO4AU goes dark/false and RX_FAC lights.  So the value of RX_TERMXCO4AU has changed, but associated with the structure of the event RX_TERMXCO4AU does not run (that's why the vertical line between RX_TERMXCO4AU and TX_FACXCO4AU remains).

    This will make a lot more sense if you run the attached simple VI.  Right now, events exist for RX_FAC and RX_TERMXCO4AU, but it is sufficient to explain the problem I think.

    Any help is appreciated.

    The structure of the event is for events generated by users.  Writing to a local variable is a programmatic change.

    You want to do is write your value to the Value property (Signalling) of the Boolean that will change the value and raise the value change event.

  • Structure of the event - controlled motor not variable

    I have a state machine that includes certain structures of the event. These event structures are used to control stepper motors using an Arduino Mega microcontroller. I'm using labview in 2012.

    The entrance to one of the events is the variable "pour the entry. I want to use it to control the motor speed and direction.

    If I control the motor as shown in the attached image Working.jpg, then the motor functions correctly. If I fix the motor to the steps variable # then the engine moves at the speed set in the right direction depending on whether the entry "pour" is positive or negative.

    However, I want to control the speed of the engine, not the number of steps, with the variable "pay Input". I checked that the values read by the indicator image INPUT_VALUE works do not are of the same order as the specified values, working, by using the "Set Speed". When I connect the value of the entry to the spindle speed of the motors of the Arduino (not_working.jpg) icon, the engine is running, apparently indefinitely at maximum speed. I don't understand why there is a difference in motor behavior between the value provided by these two methods at the entrance to the speed of the motor. I am confused by the present and don't know where to go from here.

    The structure of the event somehow behaves differently when taking a value from outside the structure to this data inside? or y at - it something to do with the opening of the structure on its first loop?

    I have also attached my vi together, even though she may not be the easiest to follow and requires an arduino Mega to run.

    Carlr wrote:

    I have a state machine that includes certain structures of the event. These event structures are used to control stepper motors using an Arduino Mega microcontroller. I'm using labview in 2012.

    The entrance to one of the events is the variable "pour the entry. I want to use it to control the motor speed and direction.

    If I control the motor as shown in the attached image Working.jpg, then the motor functions correctly. If I fix the motor to the steps variable # then the engine moves at the speed set in the right direction depending on whether the entry "pour" is positive or negative.

    However, I want to control the speed of the engine, not the number of steps, with the variable "pay Input". I checked that the values read by the indicator image INPUT_VALUE works do not are of the same order as the specified values, working, by using the "Set Speed". When I connect the value of the entry to the spindle speed of the motors of the Arduino (not_working.jpg) icon, the engine is running, apparently indefinitely at maximum speed. I don't understand why there is a difference in motor behavior between the value provided by these two methods at the entrance to the speed of the motor. I am confused by the present and don't know where to go from here.

    The structure of the event somehow behaves differently when taking a value from outside the structure to this data inside? or y at - it something to do with the opening of the structure on its first loop?

    I have also attached my vi together, even though she may not be the easiest to follow and requires an arduino Mega to run.

    You have a very inappropriate design of "state machine" - even if you do not have same event in more than one of your structures of the event (in addition to time-out), looks that get some of your treatment to go forward until you get something very specific (and in which none of your other user events are being processed).

    I strongly suggest that first set you design of State machine - perhaps follow producer/consumer Design Pattern (events) rather than having everything in a loop, the way you have.  If you keep everything in a loop, you should consider redesign so that you at least allow events to deal with rather than stay in a loop for an indefinite period!

    In any case, in the case where work, you send variable "Set Speed (steps per second)" for engines step by step write vi.  But otherwise, you're feeding 'Entry for' value - are they the same? And to let you know, you send only command "write" step by step when the input value to be paid.

    It's a big mess!  For starters, look at the attached picture, get rid of your structure of the event that has "for the entry" and replace it with what I showed in the picture. (In fact, all your event structures can / must be replaced with a similar logic.) Does not need the event structure in all this, you're just more complicated it must be!

    -DP

Maybe you are looking for