DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Create new event results in module's EHL cases being renamed to Unknown Event

Solved!
Go to solution

Hi folks, 

 

I attempt to create a new event in my Main module and all the module's EHL cases get renamed to Unknown Event.

Is it because I have placed the DQMH Reg Events method into a sub-vi ?  If not, could you offer me ideas on what to try to identify the problem ?

 

The module had passed the DQMH validation test OK prior to me attempting to create a new event.

 

Thanks in advance,

 

prior to creating new eventprior to creating new eventafter event creation EHL cases renamedafter event creation EHL cases renamed

 

REG_EVENTS are in a subviREG_EVENTS are in a subvi

Peter
0 Kudos
Message 1 of 4
(1,245 Views)
Solution
Accepted by topic author Peter_B

@Peter_B wrote:

Is it because I have placed the DQMH Reg Events method into a sub-vi ?

Short answer: Most likely, yes.

 

Whenever you touch framework/scripted code, chances are you will break the scripting. It is virtually impossible for us to foresee all the ways the code could be changed and present meaningful (error) messages to the user. We really would if we could.

 

As a side note, we usually do not place event registration functions into subVIs. The reason is that event registration references cannot be type-def'ed the way you expect them to. Meaning: When you change the event registration, those changes do not propagate across VIs, so you have to manually update each control or indicator of said event registration reference.

 

In your example, I can see how moving the event registration node into a subVI breaks two things:
1. The scripting can't find it anymore, because it searches for it on the BD of the Main.vi

2. The datatype of the reference coming out of your subVI would not update automatically even if the scripting found and updated the event registration node itself.

 

Hope that helps!




DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (Developer Experience that makes you smile )


Message 2 of 4
(1,229 Views)

Thanks for such a quick reply Joerg !  

 

In the next day or so I'll take the code out of the sub-vi and try again and report back.

Peter
0 Kudos
Message 3 of 4
(1,219 Views)

Placing the Register for Events method inside a sub-vi was indeed the problem, thank for confirming that Joerg.

 

Peter
0 Kudos
Message 4 of 4
(1,173 Views)