ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

plotstripchart in tabpanels

hello,
 
I am using tabpanels  and I have have stripcharts on them. On a tab I have two or three tabpanels and when I want to use the function plotstripchart, I cannot plot on different tabpanels.... I can only use this function as many times as i want but only on the same tabpanel otherwise I have this error message :
 
NON-FATAL RUN-TIME ERROR:   "test(2).c", line 554, col 21, thread id 0x00000F5C, function id 1:   Library function error (return value == -10 [0xfffffff6]). The control is not the type expected by the function
and here is my code :
 
 GetPanelHandleFromTabPage (panelHandle, PANEL_TAB_WEAK, 0,
                           &tabpanelHandle);
      
       PlotStripChart (tabpanelHandle, TABPANEL_CHARTX, dataX, NUM_VALUES*4, 0, 0, VAL_DOUBLE);
            
      PlotStripChart (tabpanelHandle, TABPANEL_CHARTY, dataY,NUM_VALUES*4, 0, 0, VAL_DOUBLE); 
     
//these two guys above are working well but the one following not :
 
PlotStripChart (tabpanelHandle, TABPANEL_0_EOM_VOLTAGE, dataX,NUM_VALUES*4, 0, 0, VAL_DOUBLE);
 
Thanks in advance
 
Estelle
      
0 Kudos
Message 1 of 3
(3,183 Views)

Hello Estelle,

tabPanelHandle is the handle for the first tab page on your tab control. If the stripchart is located on another tab page, you should get also a handle for this other tab page, using the function GetPanelHandleFromTabPage. If the control EOM_VOLTAGE is located on the tab page with index 1 (2nd page), use the following code:

GetPanelHandleFromTabPage (panelHandle, PANEL_TAB_WEAK, 0, &tabpanelHandle);     // First page on the tab control.
PlotStripChart (tabpanelHandle, TABPANEL_CHARTX, dataX, NUM_VALUES*4, 0, 0, VAL_DOUBLE);
PlotStripChart (tabpanelHandle, TABPANEL_CHARTY, dataY,NUM_VALUES*4, 0, 0, VAL_DOUBLE); 

GetPanelHandleFromTabPage (panelHandle, PANEL_TAB_WEAK, 1, &tabpanelHandle);     // Second page on the tab control.
PlotStripChart (tabpanelHandle, TABPANEL_0_EOM_VOLTAGE, dataX,NUM_VALUES*4, 0, 0, VAL_DOUBLE);

Success,

Wim

 

0 Kudos
Message 2 of 3
(3,180 Views)

Thanks,

 

I think it will help ......

 

estelle

0 Kudos
Message 3 of 3
(3,179 Views)