LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is this a reasonble way to make a LED blink?

Is this a reasonble way to make a LED blink supposing that LED_Timer is
caled every .5 secs?
StatusTimes is defined as Int globally.
int CVICALLBACK LED_Timer(int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_TIMER_TICK:

StatusTimer++;

if (StatusTimer % 2)
SetCtrlVal (msgPanel, MSG_PANEL_REQUEST_LED1, 1);
else
SetCtrlVal (msgPanel, MSG_PANEL_REQUEST_LED1, 0);

break;
}
return 0;
}
0 Kudos
Message 1 of 2
(2,981 Views)
Yes!
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 2 of 2
(2,981 Views)