ICP PCI-1800HU-S User manual

Type
User manual
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 1
PCI-1202/1602/180x Software Manual
(for Windows 98/NT/2K/XP)
Warranty
All products manufactured by ICP DAS are warranted against defective
materials for a period of one year from the date of delivery to the original purchaser.
Warning
ICP DAS assumes no liability for damage consequent to the use of this
product. ICP DAS reserves the right to change this manual at any time without
notice. The information furnished by ICP DAS is believed to be accurate and reliable.
However, no responsibility is assumed by ICP DAS for its use, nor for any
infringements of patents or other rights of third parties resulting from its use.
Copyright
Copyright 1998 by ICP DAS. All rights are reserved.
Trademark
The names used for identification only may be registered trademarks of their
respective companies.
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 2
Table of Contents
1.
INTRODUCTION ......................................................4
1.1 F
UNCTION
D
EFINE
.........................................................................5
1.2 E
RROR
C
ODE
D
EFINE
...................................................................8
1.3 C
ONFIGURATION
C
ODE
..................................................................9
1.4 P
RIORITY
...................................................................................10
2. DESCRIPTION OF FUNCTIONS ...........................11
2.1 T
HE
T
ESTING
F
UNCTIONS
............................................................12
2.1.0
P1202_FloatSub2.........................................................................................................12
2.1.1
P1202_ShortSub2..........................................................................................................12
2.1.2
P1202_GetDllVersion ....................................................................................................13
2.1.3
P1202_GetDriverVersion...............................................................................................13
2.2 T
HE
D
RIVER
F
UNCTIONS
..............................................................14
2.2.0
P1202_DriverInit...........................................................................................................14
2.2.1
P1202_DriverClose........................................................................................................14
2.2.2
P1202_GetConfigAddressSpace..................................................................................15
2.2.3
P1202_WhichBoardActive.............................................................................................15
2.2.4
P1202_ActiveBoard ......................................................................................................16
2.3 T
HE
DIO F
UNCTIONS
..................................................................17
2.3.0
P1202_Di ......................................................................................................................17
2.3.1
P1202_Do.....................................................................................................................17
2.4 T
HE
DA F
UNCTIONS
....................................................................18
2.4.0
P1202_Da.....................................................................................................................18
2.5 T
HE
AD F
UNCTIONS
....................................................................19
2.5.0
Introduction ...................................................................................................................19
2.5.1
P1202_SetChannelConfig.............................................................................................20
2.5.2
P1202_AdPolling...........................................................................................................20
2.5.3
P1202_AdsPolling.........................................................................................................21
2.5.4
P1202_AdsPacer..........................................................................................................22
2.6 T
HE
M
AGIC
S
CAN
........................................................................23
2.6.0
Introduction ...................................................................................................................23
2.6.1
P1202_ClearScan..........................................................................................................24
2.6.2
P1202_StartScan..........................................................................................................25
2.6.3
P1202_StartScanPostTrg.............................................................................................26
2.6.4
P1202_StartScanPreTrg...............................................................................................27
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 3
2.6.5
P1202_StartScanMiddleTrg..........................................................................................28
2.6.6
P1202_ReadScanStatus...............................................................................................29
2.6.7
P1202_AddToScan.......................................................................................................31
2.6.8
P1202_SaveScan .........................................................................................................33
2.6.9
P1202_WaitMagicScanFinish.......................................................................................34
2.6.10
P1202_StopMagicScan................................................................................................36
2.7 T
HE
M_F
UNCTIONS
.....................................................................37
2.7.0
Introduction ...................................................................................................................37
2.7.1
P1202_M_FUN_1.........................................................................................................38
2.7.2
P1202_M_FUN_2.........................................................................................................40
2.7.3
P1202_M_FUN_3.........................................................................................................41
2.8 T
HE
S
INGLE
B
OARD
B
ATCH
C
APTURE
...........................................43
2.8.0
Introduction ...................................................................................................................43
2.8.1
P1202_FunB_Start........................................................................................................44
2.8.2
P1202_FunB_ReadStatus ............................................................................................45
2.8.3
P1202_FunB_Stop........................................................................................................46
2.8.4
P1202_FunB_Get.........................................................................................................46
2.9 M
ULTI
-
BOARD
B
ATCH
C
APTURE
....................................................47
2.9.0
P1202_FunA_Start........................................................................................................47
2.9.1
P1202_FunA_ReadStatus ............................................................................................48
2.9.2
P1202_FunA_Stop........................................................................................................48
2.9.3
P1202_FunA_Get.........................................................................................................49
2.10 T
HE
C
ONTINUOUS
C
APTURE
........................................................50
2.10.0
Introduction....................................................................................................................50
2.10.1
P1202_Card0_StartScan...............................................................................................51
2.10.2
P1202_Card0_ReadStatus............................................................................................52
2.10.3
P1202_Card0_Stop.......................................................................................................53
2.10.4
P1202_Card1_StartScan...............................................................................................54
2.10.5
P1202_Card1_ReadStatus............................................................................................55
2.10.6
P1202_Card1_Stop.......................................................................................................56
2.11 T
HE
O
THER
F
UNCTIONS
..............................................................57
2.11.0
P1202_DelayUs.............................................................................................................57
3.
APPENDIX
................................................................58
4.
DEMO
......................................................................59
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 4
1. Introduction
PCI-1202/1602/180x Development Toolkit provides DLL (Dynamic Link Library) and
simple DEMOs. Those DEMOs will show you how easy to use DLL to complete the
I/O process without facing complex hardware.
This document introduces PCI-1202, PCI-1602, and PCI-180x series functions
in the DLL. It is intended to be a companion to know functions, using the special
functions (Continuous Capture, MagicScan...), programming, and error code
information.
These DLL can perform a variety of data acquisition operation as follows:
1. Testing function
2. Plag & Play function
3. DIO function
4. DA function
5. AD funciton
6. MagicScan function
7. M_Function
8. Continuous Capture function
9. Batch Capture function
Section 1.1 : Functions categories and define.
Section 1.2 : Error code define.
Section 1.3 : The list of Configuration code that can control amplifier signal.
Section 1.4 : The list of thread priority setting.
(With the priority setting, you can get higher thread priority in the OS.)
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 5
1.1 Function Define
When you read the function manual, please notice the "KeyWORD" for variables.
KeyWORD
Set before call
functions
Set after call functions and return
value
[Input] Yes No
[Output] No Yes
The functions in the PCI-1202 DLL are divided into 9 categories. (The red WORD
"P1202" of functions name could be replaced with "P1602" or "P180x" to use the
functions which have the same purpose defined in P1602 or P180x DLL.)
Example:
P1202_ClearScan(Void)P1602_ClearScan(Void) or P180x_ClearScan(Void)
Category Functions Define
float P1202_FloatSub2(float fA, float fB);
short P1202_ShortSub2(short nA, short nB);
WORD P1202_GetDllVersion(Void);
Test
WORD P1202_GetDriverVersion(WORD *wVxdVersion);
WORD P1202_DriverInit(WORD *wTotalBoards);
Void P1202_DriverClose(Void);
WORD P1202_GetConfigAddressSpace(WORD wBoardNo,
WORD *wAddrTimer,WORD *wAddrCtrl, WORD *wAddrDio, WORD *wAddrAdda);
WORD P1202_ActiveBoard( WORD wBoardNo )
Driver
WORD P1202_WhichBoardActive(Void);
WORD P1202_Di(WORD *wDi);
Digital I/O
WORD P1202_Do(WORD wDo);
D/A
WORD P1202_Da(WORD wDaChannel, WORD wDaVal);
WORD P1202_SetChannelConfig(WORD wAdChannel, WORD wConfig);
WORD P1202_AdPolling(float *fAdVal);
WORD P1202_AdsPolling(float fAdVal[], WORD wNum);
A/D
WORD P1202_AdsPacer(float fAdVal[], WORD wNum, WORD wSampleDiv);
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 6
Category Functions Define
WORD P1202_ClearScan(Void);
WORD P1202_StartScan(WORD wSampleRateDiv, DWORD dwNum, SHORT nPriority);
WORD P1202_StartScanPostTrg(WORD wSampleRateDiv, DWORD dwNum, SHORT
nPriority);
WORD P1202_StartScanPreTrg(WORD wSampleRateDiv, DWORD dwNum, SHORT
nPriority);
WORD P1202_StartScanMiddleTrg(WORD wSampleRateDiv, DWORD dwNum, DWORD
dwN2, SHORT nPriority);
WORD P1202_StartScanPreTrgVerC(WORD wSampleRateDiv, DWORD dwNum, SHORT
nPriority);
WORD P1202_StartScanMiddleTrgVerC(WORD wSampleRateDiv, DWORD dwNum, DWORD
dwN2,SHORT nPriority);
Void P1202_ReadScanStatus(WORD *wStatus, DWORD *dwLowAlarm, DWORD
*dwHighAlarm);
WORD P1202_AddToScan(WORD wAdChannel, WORD wConfig, WORD wAverage, WORD
wLowAlarm, WORD wHighAlarm, WORD wAlarmType);
WORD P1202_SaveScan(WORD wAdChannel, WORD wBuf[]);
Void P1202_WaitMagicScanFinish(WORD *wStatus, DWORD *dwLowAlarm, DWORD
*dwHighAlarm);
Magic
WORD P1202_StopMagicScan();
WORD P1202_M_FUN_1(WORD wDaNumber, WORD wDaWave, float fDaAmplitude, WORD
wAdSampleRateDiv, WORD wAdNumber, WORD wAdConfig, float fAdBuf[], float fLowAlarm,
float HighAlarm);
WORD P1202_M_FUN_2(WORD wDaNumber, WORD wDaWave, WORD wDaBuf[], WORD
wAdSampleRateDiv, WORD wAdNumber, WORD wAdConfig, WORD wAdBuf[]);
WORD P1202_M_FUN_3(WORD wDaNumber, WORD wDaWave, float fDaAmplitude, WORD
wAdSampleRateDiv, WORD wAdNumber, WORD wChannelStatus[], WORD wAdConfig[], float
fAdBuf[], float fLowAlarm, float fHighAlarm);
M_Function
WORD P1202_M_FUN_4(WORD wType, WORD wDaNumber, WORD wDaWave, float
fDaAmplitude, WORD wAdSampleRateDiv, WORD wAdNumber, WORD wChannelStatus[],
WORD wAdConfig[], float fAdBuf[], float fLowAlarm, float fHighAlarm);
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 7
Category Functions Define
WORD P1202_Card0_StartScan(WORD wSampleRate, WORD wChannelStatus[], WORD
wChannelConfig[],WORD wCount);
WORD P1202_Card0_ReadStatus(WORD wBuf[], WORD wBuf2[], DWORD *dwP1, DWORD
*dwP2, WORD *wStatus);
Void P1202_Card0_Stop(Void);
WORD P1202_Card1_StartScan(WORD wSampleRate,
WORD wChannelStatus[],WORD wChannelConfig[],WORD wCount);
WORD P1202_Card1_ReadStatus(WORD wBuf[], WORD wBuf2[], DWORD *dwP1, DWORD
*dwP2,WORD *wStatus);
Void P1202_Card1_Stop(Void);
Continuous
Capture
WORD P1202_FunA_Start(WORD wClock0Div, WORD wChannel0[], WORD wConfig0[],
WORD Buffer0, DWORD dwMaxCount0, WORD wClock1Div, WORD wChannel1[], WORD
wConfig1[], WORD *Buffer1, DWORD dwMaxCount1, SHORT nPriority);
WORD P1202_FunA_ReadStatus(Void);
WORD P1202_FunA_Stop(Void);
WORD P1202_FunA_Get(DWORD *P0, DWORD *P1);
WORD P1202_FunB_Start(WORD wClock0Div, WORD wChannel0[],
WORD wConfig0[], WORD *Buffer0, DWORD dwMaxCount0, SHORT nPriority);
WORD P1202_FunB_ReadStatus(Void);
WORD P1202_FunB_Stop(Void);
Batch
Capture
WORD P1202_FunB_Get(DWORD *P0);
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 8
1.2 Error Code Define
Error Code Define Table
Return Value Define Describe
0 NoError No error.
1 DriverHandleError
Invalid VxD/SYS handle. Note 1
2 DriverCallError
Call VxD/SYS error. Note 1
3
AdControllerError
A/D controller error. May be hardware error, please
contact agent.
4 M_FunExecError M_Functions Error.
5 ConfigCodeError A/D config error.
7 HighAlarm fAdBuf[?]>fHighAlarm
8 LowAlarm fAdBuf[?]< fLowAlarm
9 AdPollingTimeOut
AdPolling TimeOut.Note1
10 AlarmTypeError Alarm type error.
11 FindBoardError Found board error.
12 AdChannelError Invalid A/D channel.
13 DaChannelError Invalid D/A channel.(D/A channel must be 0 or 1)
14 InvalidateDelay dwDelayUs > 8191.
15 DelayTimeOut Delay TimeOut.
16 InvalidateData Invalid data.
17 FifoOverflow FIFO overflow.
18 TimeOut TimeOut.
19 ExceedBoardNumber Invalid board number. (First board number is 0)
20 NotFoundBoard
Can't detect board.Note1
22 FindTwoBoardError Can't detect second board.
23 ThreadCreateError Create thread error.
24 StopError Stop error.
25 AllocateMemoryError Allocate memory error.
Note 1: Please update driver and restart PC.
To get more information about the last release driver, please refer to
http://www.icpdas.com/download/pci/index.htm
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 9
1.3 Configuration Code
PCI-1002L/1800L/1802L Configuration Code Table
Bipolar/Unipolar
Analog Input
Signal Range
Gain
Settling Time
Configuration
Code
Bipolar +/- 5V 1 3 us 0x00
Bipolar +/- 2.5V 2 3 us 0x01
Bipolar +/- 1.25V 4 3 us 0x02
Bipolar +/- 0.625V 8 3 us 0x03
Bipolar +/- 10V 0.5 3 us 0x04
Bipolar +/- 5V 1 3 us 0x05
Bipolar +/- 2.5V 2 3 us 0x06
Bipolar +/- 1.25V 4 3 us 0x07
Unipolar 0V ~ 10V 1 3 us 0x08
Unipolar 0V ~ 5V 2 3 us 0x09
Unipolar 0V ~ 2.5V 4 3 us 0x0A
Unipolar 0V ~ 1.25V 8 3 us 0x0B
PCI-1202H/1800H/1802H Configuration Code Table
Bipolar/Unipolar
Analog Input
Signal Range
Gain
Settling Time
Configuration
Code
Bipolar +/- 5V 1 23 us 0x10
Bipolar +/- 0.5V 10 28 us 0x11
Bipolar +/- 0.05V 100 140 us 0x12
Bipolar +/- 0.005V 1000 1300 us 0x13
Bipolar +/- 10V 0.5 23 us 0x14
Bipolar +/- 1V 5 28 us 0x15
Bipolar +/- 0.1V 50 140 us 0x16
Bipolar +/- 0.01V 500 1300 us 0x17
Unipolar 0V ~ 10V 1 23 us 0x18
Unipolar 0V ~ 1V 10 28 us 0x19
Unipolar 0V ~ 0.1V 100 140 us 0x1A
Unipolar 0V ~ 0.01V 1000 1300 us 0x1B
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 10
PCI-1602 Configuration Code Table
Bipolar/Unipolar
Analog Input
Signal Range
Gain
Settling
Time
Configuration
Code
Bipolar +/- 10V 1 3 us 0
Bipolar +/- 5V 2 3 us 1
Bipolar +/- 2.5V 4 3 us 2
Bipolar +/- 1.25V 8 3 us 3
1.4 Priority
Thread's Priority Setting Table
Setting Define
-2 THREAD_PRIORITY_LOWEST
-1 THREAD_PRIORITY_BELOW_NORMAL
0(Defual) THREAD_PRIORITY_NORMAL
1 THREAD_PRIORITY_ABOVE_NORMAL
2 THREAD_PRIORITY_HIGHEST
15 THREAD_PRIORITY_TIME_CRITICAL
Others THREAD_PRIORITY_NORMAL
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 11
2. Description of Functions
The following list divides functions in the PCI-1202 DLL into 9 categories.
Testing function
Plag&Play function
DIO function
DA function
AD funciton
MagicScan function
M_Function
Continuous Capture function
Batch Capture function
In Section 1.1, the functions in each category are already listed in a table. This
section will explain functions more detail about function, syntax, parameters,
error code and the related DEMO.
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 12
2.1 The Testing Functions
2.1.0 P1202_FloatSub2
Calculate C=A-B in float format, float=4 bytes floating point number.
This function is provided for testing DLL linkage.
Syntax :
float P1202_FloatSub2(float fA, float fB);
Parameters :
fA : [Input] 4 bytes floating point value
fB : [Input] 4 bytes floating point value
Return :
Return = fA - fB
Demo :
DEMO1.C
2.1.1 P1202_ShortSub2
Calculate C=A-B in SHORT format, SHORT=16 bits signed number.
This function is provided for testing DLL linkage.
Syntax :
short P1202_ShortSub2(Short nA, Short nB);
Parameters :
nA : [Input] 16 bits value
nB : [Input] 16 bits value
Return :
Return = nA - nB
Demo :
DEMO1.C
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 13
2.1.2 P1202_GetDllVersion
Read the DLL version number of P1202.DLL.
Syntax :
WORD P1202_GetDllVersion(Void);
Parameter :
Void
Return :
Return = DLL version number
Ex.: return = 0x200, the DLL version is 2.0.
Demo :
DEMO1.C
2.1.3 P1202_GetDriverVersion
This subroutine will read the driver version number of Nappci.VxD in
Windows 95/98 or Napwnt.SYS in Windows NT.
Syntax :
WORD P1202_GetDriverVersion(WORD *wDriverVersion);
Parameter :
*wDriverVersion : [output] *wDriverVersion: address of wDriverVersion
Ex: wDriverVersion=0x200, the driver version is 2.0
Return :
0 : No Error
Others : Please refer to sec. 1.2
Demo :
DEMO1.C
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 14
2.2 The Driver Functions
2.2.0 P1202_DriverInit
Allocate resources needed from system and return the total board number in the
system. This function must be called once before using the I/O functions.
Syntax :
WORD P1202_DriverInit(WORD *wTotalBoard);
Parameter :
*wTotalBoard :[Output] *wTotalBoard: address of wTotalBoard
wTotalBoard=1 one PCI-1202 card in the system
wTotalBoard=n n*PCI-1202 cards in the system
Return :
0 : No Error
Others : Please refer to sec. 1.2.
Demo :
All demo programs.
2.2.1 P1202_DriverClose
This function will return the resources allocated from system. It must be called
once at the end of program.
Syntax :
Void P1202_DriverClose(Void);
Parameter :
Void
Return :
Void
Demo :
All demo programs.
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 15
2.2.2 P1202_GetConfigAddressSpace
Get the I/O address of PCI-1202 board n. This function is for debug. It is not
necessary to call this function in an application.
Syntax :
WORD P1202_GetConfigAddressSpace(WORD wBoardNo, WORD
*wAddrTimer,WORD *wAddrCtrl, WORD *wAddrDio, WORD *wAddrAdda);
Parameters :
wBoardNo: [Input] PCI-1202 board number (Start from 0)
*wAddrTimer: [Output] Get 8254 Timer I/O address map
*wAddrCtrl: [Output] Get Controller I/O address map
*wAddrDio: [Output] Get Digital I/O Port I/O address map
*wAddrAdda: [Output] Get A/D and D/A I/O address map
* Please refer to “PCI-1202/1602/1800/1802 Hardware manual” Chapter 3 for
more information,
Return :
0 : No Error
Others : Please refer to sec. 1.2.
Demo :
DEMO1.C
2.2.3 P1202_WhichBoardActive
Return the active board number.
Syntax:
WORD
P1202_WhichBoardActive(Void);
Parameter :
Void
Return :
Board number of the active board. (Start from 0)
First card => 0
Second card => 1
Demo :
DEMO1.C
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 16
2.2.4 P1202_ActiveBoard
This function sets one of the PCI-1202 boards active.
*This function must be called once before the D/I/O, A/D, D/A functions
.
Syntax :
WORD P1202_ActiveBoard(WORD wBoardNo);
Parameter :
wBoardNo: [Input] board number (Start from 0).
Return :
0 : No Error
Others : Please refer to sec. 1.2.
Demo :
All DEMO programs.
Reference :
The P1202_ActiveBoard(…) will take effect on all functions except the following:
P1202_FloatSub2
P1202_ShortSub2
P1202_GetDriverVersion
P1202_DriveInit
P1202_DriveClose
P1202_GetConfigAddressSpace
P1202_Card0_StartScan
P1202_Card0_ReadData
P1202_Card0_Stop
P1202_Card1_StartScan
P1202_Card1_ReadData
P1202_Card1_Stop
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 17
2.3 The DIO Functions
2.3.0 P1202_Di
This subroutine will read the 16 bits data from DI port.
*This function will refer to the current active PCI-1202. Use the
P1202_ActiveBoard(….) to set the active board.
Syntax :
WORD P1202_Di(WORD *wDi);
Parameter :
*wDi : [Output] address of wDi which store the 16 bits DI data
Return :
0 : No Error
Others : Please refer to sec. 1.2.
Demo :
DEMO1.C
2.3.1 P1202_Do
This subroutine will send the 16 bits data to DO port.
*This function will refer to the current active PCI-1202 board. Use the
P1202_ActiveBoard(….) to set the active board.
Syntax :
WORD P1202_Do(WORD wDo);
Parameter :
wDo : [Input] the 16 bits data sent to DO port
Return :
0 : No Error
Others : Please refer to sec. 1.2.
Demo :
DEMO1.C
When CN1 connect with CN2
P1202_Do(0x10) ;//Output 0x10
P1202_Di(*wDi) ;//*wDi=0x10 Input
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 18
2.4 The DA Functions
2.4.0 P1202_Da
This subroutine will send the 12 bits data to DA port.
*This function will refer to the current active PCI-1202 board. Use the
P1202_ActiveBoard(….) to set the active board.
Syntax :
WORD P1202_Da(WORD wChannel, WORD wDaVal);
Parameters :
wChannel : [Input] Analog output channel.
wChannel=0 (analog output Channel 0)
wChannel=1 (analog output Channel 1)
wDaVal : [Input] 12 bits data sent to DA port. 0=minimum and 4095=maximum.
The DA output can be +/- 5V or +/- 10V depending on the setting of hardware
JP1. The software can’t detect the state of JP1. So the maximum wDaVal
“4095” may be +5V or +10V
Return :
0 : No Error
Others : Please refer to sec. 1.2.
Demo :
DEMO1.C
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 19
2.5 The AD Functions
2.5.0 Introduction
AD/DA Polling Function process
P1202_DriverInit
():
Driver Initial and Get Resource
P1202_DriverClose() : Close Driver and Release Resource
P1202_ActiveBoard( ): Active Board
P1202_SetChannelConfig(): Set Channel and Config
P1202_AdsPolling(): Get A/D, D/A Value
or P1202_AdPolling(), P1202_AdsPacer(), P1202_Da()
PCI-1202 Software Manual
Version 2.05 Date: Jan-8, 2007 Page: 20
2.5.1 P1202_SetChannelConfig
This subroutine is used to set the AD channel configuration code. (Refer to
section 1.3) It also sets the active AD channel for P1202_AdPolling,
P1202_AdsPolling and P1202_AdsPacer.
*This function will refer to the current active PCI-1202 board. Use the
P1202_ActiveBoard(….) to set the active board.
Syntax :
WORD P1202_SetChannelConfig(WORD wChannel, WORD wConfig);
Parameters :
wChannel : [Input] AD channel number
wConfig : [Input] Configuration code. Refer to "Section 1.3 Configuration Table"
Return :
0 : No Error
Others : Please refer to section 1.2.
Demo :
DEMO1.C
2.5.2 P1202_AdPolling
This function will perform a single A/D conversion by software polling. The
P1202_SetChannelConfig function is used to change the active channel and
configuration code that the P1202_AdPolling function using.
*This function will refer to the current active PCI-1202 board. Use the
P1202_ActiveBoard(….) to set the active board.
Syntax :
WORD P1202_AdPolling(float *fAdVal);
Parameter :
*fAdVal :[Output] address of fAdVal which store the AD data, this data is
automatically computed from hexadecimal to float based on the setting of
P1202_SetChannelConfig.
Return :
0 : No Error
Others : Please refer to section 1.2.
Demo :
DEMO1.C
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59

ICP PCI-1800HU-S User manual

Type
User manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI