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.

Tags: NI Software

Similar Questions

  • 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 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 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

  • Simple example of narrow Panel? in the Structure of the event does not work - please advise

    I'm trying to implement a close interception single panel.   In the LabVIEW 2010 VI joint, I expect to see a dialog box indicating now 'close [filename]' which will then stop the VI but NOT closing the Panel.

    Instead, I see the program to run in to highlight up to the loop, execution mode then when I press the button window close Windows (X) in the upper right window of the façade, two program windows close immediately.

    Can someone tell me why this discrepancy? does not work?

    OK, this version works as expected.  I was able to find the reference 'this VI' to the title of the programming VIs and functions - functions and Application control screw - VI reference server.  (Not easy to find the help of LabVIEW.  I actually copied it from another VI.)

    It displays the message 'Now close [filename]' then put a Boolean True to stop the loop of the file.

    Thanks to those who pointed out I was making reference to an array of screws rather than a single VI.

    I think it is a very simple example that should be able to find by searching for ways to replace the narrow Windows file service.

  • I installed Acrobat 8 Professional 32-bit version and my computer is 64-bit, the program does not run correctly and I want to uninstall the 32-bit version and re-install the 64-bit version, I can't find the download of US feed for Acrobat 8 Professional,

    I installed Acrobat 8 Professional 32-bit version and my computer is 64-bit, the program does not run correctly and I want to uninstall the 32-bit version and re-install the 64-bit version, I can't find US downloading feed for Acrobat Professional 8, any suggestions

    Hello

    Please see below the link to download: -.

    https://helpx.Adobe.com/Acrobat/KB/Acrobat-8-9-product-downloads.html

  • I installed the download Assistant and she show Acrobat is downloaded, but the program does not run or listed as a program.  The only thing listed under programs is the wizard.  When I click on it, it gives me just the possibility to download Acrobat ag

    I installed the download Assistant and she show Acrobat is downloaded, but the program does not run or listed as a program.  The only thing listed under programs is the wizard.  When I click on it, it gives me just the possibility to download Acrobat again.

    Charlesgreen123 after the installation files are downloaded, you can run the Setup program to install Acrobat.  By default, the installation files are saved in your download folder.

  • How to use the structures of the event for long-running tasks

    I created a state machine that scans a cluster of Boolean controls in a State of 'home '. Most of the States run a Subvi or two in ~ 100 ms or less.

    However, a State run for 10 seconds.

    The code works but the user interface is limited because the controls are outside the cluster because they provide inputs to the structure of State machine case but do not cause changes in the State. In other words, I all orders cluster stacked vertically on one side of the main panel and do not have the flexibility to move the controls to the more intuitive positions on the Panel.

    My question: How can I convert this code in a structure of the event and keep this long term 'event' and prevent that the operator by clicking another button event during the execution of this event?

    Thank you

    You say you have controls outside of your main code... You should really put these inside and manipulate them in a State of your state machine is initialized. This allows you to make changes to the code easier and limits of line entering your outside loop.

    You can do different things to lock the user.

    You can disable specific controls so that they can't be clicked or edited.

    You can use the palette of the mouse to define the busy cursor and disabled again once finished, I do this a lot during treatment when my code something loads the user just clicked.

    One of my favorites is to set a Boolean value in your data that passes through you event titled structure "disable mouse." When the value is True, a mouse down event will effectively reject the event, clicking on disable. I also added an event mouse move where if the bool disable the mouse is set to True, it moves an indicator of string with the mouse by telling the user why it is disabled.

    If you want more specific suggestions, I suggest to post an excerpt of your code, or attach your screws, so that we can better help you.

  • UserChanged event does not run

    Why the event UserChanged without executing when the user is changed with the IEngine.CurrentUser property in an operator interface?  I noticed that it will run when the connect/disconnect methods occur, but not when it is modified directly.

    Also, is it possible to force this event programmatically, so runs the code in the callback associated with this event (such as a work-around?).

    Thank you

    Paul

    TS 4.0.1

    LV 8.5.1

    Paul,

    for the event to not be fired because IEngine.CurrentUser is a property of the engine and the event is controlled by the Application Manager. Therefore, changing the value of the property does not create the event on its own.

    If you work in a user interface, it is recommended to use the Manager commands; the application Manager provides a method of "Login":

    Connects the user by running the front-end reminder LoginLogout. This method does not wait for the callback to run. Use the ApplicationMgr.UserChanged event to determine whether the connection was successful.

    The downside is that the front-end LoginLogout creates the default value of connection dialogby. If you do not want to have this dialogue, you should consider to replace with your own front end. But please do not change the default reminder, but substitute using the directory of users!

    hope this helps,

    Norbert

  • See Planner 3.0 - Single-VM Test Local, the batch file runs, but the workload does not run

    Hi all

    See planner 3.0 running on vSphere 5.1. When I run the test local (Windows 7 x 64), see planner was able to power on

    the office and run the batch (server.bat) file, but the workload does not start. I checked the Planner view agent service

    is started on the desktop.


    Planner view device

    01.jpg

    GoldenDesktop, batch file is running

    02.JPG

    Any help would be appreciated.

    AJI

    Can you try to raise the rise time and see if the problem persists? There is also a log file in C: drive, c:\viewplanner-desktopagent.log--vous can attach this file?

  • Error D3D error fatal - in GTA IV and the game does not run.

    Hello

    GTA iv will not work. I get the fatal error message, the error D3D.

    I contacted Rockstar and they advised to update .NET 3.5 and install installation web dx.

    Please let know us if I really need to do those things that I am running Windows 7 64 bit. I would have thought that the latest Dotnet is already in the operating system.

    Finally, where can I find which version of Dotnet I. It does not appear in the list of programs.

    Thank you very much

    roystont5038.

    They are probably right.

    It seems that many times some games refer to pieces of DX9-coding, which somehow is not recognized, thus generating errors.
    It can't hurt to install .NET 3.5 and (re-) install DirectX, I found a lot of (mostly older games however) the issues have been resolved by installing DX9.0c.
    No idea why. but seems to be a magical charm :)
  • Send the event does not

    I am trying to send my data class event when the data has been changed using the logic below. I've reproduced my problem below in a sample application based on one I found on a blog, I've created. I use a click on a button to call the dispatcher of events for the event class, but the main class of DispatchEventDemo does not seem to raise the event.

    When I put an instance of the DispatchEvenExample class in the FormWithButton class, it works but only within the same class (if uncomment the addEventListener method in FormWithButton).

    What I'm doing wrong? Is it because I'm dealing with the wrong instance of the DispatchEventExample? I think I need an observer model configuration...

    package
    {
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.text.TextFieldType;

    SerializableAttribute public class DispatchEventDemo extends Sprite
    {
    private var _dispatchExampleispatchEventExample.
    private var saveBtnPright;
    private var myForm:FormWithButton;
    public void DispatchEventDemo() {}
    _dispatchExample = new DispatchEventExample();
    _dispatchExample.addEventListener ("Will", onEvent, false, 0, true);
                
    myForm = new FormWithButton();
    this.addChild (myForm);
    }
    private void onClick(e:MouseEvent):void
    {
    trace ("Click");
    _dispatchExample.sendEvent ();
    }
            
    private void onEvent(evt:Event):void {}
    trace ("_dispatchExample dispatched an event");
    }
    }
    }

    package
    {
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import flash.events.EventDispatcher;
    import flash.events.Event;
    import flash.display.Sprite;
        
    SerializableAttribute public class DispatchEventExample extends EventDispatcher {}
    private var _timer:Timer;
    public void DispatchEventExample() {}
    }
    public function sendEvent (): void
    {
    dispatchEvent (new Event ("will"));
    }
    }
    }

    package
    {
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.text.TextFieldType;
        
    SerializableAttribute public class FormWithButton extends Sprite
    {
    private var saveBtnPright;
    private var _dispatchExampleispatchEventExample.
    public void FormWithButton()
    {
    _dispatchExample = new DispatchEventExample();

    _dispatchExample.addEventListener ("Will", onEvent, false, 0, true);
    saveBtn = new Sprite();
    addChild (saveBtn);
    saveBtn.x = 190;
    saveBtn.y = 10;
    saveBtn.useHandCursor = true;
    saveBtn.graphics.lineStyle (1);
    saveBtn.graphics.beginFill (0xcccccc);
    saveBtn.graphics.drawRoundRect (0, 0, 30, 20, 5, 5);
    var saveLbl:TextField = new TextField();
    saveBtn.addChild (saveLbl);
    saveLbl.text = "Save";
    saveLbl.selectable = false;
    saveBtn.addEventListener (MouseEvent.CLICK, onClick);
    }
    private void onClick(e:MouseEvent):void
    {
    trace ("Click");
    _dispatchExample.sendEvent ();
    }
    private void onEvent(evt:Event):void {}
    trace ("_dispatchExample sent a test of FormWithButton");
    }
    }
    }

    I think what you need here, it is a singleton class. you create two instances of the object and add the listener to these two different instances. so when an event is being shipped via an instance your application is listening for the event to another instance then its never read correctly.

    Here is a link to a post that jtegen posted there on singelton classes:

    http://supportforums.BlackBerry.com/T5/Tablet-OS-SDK-for-Adobe-Air/going-back-to-main-page/m-p/71241...

    in this case, the singleton is the DispatchEventExample class.

    using the method htat and attach your headset to the same instance, it should do what you want it to do. Good luck!

  • Where in Windows 7 Pro to release the program does not run all computer starts?

    Where in Windows 7 Professional to release the program is not to turn on and start any computer starts?

    Hello

    Thank you for contacting Microsoft Community.
    You can go to start-> click on all programs-> select start. You can find all the programs that run at startup, here. Deleting will stop them from running at startup.
    You can also open the System Configuration to disable all programs running during startup. Go to start-> type msconfig.exe-> press ENTER. IF UAC prompts, click Yes. Opens the System Configuration window. Now go to the Startup tab and disable all applications (to remove the tick) you want to stop from running at startup. Click on apply and then OK. Restart the PC, once done.
  • 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

Maybe you are looking for