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

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

Advertisement

 TimerOpen()
Function:
Opens the timer function for use.
Syntax:
int TimerOpen(void);
Header:
#include "7188xa.h"
Description: Before any of the timer functions can be used the
Return Value: On success, returns NoError. If the Timer is already
Example:
#include <7188xa.h>
void main()
{
unsigned long time;
int quit=0;
InitLib();
Print("\n\rPress any key to start the timer");
Print("\n\rthen Press '0' to Reset the timer, '1'~'4' to insert a delay, 'q' to
quit\n\r");
Getch();
TimerOpen(); /*open the timer function*/
while(!quit){ /*sets the key function*/
if(Kbhit()){
switch(Getch()){
case '0':
TimerResetValue(); /*reset the timer*/
break;
case '1':
DelayMs(1000); /*delay unit is ms, uses system timeticks. */
break;
case '2':
Delay(1000); /*delay unit is ms, uses the Timer 1 feature of the
break;
case '3':
Delay_1(1000); /*delay unit is 0.1 ms, uses the Timer 1 feature
I-7188XA Series User's Manual ( Ver1.2, Feb/2014, 7MH-019-10 ) --- 121
and the user manual on the enclosed CD,
which can be found at
CD:\Napdos\minios7\document\ lib_manual_for
_7188xabc\index.htm
information.
TimerOpen() function must be called.
open, returns 1.
CPU. */
for more detailed

Advertisement

Table of Contents
loading

This manual is also suitable for:

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

Table of Contents