event refnum

How to make a'Cluster of Refnums in the event for the cluster of entry of a bundle by name.

I'm trying to understand the function of an existing code, in the code he used a cluster of event refnums as imput for the bundle by name. Unfortunately, I can't yet to duplicate the code, because I can't understand how he got the Refnum event icons in the first place.

I'm new to LabVIEW and would appreciate any information you can provide.

Thank you for your help,

Tags: NI Software

Similar Questions

  • Make a table of user events refnums?

    Hi all

    I have a question about dynamic user events. I have 6 events of different users I create and would like to put in a table. (I can use them in a loop pass, taking off from an event by loop and assigning it a control to a vi) So far I have not found a way to do this, because if I just wiring the refnums of user events in a table I broke my son. (Even though I have them the wiring to a structure of cluster construction.)

    I think you'll understand what I'm trying to do if you look at my code labview in the vi attached.

    In vi, I create user events and then their son for the control of two vi which will communicate to each other using these events. In the code, you will see 6 structures invoke node where I use the 'Ctrl' Val.set to move the events to the two vi. Of course, this is why bad to do things. Because if instead of having 6 events, I got 100, then I need to put 100 node structures rely on the block diagram (making very large relative to the size of my computer screen!).

    So I want to do is put the refnums of user events in a table, then put the structure of nodes an Invoke in a loop, and the array index to assign events to the vi program.

    Is anyway to do this? Or is there an alternative (/ best way) to what I did?

    (Baisically I have 2 vi that run in parallel and communicate with each other using the user events. I need to move events to two vi, how do I do it in the minimum of mouse clicks and less space on the screen.)

    Thank you!

    Paul.

    The problem you have is related to the fact that your event user have different data types.

    Two ways (or more) to solve:

    1 convert for variant and then in a table, you will need to convert vback inside your dynamic VI

    2. use a different approach:

    Take a data type of single event consisting in a cluster containing an enumeration and a Variant. The enum contains all the type of event you want. The conatins variant corresponding to the event data type.

    Now in sending, you can add the event data to the variant and upon receipt of the enum with the event type tells you how event data should be converted. In this case you don't need a series of events to the user, because you have only one.

  • VISA waiting on user event

    I have a producer/consumer program that uses an event Structure to manage the keys of the user interface.  I want to be able to use the VISA waiting on the event to read the characters of the RS232 port.  So I created my structure of the event a case for dynamic user events.

    I also create a while loop that has the VISA check and VISA waiting on event inside. I activated the "Serial character" event only.  When I get this event I use the create user Event.VI and the register of events to get an event Refnum

    How the Refnum of the event of this loop in my loop of producer?

    Paul_Knight_Lockheed_Martin wrote:

    Here is the code

    No, this isn't the code. It's a Subvi and a photo. Where you await events VISA? When you generate your user event? Based on the image you call the Initialize_Controller_Communication and remaining in this code to stop buuton is pressed. You start your event structure in the loop from the producer to the end of this VI. So, if you are not hitting the stop button to complete your initializtion it is no wonder that you never see your event executed structure.

  • event recording refnums data types do not match

    Hi all

    I'm new to LabView and I need help. Here's the situation:

    I am trying to add a user event by using the function 'create a user event '. The output of the function 'create a user event' placed in a control "Event Reg Refnum" (do not know if it is a control), but see diag2.png. But as soon as I add the user, the thread event at the entrance to breaks "event Reg Refnum".

    I think I know sort of what the problem is, as stated in the context-sensitive help, where the 'Reg Refnum event' has only one data type, which is "User event - Quit Application event". The user event that I add, 'Event to end execution', is not in the "event Reg Refnum".

    The question is: how to extend to the Reg Refnum 'event' to include 'Event - event to stop executing user' to solve my problem?

    Can experts out there if you please help me?

    Yours,

    chati

    Hi chati,.

    the fastest way to do this is to cut the connection, create a control on the exit of 'register of events' and add this to the cluster instead of the original refnum.

  • RefNum of event recording stops when the new event added

    I use dynamic registration of events to manage my user interface events in an another VI.  Whenever I have add a new event, the event registration refnum breaks and me have to recursively go through the code and replace all occurrences.  Is there a method of transmitting refnums record event so that it does not happen?  It should be a strict type def?

    Right-click on the wire on the record node, select Create indicator.

    On the Panel before, do a right-click on the reference control, select-> Advanced-> customize. A control editor will appear, select in the top bar on the ring 'Typedef' instead of 'Control '. Register the control.

    Now, in each VI, you use the reference, you need to replace the control. Check the Help window for each wire if it is bound to the control typedef.

    Now, to see if it worked, change your registration, everything must be interrupted.

    Create a control (of new ref) and replace the old typedef control (.ctl file) with new reference control. Automagically everything should be updated and working again.

    Tone

  • Add more dynamic events registration refnum

    Hello

    I have a wire that passes Event Registration refnum to my structure of the event. This thread is from VI, that I don't want to touch. He spent recording for the cluster of user events.

    I would add more dynamic events to the refnum (but not to the cluster), so I would like to re-record with the addition of new events.

    When I'm passing this refnum to block 'Register for events', LabVIEW does not allow me to expand this block and add new events, which I think is understandable.

    How can I add more dynamic events to the refnum?

    Close, but no cigar.  When you add user events, you want to be sure that every event has a unique name, then name your constants defining the events differently (as shown here).

    Bob Schor

  • shows how to create the cluster of refnum user event

    I try to understand and copy this sup - VI, but I have problem in the construction of this cluster of refnum user event, and how to build the local variable?

    \

    It looks like your confusion comes from not knowing how to make a group of data, it's an accurate observation?

    To a cluster, you must create an empty cluster and new drag and drop in the cluster. In this case, how to make a refnum of the event, which is the right type of data, you must follow these steps:

    1. Set up the user event create with datatype.
    2. Right-click in the output, and then click on create Constant. This constant is now your refnum of correct data type
    3. Drag the new constant to a cluster to add it to the cluster. This could be within your DataSet defined Type called "Private Events" or another cluster.

    If you change the data type of your event, the wires that connect this event to the cluster of data interrupts the measure where you will have a data type mismatch.

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

  • Feedback in the structure of the event loop

    Hello

    My application allows users to charge one of several screws in a secondary. Each VI disolaying one part of the system. The user enters the name of the required VI and pressing return or entry (Num pad) the VI is responsible. I would like to add that a THST feature allows user to go back and forth between these screws loaded I am writing a unique index to each VI in a table in the same event handler. I use your comments but the table is rewritten to each key index ieonly event of it currently oaded VI is written on the chalkboard at index 0. It's confusing as roads, refnum, etc. are transmitted to the next iteration (of while loop) very well using shift registers

    Any suggestions would be welcome

    If I understand correctly, you can have any or all running, regardless if you are looking to them or not, so I would say that the simplest solution is to build a picture of the vi refs (which is done easily at the stage of init with constants of vi - REF) and use a control of the ring with the names. On the event of modification of the order value, empty side and insert the new REF.

    /Y

  • several structures of event

    Experts,

    No harmful effect of having two event Structures, one in the main BD delivery of user interface events (button presses, menu etc.), another running into a Subvi loop, handle events of the user?

    My reason for doing is also blocking calls UI (like brining a dialogue password entry) could not be paid directly to the event Structure. I use the user events (and thus a corresponding event Structure) as the basis of a periodic Task Scheduler and my tasks get unmanaged queued properlyif something blocks the Structure of the event.

    Of course, I would be careful that there is no common event between the two structures. This would be easier, due to the nature of the Subvi in the event user manages the Structure of the event.

    Thoughts?

    Nothing inherently wrong to have multiple structures of event. Our application tend to have dozens and dozens at the same time, due to the fact that the user events, while demanding a bit of wiring and infrastructure, are incredibly useful things.

    The main caveats are:

    1. If you subscribe to a user event, wire the event record Refnum to more than one Structure of the event, or the behavior is undefined. Sometimes, one or more of the event structures don't receive the event. Instead, register the event several times, one for each structure of the event.

    2. As Ben said, save more than once for the same event of filter.

    Another easy way to circumvent the problem of blocking dialogue would be to create another loop whose sole responsibility is to pop up dialog boxes blocking. You can use a queue or user events or else send messages to and from this loop. A single loop should be enough, especially if the pop ups are modal and could only be active anyway. To be honest, I've never had to do this, but it seems it would work very well.

  • Need help with user events

    I have an initialize VI where I create a number of user events.  Originally, these consisting of a number of different types of data and have been released as a cluster.  However, I had to change this to an array of variant, as I'm indexing later user refnums in a loop FOR to generate a Boolean matrix of the conditions-based events.  As I'm unable to elements of a cluster index, I have all types of event data changed to variants so that I could pass them on in a table that could be indexed.  It seems, however, that the labels property that populate the structure of the event with the names of the individual event to select from are lost during the use of variants - the structure of the event shows that multiple instances of

    : User event

    in the drop-down list.  Is it possible to get the event names to persist or pass them in the structure of the event, so I can configure cases properly?

    It seems so the VI changed with the data types variant event works, but for some reason, the structure of the event did not update to reflect the changes.  After removing and recreating the event record Refnum indicator in my VI initialization and recharge the parent VI, everything seems to work as expected.

  • Event structure/state machine

    Here's the scenario.

    I use the buttons controlled by the user in an event structure to control a state machine. Currently, I have a different State for each button. However, 4 or 5 of these buttons could ideally correspond to the State, which is what I would like to get... Each of these 4 or 5 buttons causes flow data and the results are stored in a table, but listened data are different for each button! Therefore, if each of those 4 or 5 buttons caused the same condition occur how I could decipher what button was pushed? Ideally, I would have 4 or 5 different paintings once all the buttons are out of the same State.

    Is there anyway that I can achieve this?

    Hi the shots.

    you have access to the refnum of the element inside the event. With the Ref, you can simply get the name or any other property of the control to distinguish them.

    Mike

  • Events unregistering on a cluster without Unregistering for all dynamic events

    Hello everyone

    I've been playing with dynamic event record but I hit a problem.

    Normally if I want to stop triggering events on a single control I will be wire constant ref with the correct type in the registry for block of events. This means that I don't have to use the unregister for events block and then rebuild the entire events list to registry when I only want to stop the events on a control.

    However, if I try to bring together a group of the refs (which cannot necessarily be of the same type) in a cluster then I can no longer cancel the events on this cluster registration from the register of events work a group of control constants.

    An alternative would be to use an array instead of a cluster, but this has two disadvantages: it does not create a case of dynamic event for each Member of the array and all controls must be the same type or they are co-erced to a more generic control class.

    I've attached an example VI (labVIEW 2011 SP1)

    I think I finally get the problem now.

    You need feed two references in separately.  You can cluster the registry OUT for events, I know, but I don't think that what you want will work.  You know that you can enter the tables in a table instead of a cluster, right?

    Shane.

    PS to be clearer.

    Register to activate your button separately from the rest.  Save all your "to be marketed" references - individually, not clustered - in a second 'register to events' and then together the two outputs (with the Save refnums event) before passing into the structure of the event.  You might have what you want.  So big cluster AFTER signing up, not before.

  • 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

  • Error 1 to generate the user event

    I have a master/slave VI tester to evaluate the functioning of a Global functional error which should gather errors are generated in each loop.  I get 1 error: invalid parameters to the user events VI generate in the FG of entry error and do not know why.

    I enclose my (LV 8.5) shots of screw and screen, because I think that images would explain better than words.  I have documented the code to indicate what should happen and what is happening.

    Please let me know if you need more details.  Thank you! Your help is appreciated!

    ~ Kristen

    In the case of initialization of your VI main, you're going to initialize the FGV Subvi error.  But you can't give the refnum of user events to store in the shift register.

    When you use this FGV later, it uses the empty refnum into the shift register and sends that to generate the user event, and it gives an error.

Maybe you are looking for