I-7188XA Series User’s Manual ( Ver1.2, Feb/2014, 7MH-019-10 ) ---
127
Description: channel: 0-7, a total of 8 channels.
count: the amount of time to be counted.
Return Value: On success, returns NoError().
If the channel is out of range, returns ChannelError
(-15).
Example:
#include <7188xa.h>
void main(void)
{
unsigned long value;
int quit=0;
InitLib();
Print("\n\rTest the CountDownTimer...");
Print("\n\rPress 'q' to quit\n\r");
TimerOpen();
CountDownTimerStart(0,1000); /*use the CountDownTimer*/
while(!quit){
if(Kbhit()&&(Getch()=='q')) quit=1;
CountDownTimerReadValue(0,&value); /*reads the
CountDownTimer*/
Print("Test CountDown=%d\r",value);
if(value==0)
CountDownTimerStart(0,1000); /*restarts the CountDownTimer*/
}
TimerClose();
}
CountDownTimerReadValue()
Function: Reads the current value of the CountDownTimer(count).
Syntax:
int CountDownTimerReadValue(int channel,unsigned
long *value);
Header:
#include ”7188xa.h”
Description: If the return value is 0, it means that the time has
expired.
channel: 0-7, a total of 8 channels.
value: a pointer to the location where the value is to be
stored.
Return Value: On success, returns NoError().
If the channel is out of range, returns ChannelError
Содержание I-7188XA
Страница 62: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 62 5 6 COM1 RS 232 1 2 232...
Страница 90: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 90 1 2...
Страница 140: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 140...
Страница 146: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 146 Step 8 Make the project...
Страница 153: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 153 Step 8 Rebuild the project...
Страница 158: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 158...
Страница 161: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 161 Below snap shots are steps for install TC 3 0...
Страница 162: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 162...
Страница 164: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 164...