03-22-2009 01:47 PM
Hi,
I am a new user of LabWindows CVI 9.0. I am having a problem with easy tabs and loading channels on each tab. I get the from the DAQ on the first easy tab but am unable to get them on the rest.
I load the pannel and then convert from canvas to load the tabs. I have four tabs with names CH_1, CH_2, CH_3, CH_4.
Then I use
NIDAQmx_NewPhysChanAOCtrl(tabCtrl, CH_1_PHYS_1, 0); where PHYS_1 is a constant on the first tab
when I use
NIDAQmx_NewPhysChanAOCtrl(tabCtrl, CH_2_PHYS_2, 0);
NIDAQmx_NewPhysChanAOCtrl(tabCtrl, CH_3_PHYS_3, 0);
NIDAQmx_NewPhysChanAOCtrl(tabCtrl, CH_4_PHYS_4, 0);
it does not compile but gives an unknown error. My DAQ has four channels. Please help me and tell me what is the prob?
Solved! Go to Solution.
03-22-2009 04:56 PM
Hi lahorimunda,
the most common cause for problems on tab controls or easytab controls is the use of an incorrect panel handle: NIDAQmx_NewPhysChanAOCtrl takes a panel handle as the first parameters, while you are passing "tabCtrl" which seems to me is a control ID. I may be incorrect, but I would check this item first.
Now, for easytab controls, when you add panels to the tab control with EasyTab_LoadPanels you get back the panel handles, while if you are using EasyTab_AddPanels you already have obtained the handles; are those handles that must be passed to every function that must address a control on a tab page.
The same applies if you want to use native tab controls available in CVI9 instead of the EasyTab: you prepare the tab pages at design time and obtain the panel handles at run time with GetPanelHandleFromTabPage.
03-22-2009 11:20 PM
Hi Roberto,
Thanks a lot for your help. I needed to load panel handles for each tab which I did and now it works fine. tabctrl was a general panel handle I guess. Anyways thanks a lot.