Jump to content
gnshmrthy

Radio Button Refnum

Recommended Posts

Hi friends,

              I`m trying to access the reference of the radio button inside a subVI. I`ve created a class constant and made a cluster and when I use property node to collect its value i`m getting an error of Object reference invalid. Where am I going wrong?

post-29033-0-78453600-1383801692.png

post-29033-0-41193700-1383801695_thumb.p

post-29033-0-66223000-1383801699_thumb.p

Share this post


Link to post
Share on other sites
Hi Todd,

           Is that wrong posting the same question at two different forums? :oops:

It's not wrong.  The two forums share alot of the same knowledge but sometimes someone at NI's forums may have an idea that someone here did not.  When making a post that you want to involve both communities in, generally people will have a link to the same post on the other forum, so that anyone can get a more complete picture of the things you've tried, and suggestions others have made.

  • Like 1

Share this post


Link to post
Share on other sites
It's not wrong.  The two forums share alot of the same knowledge but sometimes someone at NI's forums may have an idea that someone here did not.  When making a post that you want to involve both communities in, generally people will have a link to the same post on the other forum, so that anyone can get a more complete picture of the things you've tried, and suggestions others have made.

 

The main goal for mentioning you cross-posted in another thread/forum is to prevent

that someone takes the time to answer your question here, while it may already been answered in the other thread/forum.

Edited by tnt
  • Like 1

Share this post


Link to post
Share on other sites

Happy in knowing the reason. Where am I going wrong in this case so that the class constant of an object can be used for the property nodes.

Share this post


Link to post
Share on other sites

Hi,

 

I guess you are getting the error because you have connected the constants (unfilled cluster) directly to the subvi.

You need to use the "Bundle By Name" to fill the cluster with the references of the controls.

  • Like 1

Share this post


Link to post
Share on other sites

Here it is, I`ve build an array with different data type reference and inside the subVI i`ve selected the particular reference and used "to more specific class" to get the control its reference and read the data. Is this correct or is there any suggestions are welcome to make it simple.

post-29033-0-35455200-1383915160.png

Share this post


Link to post
Share on other sites

Hi,

 

you did not clearly mention if you got it to work or not. If you pass the proper references to your last example, it should work.

 

Edit: I forgot to check the other thread first:

‎11-08-201306:46 AM

This way it works, but is it correct way of programming?

 

When doing it the way I proposed in my previous post, you don't need the "to more specific class" because all references keep their original type
(while in your example the build array reverts the types to the lowest common type)

post-2311-0-07242200-1383920646.png

(I don't have LV 2012 installed so I can't quickly test your snippets)

Edited by tnt
  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.