gnshmrthy Posted November 7, 2013 Report Share Posted November 7, 2013 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? Quote Link to comment
todd Posted November 7, 2013 Report Share Posted November 7, 2013 Cross-post: http://forums.ni.com/t5/LabVIEW/Radio-button-refnum-control/m-p/2613039#U2613039 Quote Link to comment
gnshmrthy Posted November 7, 2013 Author Report Share Posted November 7, 2013 Hi Todd, Is that wrong posting the same question at two different forums? Quote Link to comment
hooovahh Posted November 7, 2013 Report Share Posted November 7, 2013 Hi Todd, Is that wrong posting the same question at two different forums? 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. 1 Quote Link to comment
tnt Posted November 7, 2013 Report Share Posted November 7, 2013 (edited) 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 November 7, 2013 by tnt 1 Quote Link to comment
gnshmrthy Posted November 8, 2013 Author Report Share Posted November 8, 2013 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. Quote Link to comment
tnt Posted November 8, 2013 Report Share Posted November 8, 2013 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. 1 Quote Link to comment
gnshmrthy Posted November 8, 2013 Author Report Share Posted November 8, 2013 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. Quote Link to comment
tnt Posted November 8, 2013 Report Share Posted November 8, 2013 (edited) 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) (I don't have LV 2012 installed so I can't quickly test your snippets) Edited November 8, 2013 by tnt 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.