Structure of the event without user interface

I tried a quick and effective solution for a structure of event that is not a case of timeout and is part of a vi that has no user interface, but I have sent configuration data to the structure of the event.

Let me be more clear: I have a camera that generates several events taken by a loop with the structure of the event inside.

The provider of the camera give me this example of Labview code with all the events I'm interested and how they are implemented. I should mention that when you write a command of camera that a response to an event, but when you connect first to the camera there are more than 100 events generated by the latter, or when you download camera there are also several events. When there is no communication to the camera, the structure of the example event is inactive. The example includes a user interface to change settings and the program responds very well.

I have to integrate this camera in great demand in which camera photo will be configured in a pragmatic way with number of the type of user interface in the example given by the manufacturer of the device.  First, I tried to design a loop with timeout cases in which a queue can send the data to the device setting configuration. Everything is good until the download when code needs to hold events in a certain way; in my case, an event is taken another goes to the time-out period and so on. After two sets of 100 images download, during the third round Labview gets blocked (Labview not responding) and I have to kill Labview. I got designer of the camera that if camera events are not taken they are kept on a pile and when the battery is full causes the Labview locked.

Maybe I give too many details, but the question is: how to communicate with a struct event that is not a case of timeout and does not part of a user interface vi (it doesn't have a sign in my application)?

Oops... Sorry about that.  I've attached an example what I'm talking about here.

-Austin

Tags: NI Software

Similar Questions

  • VI, Structure of the event - script user events

    Hello

    I'm writing a VI script, which will focus on a structure of the event in another VI and fill the event with registered user events connected to the dynamic Terminal structure.

    I use the 'SetHandledEvents' invoke the node and the wiring to the terminal of dynamic events.

    In my example VI, I created 3 num event user, Boolean, and string. I can right click and add the event very well to the structure of the event. Now, if I remove any of the event and run my script I can add a dynamic user events. If I change the number of gegistration event from 1 to 2. I get error 1. The case of the event is created, but it is not configured for any event.

    Any help would be greatly appreciated.

    My test images vi showing events three user sign-up.

    Attached is the VI containing my script.

    Thanks in advance

    KeV

    The user 1 problem script error event should be fixed in LabVIEW 2016. DQMH did a lot of event scripts, but it cannot automatically configure event framework names... the user must do this manually for now.

  • Worth the user events until the structure of the event runs?

    If I create and enter a user event and immediately generate this event before that my structure of the event has seen the refnum inscription, is the event that is always guaranteed to be seen by the structure? In other words, events are queued to the top? It works, but I wonder if I can count on it. I am very sure that I can but I'm setting up a production code and want to be sure that I do not take just the benefit of a bug.

    A picture is worth a thousand words.

    To my knowledge, the registry for event creates the queue. This behavior is always the same in 7.1, so don't expect to change.

    I think that there was a recent discussion on the lavas on that, but I did not.

    Felix

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

  • Time after the event, without blocking the user

    Hi, I am creating a software to control a power supply. One feature that I have bad to add is a timer.

    I have a structure for the event that fires when the user clicks on the buttons, which most slowly increases the current for a period defined by the user. I want the timer to count so far defined by the user of time (in seconds) after the event fires. One thing, however, is that I need to be free to trigger another event (which stops the power supply in an emergency) so I can't have this synchronization process lock me up for snap buttons.

    I was experimenting with the millisecond timer, as well as with a loop that goes through with a defined time interval, but it is not quite give me the functionality I want. (I've been placing these loops of timing outside the structure of the event to other events run yet, but I want the timer to only is triggered after an event is triggered, is it still possible?)

    If you need more information, just ask, thanks!

    Thnigs to do to dramatically improve your code:

    You need not separate loop.  Put your code from timer inside the structure of the case of timeout event.  Set the time-out to 50 instead of 500 to match what is in your separate loop.  You can get rid of the becaue of queue, it is no longer necessary.  Create registry to offset on the main loop.  When the event occurs to start timer, pass the time for the shift on the right side register.  Wire the shift register on the left side in the event of timeout to use its value.  BTW, the shift in your separate loop register is used to nothing because you do not change the value on the wire.  Don't put all the loop in the case of timeout, get rid of the loop and just put the code of the loop, with the exception of the EndTime variable that can be removed and 50mS delay, which can be removed.

    Put the Boolean value of early Inc. inside the case to start Inc. value change event.  Same for all Boolean values.  Put them in their cases of particular event.

    Get rid of local variables now.  You'll race conditions if you do not, you doing wrong in that you don't need especially now.  Look at the current limit control.  Add a wire from the control of the current limit to where feeds the local variable of the current limit.  Delete the local section.

    Move all the controls from the inside of the structure of the event outside the structure of the event, but still within the main loop.  Wire controls where they are going.  Now you can eliminate all local variables of thos and just wire from control where they are needed.

    All outputs error.  One is enough.  Create an error in your front panel.  On the block-diagram wire the error in the first function of Sorrensen before the loop.  Where the error from the Sorrensen hit the loop function, change the terminal on a shift register (right click and select replace with shift register).  Move the error Out 2 to out of the loop on the right side.  Error 2 wire the register shift on the right side.  Everywhere, you need a mistake in, branch off the error in the thread because it is in the loop.  Wire all your outs of the error in the case of the event and the last Sorrensen function to a function of merge error.  Wire of this error on the shift register.  All your errors are combined in a single indicator.

    That should do for now.

  • More than a user sources for simple event structure of the event

    I have five different sources, I want to use to generate the user events using the structure of the unique event, acting as a producer loop. Is does not seem to be possible to use five different sets of create/generate user for a single event events structure and the structure of the event does not have the ability to add dynamic event hydrants more than once. Is it possible to do this by using the events structure and user event

    Kind regards

    Austin

    And again in LV2010, (good guess?)  I think this is what you need.

    Michael.

  • using the structure of the event in the LabVIEW classes

    Hello

    I'm new in the use of LabVIEW classes, so don't know much how I can use them.

    In my main program, I have clusters with five elements in each. The elements are controls two States and in some groups, there are three States controls. The user will press the buttons (controls), and different things will happen. In my first program were I not using classes, I had a structure of the event and the controls were cases of event in the structure.

    Is it possible to somehow use an event of cases in one of the methods that is created in the classes, so that say, that's not in the main program?

    I have attached two photos: I wanted to have a structure of the event in servoTouchEvent (in left.tri.lvclass) who is a child.

    Let me know if my explanation is not clear.

    Grateful for the help!

    Hello

    Yes, you can have a structure of the event in a Subvi rather in your main VI of top-level UI. The trick is to use the 'Save for events' and passing in references to orders that you want to have the event trigger structure for. The refnum output since the function is entered in the terminal of dynamic event of the structure of the event who could live in a Subvi. You can add instances of event where you will see these control events as dynamic events then you can do something with. These excerpts from shows all the code in a simple diagram, but the stuff in the structure of disable diagram could easily transformed into a Subvi:

     

    All this can be done without classes. What will buy classes you include the ability to encapsulate your screws and also perform different code based on what object on the hierarchy of the parent-child classes is on a wire. If the behavior of your code is different between 2-3 State and controls (which I do not know what state controls 3 you are referring), you can take advantage of the classes.

  • structure of the event to turn on and off a LED

    Good afternoon

    I would like to activate a part of my algorithm according to the value in another part. To make it easier, I symbolize the value by a button and tried a structure of user event to turn on or turn off an LED located in another while loop.

    I can turn on the LED, but unfortunately I can't spend off of the LED thereafter.

    It is possible to change the structure of the event and select the option "change value". However, I would like the fatest way to turn on and off using the structure of the event and the Bay. I mean I would like activate a part of the algorithm only if the button is enabled for not having a continuous audit of the value of the button by the structure of the event.

    Please, if anyone has an idea to turn off the LED (after the switch on), add a comment without hesitation.

    I will be happy to solve this simple problem.

    Thanks in advance for your help.

    Ragards

    You have a race condition.

    When you click stop, it's a race about whether if the event gets not saved and destroyed by the removal of the stem all loop against sending the same user in the lower loop.

    Why it only seems to happen with the case of false must be a quirk of how the code is compiled and the order, it is run.

    If you put a step between your Boolean switch and LED, for me anyway, the error is now generated on the true case of the structure of matter (always false for switch.).

    If you put a constant error in the lower loop and wire while guaranteeing the Unregister event so that you now it does not run until the two while loops are arrested, then I don't see a mistake regardless of the value of the Boolean switch when you click stop.

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

  • reading two sensors (alternately) in a structure of the event permanently

    Hello

    I have a structure of event with various functions of the user interface. The entire application is on a laser diode control and playback of two light sensors IR which cover different wavelengths (if and InGaAs). The two sensors are connected to the same AD converter, but to different channels. So if I want to read the two sensors, I have to change the setting of the "Converter" AD channels. The real question is how to implement playback continues two sensors in the structure of the event? I want to be able to read alternately each sensor in a span of 50 or 100 m is possible, another using function of time-out of the structure of the event with a kind of logic xor for switching channels? Maybe something with more features (somehow by a timed loop)?

    Any idea is welcome.

    Thank you and best regards,

    Gregor first

    P.s. The sensor reading is done by a National Instruments SPI map where SPI is the master.

    2010 VI converted down

  • Structure of the event in timed loop

    Quick question on the structures of timed loops\event

    What is a good or a bad idea to use structures of event call loops - as opposed to while loops. ?  I guess I like the idea of call loops - because you can prioritize them - so if there are some important things you need priority of 100% in the background - but for the user interface, you can configure it to run slower\or run to a different priority level.

    I just wanted to check it is not a reason why I shouldn't do that - since all the examples don't do that.

    JP

    I don't think it's a good idea. Your timed loop can stop waiting for an event. There is no advantage of placing the structure of the event in a timed loop. It is possible to assign priorities to other objects outside of the call loops. For example, you can the priorities given to subVIs. I'm reasonably sure that the structure of the event can work at other priorities if you do not the activities of the user interface. Maybe someone of NOR can confirm this.

    But the goal of a timed loop is to have a deterministic periodic job. The structure of the event must be used for asynchronous events. The two disagree with them if they are in the same spot.

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

  • How to stop a while loop structure in the event of a main vi

    Hello;

    Sorry for my English

    I have to stop to a Subvi my main VI, the Subvi contains a while loop and an event structure, so I need to stop this loop while I tried directly from my main vi, global variable, but it did not work

    any help please or example!

    How about something like this (solution see attachment) using a user event.

    Explore the User Interface--> range of events and dialogue. To display the dynamic event of the terminals in the structure of the event just right click and select 'display the dynamic event posts '.

  • Doubt in the structure of the event

    Hi all

    I am developing an app for my instruments that is user interfaced.i am new do VI architecture. In my program I use architecture producer and consumer, structure of the matter and structure of the event. In this framework programme first four are working properly, but the fifth framework structure of the case does not good. I have attached my program then please read it tell me what I did wrong?

    Thanks in advance

    Here is an example. Sorry, the pattern is a little messy.

  • Structure of the event by tabs design pattern

    Hi all

    Worked on a user interface using a model of design of event structure to respond to pressure on the button.

    The interface got big enough and I decided to organize buttons into groups and put them on different tabs (to the Group feature).

    However, when I put a case all about the structure of the event statement to separate the code on the pattern too I was not able to switch tabs and the interface gets stuck.

    Attached example.

    I could put all the events button of different tabs in a structure of the event, but thought that this could get very large and unreadable. Is there a standard design model that responds to this problem?

    Thank you very much.

    Select this option.

    Medwar19 wrote:

    Hi all

    Worked on a user interface using a model of design of event structure to respond to pressure on the button.

    The interface got big enough and I decided to organize buttons into groups and put them on different tabs (to the Group feature).

    However, when I put a case all about the structure of the event statement to separate the code on the pattern too I was not able to switch tabs and the interface gets stuck.

    Attached example.

    I could put all the events button of different tabs in a structure of the event, but thought that this could get very large and unreadable. Is there a model of design standard that meets this problem?

    Thank you very much.

    Select this option.

    Standard version?

    If you the tabs correspond to States so high kitted out to call a Subvi who is responcible for this State.

    Then inside the Subvi handling state that I use recording dynamic event to implement the events I have to the service so that in this State.

    This is what one of these sub - VI may look like.

    What makes very clearn that we treat in Thøis operating mode.

    Ton wrote a nugget on registration of dynamic event which can be found here.

    Ben

Maybe you are looking for

  • HP Envy 5660: Change the size of the copy on HP Envy 5660.

    I recently bought the 5660 envy, which is to be able to make copies ranging from 30% to 300% of the original.  I was not able to see how this is done.  Thanks for the help.

  • Driver Satellite M70-191 mass storage controller is missing

    Hello I have a Satellite M70-191 (only model PSM70E) laptop and today I tried to use my xd picture card but it does not work. I checked the device manager ==> system ==> mass storage controller and it seems that the drivers are not installed (code 28

  • Error JVM 517 - corrupt file system

    Hello. I get this error in the 9630 Simulator. I cleaned the project and the Simulator and the problem persists... Any help?

  • IPhone 6 prototype do more fit the iphone screen

    I created a prototype, and then I went to test it by adding it to the home screen on the iphone. I created my app by selecting the size of the iphone 6, but when I open the application on the iphone application extends beyond the screen cause me scro

  • Question of space

    Hi I'm using the 11.2.0.3.0 Oracle version.I have check the trend of the use of space for my database (it is a node three CARS), and I use performans seen as dba_hist_tbspc_space_usage and dba_hist_datafile so that, as in the following query. Recentl