LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

NIO-DAQmx physical channel on easytabs

Solved!
Go to solution

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?

Regards,
Farhan Ahmad.
0 Kudos
Message 1 of 3
(3,390 Views)
Solution
Accepted by topic author lahorimunda

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.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(3,384 Views)

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.

Regards,
Farhan Ahmad.
0 Kudos
Message 3 of 3
(3,371 Views)