LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid Control ID

Hi AbsolutelyAndrew,

can you post a reduced version of your program that shows up the behaviour you are observing? This would make easier to discuss on this problem, as it seems that usual causes of unexpected behaviour related to tabs have already been addressed in your code.



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 11 of 13
(1,057 Views)

@AbsolutelyAndrew wrote:

My start and stop timer functions:

 

void StopIMUTimer(void)
{
    SetCtrlAttribute(panelHandle,PANEL_IMU_TIMER, ATTR_ENABLED, 0);    //Stop Timer    
}

void StartIMUTimer(void)
{
    ResetTimer(panelHandle,PANEL_IMU_TIMER);
    SetCtrlAttribute(panelHandle,PANEL_IMU_TIMER, ATTR_ENABLED, 1);    //Start Timer    
}

 

I'm using the callback generated by the tab control.  For EVENT_ACTIVE_TAB_CHANGE, if the tab in question is active, the timer is started.  If it is not active, the timer is stopped.

 

Using this methodology, no timer callback should occur after StopIMUTimer(), correct? 

 


It depends what you mean by "no timer callback should occur". If you have a conventional switch() statement inside the timer callback which is filtering on EVENT_TIMER_TICK, then you are correct in that this code should not be executed. There is also an EVENT_DISCARD, which could be being called at the point of QuitUserInterface() - so it is possible for the callback to still be invoked with this event. As long as you have software in place to check the event code there should not be a problem.

 

JR

Message 12 of 13
(1,047 Views)

JR has hit the nail on the head.  Well done, and thank you.

0 Kudos
Message 13 of 13
(1,029 Views)