cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

Radio button refnum control

Hi friends,

          I`m trying to get the value of radio button reference in a subVI connected in form of cluster. When I try to run it I`m getting an object reference error. I`ve attached the  snippet of my VI`s. Guide me in resolving it.

 

Regards Ganesh

Baixar tudo
0 Kudos
Mensagem 1 de 9
4.826Exibições

You may get the object reference error when you pass a Null reference. Check whether you have connected the reference and passing it properly. At the place where you are getting the error you can probe the reference and check it is not equal to 0. You can always use the function "Not a Number/Path/Refnum?" to check for valid reference.

-----

The best solution is the one you find it by yourself
0 Kudos
Mensagem 2 de 9
4.813Exibições

I hope then i`m going wrong in creating the refnum of the radio button in the sub VI. I used control refnum right click select VI server class-> Generic-> GObject-> control->cluster->radio buttons is this correct way to create the reference control in a subVI.

0 Kudos
Mensagem 3 de 9
4.781Exibições

Generally the best way to create a control refnum constant is directly from the control itself. Right-click the control and create a reference, then right-click the reference and create a constant from it.

0 Kudos
Mensagem 4 de 9
4.771Exibições

Hi Nanthand,

                 Yeah i`ve created the same way as you described and made into cluster. In a SubVI we need to create a Control Refnum to pass the reference from the MainVI. I created that as I discussed in my


@nathand wrote:

Generally the best way to create a control refnum constant is directly from the control itself. Right-click the control and create a reference, then right-click the reference and create a constant from it.



previous post.

0 Kudos
Mensagem 5 de 9
4.753Exibições

You should create the control the same way you created the constant, directly from a reference to the original control, or by taking a copy of the constant and changing it to a control.

0 Kudos
Mensagem 6 de 9
4.737Exibições

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

0 Kudos
Mensagem 7 de 9
4.724Exibições

@gnshmrthy wrote:

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


Not really. Replace the Build Array with Bundle so you'll have a cluster instead of an array, and remove the other cluster constant input.

0 Kudos
Mensagem 8 de 9
4.710Exibições

Yeah I did that as suggested at LAVA http://lavag.org/topic/17705-radio-button-refnum/ thanks for the support. Kudos for the slution & support.

0 Kudos
Mensagem 9 de 9
4.677Exibições