ICP DAS USA I-7188XA Series User Manual page 128

Hide thumbs Also See for I-7188XA Series:
Table of Contents

Advertisement

Example:
Please refer to "CountDownTimerStart ()" function for
more detailed information.
 InstallUserTimer()
Function:
Installs a custom timer function, which will be called at
intervals of 1ms.
Syntax:
void InstallUserTimer(void (*fun)(void));
Header:
#include "7188xa.h"
Description: fun: A pointer to the custom function. The function
Example:
#include <7188xa.h>
int Data[3]={0,0,0};
void MyTimerFun(void) /*custom timer function*/
{
static int count[3]={0,0,0};
int i;
for(i=0;i<3;i++){
Print("count[%d]=%d\r",i,count[i]);
count[i]++;
}
if(count[0]>=200){ /*LCD lamp1 blinks each 200 units*/
count[0]=0;
if (Data[0]==0) Data[0]=1;
else Data[0]=0;
lamp(1,1,Data[0]);
}
if(count[1]>=500){ /*LCD lamp2 blinks each 500 units*/
count[1]=0;
if (Data[1]==0) Data[1]=1;
else Data[1]=0;
lamp(2,1,Data[1]);
}
if(count[2]>=1000){ /*LCD lamp3 blinks each 1000 units*/
count[2]=0;
if (Data[2]==0) Data[2]=1;
else Data[2]=0;
lamp(3,1,Data[2]);
}
}
I-7188XA Series User's Manual ( Ver1.2, Feb/2014, 7MH-019-10 ) ---
(-15).
cannot use an input argument and cannot return a value.
128

Advertisement

Table of Contents
loading

This manual is also suitable for:

I-7188xaI-7188xbI-7188xcI-7188I-7188xadI-7188xbd ... Show all

Table of Contents