09-12-2017 09:26 PM
I am a trio in CVI,I want to get a RING's value using GetCtrlVal(PANEL,PANEL_RING',&ringvaule);but CVI report that "51, 31 Undeclared identifier 'PANEL_BINARYSWITCH_2'".and the Ring Control is in the TAB Control ,the TAB Control is in the PANEL.I doubt I wrote the wrong Control_ID,anyone can give me some advices?Thanks!
09-13-2017 02:38 AM
First of all, the first parameter in GetCtrlVal is not the panel constant name but the panel handle instead, which you get from LoadPanel. This is clearly stated in the help for the function, that you should carefully read.
After you understand this, when addressing controls on tab pages you must use the correct panel handle, which you obtain by calling GetPanelHandleFromTabPage command. Again, carefully read the help to understand what to put in command parameters.
09-13-2017 02:48 AM
Besides looking at the help for the functions you are calling, using the forum search function is a valuable resource you should take the habit to use before posting.
Handling controls on tab control pages has been widely discussed in the forum: a quick search would have returned several discussions that could have pointed you to the correct solution without need to post and wait for responses.
As an example, this is the result page for "addressing a control on a tab page" search: the first 3 or 4 discussions report the same answer as I gave you before.