Instruction manual

AMPDIO DRIVERS
6.4.3.2 Set Normal Priority DIO_TC_restorenormalpriority........................................................... 100
6.4.3.3 Get Priority of User Interrupt Thread TCgetInterruptThreadPriority.................................. 100
6.4.3.4 Set Priority of User Interrupt Thread TCsetInterruptThreadPriority .................................. 101
6.4.4 Data Buffer Functions................................................................................................................ 102
6.4.4.1 Allocate a Short Integer Data Buffer allocateIntegerBuf ................................................... 102
6.4.4.2 Allocate a Long Integer Data Buffer allocateLongBuf ....................................................... 102
6.4.4.3 Free up a Short Integer Data Buffer freeIntegerBuf.......................................................... 102
6.4.4.4 Free up a Long Integer Data Buffer freeLongBuf.............................................................. 103
6.4.4.5 Read Data from a Short Integer Buffer readIntegerBuf..................................................... 103
6.4.4.6 Read Data from a Long Integer Buffer readLongBuf ........................................................ 104
6.4.4.7 Write Data to a Short Integer Buffer writeIntegerBuf......................................................... 104
6.4.4.8 Write Data to a Long Integer Buffer writeLongBuf ............................................................ 104
6.4.4.9 Copy a Block of Data to a Short Integer Buffer copyToIntegerBuf ................................... 105
6.4.4.10 Copy a Block of Data to a Long Integer Buffer copyToLongBuf ....................................... 105
6.4.4.11 Copy a Block of Data from a Short Integer Buffer copyFromIntegerBuf........................... 106
6.4.4.12 Copy a Block of Data from a Long Integer Buffer copyFromLongBuf............................... 106
6.4.4.13 Query Current Interrupt Position within a Short Integer Data Buffer getIntegerIntItem..... 107
6.4.4.14 Query Current Interrupt Position within a Long Integer Data Buffer getLongIntItem ........ 107
6.4.5 Basic Timer/Counter Functions................................................................................................. 108
6.4.5.1 Test if Timer/Counter is Free TCisAvailable ..................................................................... 108
6.4.5.2 Free-up Timer/Counter TCfreeResource .......................................................................... 108
6.4.5.3 Connect Timer/Counter Clock Source TCsetClock........................................................... 109
6.4.5.4 Get Connected Timer/Counter Clock Source TCgetClock................................................ 110
6.4.5.5 Get Linked Clock Channel TCgetLinkedClockChannel .................................................... 110
6.4.5.6 Connect Timer/Counter Gate Source TCsetGate............................................................. 111
6.4.5.7 Get Connected Timer/Counter gate Source TCgetGate................................................... 112
6.4.5.8 Get Linked Gate Channel TCgetLinkedGateChannel....................................................... 113
6.4.5.9 Configure Timer/Counter Mode TCsetMode..................................................................... 114
6.4.5.10 Read Timer/Counter Status TCgetStatus ......................................................................... 115
6.4.5.11 Get Timer/Counter Mode TCgetMode............................................................................... 115
6.4.5.12 Set Timer Count Value TCsetCount.................................................................................. 116
6.4.5.13 Set two Timer Count Values TCsetCounts ....................................................................... 117
6.4.5.14 Read Timer's current Count Value TCgetCount ............................................................... 118
6.4.5.15 Read Timer's current Up-Count TCgetUpCount............................................................... 118
6.4.5.16 Reads Two Timer’s current Count Values TCgetCounts.................................................. 119
6.4.5.17 Gets a Timer’s Initial Count Value TCgetInitialCount........................................................ 120
6.4.6 Differential Counter Functions................................................................................................... 121
6.4.6.1 Set-up Differential Counter Pair TCsetDiffCounters.......................................................... 121
6.4.6.2 Read Differential Count TCgetDiffCount........................................................................... 123
6.4.6.3 Read Differential Ratio TCgetRatio................................................................................... 123
6.4.6.4 Free Differential Counter Pair TCfreeDiffCounters ........................................................... 124
6.4.7 Millisecond Stopwatch, Event Recorder and Event Counting Functions .................................. 124
6.4.7.1 Prepare a Millisecond Stopwatch TCsetStopwatch .......................................................... 124
6.4.7.2 Start a Millisecond Stopwatch TCstartStopwatch ............................................................. 125
6.4.7.3 Get Stopwatch Elapsed Time TCgetElapsedTime............................................................ 126
6.4.7.4 Prepare an Event Time Recorder TCsetEventRecorder................................................... 126
6.4.7.5 Free-up Event Recorder Timer and Digital Input Channels TCfreeEventRecorder.......... 127
6.4.7.6 Convert Milliseconds into Time String TCgetTimeStr ....................................................... 127
6.4.7.7 Free-up Stopwatch Counter/Timers TCfreeStopwatch..................................................... 128
6.4.7.8 Prepare a 32-Bit Event Counter TCsetEventCounter ....................................................... 128
6.4.7.9 Reset a 32-bit Event Counter TCresetEventCounter........................................................ 129
6.4.7.10 Read a 32-bit Event Counter TCgetEventCount............................................................... 130
6.4.7.11 Free up 32-bit Event Counter TCfreeEventCounter.......................................................... 130
6.4.8 Frequency/Pulse Generation Functions.................................................................................... 131
6.4.8.1 Send Monostable Pulse TCsetMonoShot ......................................................................... 131
6.4.8.2 Generate Astable Multivibrator Waveform TCsetAstable ................................................. 132
6.4.8.3 Free-up Astable Multivibrator Counter/Timers TCfreeAstable.......................................... 133
6.4.8.4 Generate a Frequency TCgenerateFreq........................................................................... 133
6.4.8.5 Generate an Accurate Frequency TCgenerateAccFreq ................................................... 134