LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Event Registration Error


@stevem181 wrote:

Try using an array of references instead of a cluster. See the attached example.

 

About your example:

 

Place the Register for Events node outside your While Loop. That way it only runs once without extra code.

There is rarely a reason to use a "Wait Until Next Multiple" function with an Event Structure.

 

steve


Appreciate the feedback steve and it certainly is a solution to the attached vi.

 

However, I must use a cluster as I'm inheriting code from another developer and it is advised to use the same format. Also a cluster is necessary as my controls maybe of type Ring instead of Boolean. Is there anyway to work around using the cluster?

0 Kudos
Message 11 of 14
(790 Views)

How many controls are in your cluster?

 

You could unbundle the cluster and feed each reference into it's own Value Change input on the Register for Events node.

Then in your Event Structure combine them by type. Or keep them separate if that works for you.

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
Message 12 of 14
(783 Views)

Cheers Steve, through ideas from yourself and Steve Chandler I've found a fix. Some of the controls in my cluster were type-def and some were strict type-def due to some boolean's mechanical action. I changed them all to strict type defs and then was able to register the cluster of references for the event(s). There were another couple of small issues along with this which solved the problem.

 

Thank you, 2 day problem over. 

0 Kudos
Message 13 of 14
(780 Views)

@stevem181 wrote:

How many controls are in your cluster?

 

You could unbundle the cluster and feed each reference into it's own Value Change input on the Register for Events node.

Then in your Event Structure combine them by type. Or keep them separate if that works for you.

 

steve


Thank you Steve.

 

Here is an image to go with your words.

 

 

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 14 of 14
(773 Views)