LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with user event: changing data type causes vi broken

Hi All,

 

In my application, I use user event a lot. Since it is strill under development, I change the user event data type quite often.  Every time I change the data type will cause the  event ref change and vis using those user events broken, and I need to fix them one  by one.  It's quite annoying.  Any better way to deal with it?

 

Thanks a lot for any help.

 

Anne Zuo

0 Kudos
Message 1 of 5
(2,739 Views)
I am not positive, but I think if you make a type def (a custom control type) and use them everywhere instead of just a bool/string/int/cluster, if you change the typedef, it SHOULD update everywhere.  You may want to check out that option on a test, and verify though.
0 Kudos
Message 2 of 5
(2,734 Views)

I am using type def, and unfortunately it doesn't help.  😞

 

 Anne

0 Kudos
Message 3 of 5
(2,717 Views)
Are you using a type definition for the data cluster, for the event reference, or both?  You probably need both of them to be type definitions.  Try customizing your event reference control, make sure that the data type in it is your cluster type definition, and save that event reference as a new type definition.  Use that as your event reference control in your subVIs.
0 Kudos
Message 4 of 5
(2,706 Views)

Place your user event registration refnum and user event refnum inside typedefs ;

  1. right click on a typedef/user event wire
  2. select create->control
  3. copy the control from the front panel to the typedef

Now you have a typedef control for the event registration refnum and user event.

 

If you want to edit the user event data you have to go the steps described every time (it could be made easier by NI but hey).

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 5 of 5
(2,674 Views)