LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Periodic Table of Elements

Solved!
Go to solution

I can only guess that your event is configured to fire on any change of teh cluster so the ref you are getting back is a ref to the cluster and not the booleans inside the cluster.

 

You could configure the event to just fire of any of the booleans inside the cluster (done while configuring event structure such that it has as many events as there are booleans in the cluster, which is what I suspect is happening inside Ton's example only he is doing it dynamiclly.

 

Another approach would use an event for the cluster changing but when it does, compare the old an new values to see whcih boolean changed and thenuse a "Controls[]" from the cluster to select the element that changed AND THEN cast it as a boolean to get its name.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 11 of 43
(1,994 Views)

Without the actual code I am unsure how this happens.

 

The event I made was registered to the Cluster\AllControls value change event.

I know in earlier version of LabVIEW (7.x??) it is not possible to register for sub-cluster elements.

 

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!
0 Kudos
Message 12 of 43
(1,989 Views)

This image illustrates my previous described approach.

 

 

Ben

Message Edited by Ben on 11-24-2008 01:30 PM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 13 of 43
(1,986 Views)
Solution
Accepted by DanNatCorning

TonP had the right idea, the problem was that the control reference coming out of the Event structure is pointing to the cluster, not the controls within it.  Bob's method is also spot on but we can do one better because we have all the indices we need for the controls that have been pushed thanks to the OpenG search 1D array.   This will give you what I think you're looking for.

 

 


0 Kudos
Message 14 of 43
(1,980 Views)

Sorry my bad,

 

I assume that is was possible to register for value change events for all the controls inside a cluster.

It seems this is only possible in a way comparable to my previous example.

 

Ton

Message Edited by TonP on 11-24-2008 08:38 PM
Message Edited by TonP on 11-24-2008 08:38 PM
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 15 of 43
(1,978 Views)

TonP,

 

That is a terrific idea, I did not know you could do such a thing. I'm going to be adding that to my bag of tricks, thanks! 


0 Kudos
Message 16 of 43
(1,971 Views)
SiegeX, whatever was in you 2nd to last post is a broken link.  Did you have a screen capture there?
0 Kudos
Message 17 of 43
(1,962 Views)

Yes, there is a screen capture there. Thats odd you cant see it because it comes up fine for me and when I throw the link into the browser, the picture comes up.  Anyway, although my method works nicely, TonP was nice enough to give us a new method by registering for dynamic events.  This method is alot more flexible.  I decide to throw all the ideas together in this attached VI.  It will give you 3 ouputs of which you may or may not want to use all of them.  TonP will have to be nice enough to tell us how he got the Boolean property node to be of strict type so that we don't have to use the 'Varient to Data' VI.  Nevermind, I figured it out.  Apparently you just need to pick off a Reference from one of the Booleans inside the cluster and use that on the "To More Specific Class" VI.  The attached VI now includes this.

 


 

Message Edited by SiegeX on 11-24-2008 02:21 PM

Download All
0 Kudos
Message 18 of 43
(1,945 Views)

SiegeX wrote:

Yes, there is a screen capture there. Thats odd you cant see it because it comes up fine for me and when I throw the link into the browser, the picture comes up.  


Your original screenshots came up okay for me also.  But I see that you had them on some 3rd party web server.  Don't do that.  Always attach your images to your message, then insert the image links to the location on the NI discussion forum location.  Otherwise some people who might have that website blocked by their company firewalls won't be able to see it.  Or who can guarantee that website will still exist 5 years from now if someone comes across this message and want to see what you were talking about.

0 Kudos
Message 19 of 43
(1,935 Views)

Ahh, yes that makes alot of sense, I originally just attached them and assumed it would also pop-up on the thread but it did not. I  just assumed people were using 3rd party sites to host them so I did the same.  Your method of pointing back to the NI server is a superior way of doing that, but that requires editing the message after the fact does it not?  Or is there an easier way to figure out the URL of the image before submitting.  

 

Here is the same picture but hosted on NI's site for all to see.

 

 

Message Edited by SiegeX on 11-24-2008 02:34 PM

0 Kudos
Message 20 of 43
(1,931 Views)