v PCI-1680U/1682U User Manual
Contents
Chapter 1 Introduction..........................................1
1.1 Description................................................................................................2
1.2 Features....................................................................................................2
1.3 Specifications............................................................................................3
1.4 Ordering Information.................................................................................3
Chapter 2 Install WDM driver ...............................5
2.1 Begin to use Advantech CAN device driver..............................................6
2.1.1 PCI device setup...........................................................................7
2.1.2 ISA device setup...........................................................................8
2.1.3 Port setup....................................................................................14
2.1.4 Device setup...............................................................................15
Chapter 3 Hardware Installation ........................17
3.1 Initial Inspection ......................................................................................18
3.2 Jumper Locations & Setting ....................................................................19
Figure 3.1 PCI-1680U Silk Screen.............................................19
Figure 3.2 PCI-1682U Silk Screen.............................................20
3.2.1 How to Set Jumpers....................................................................21
Figure 3.3 How to Set Jumpers.................................................21
3.2.2 Terminator Resistor Setup..........................................................21
Table 3.1: PCI-1680U/1682U Terminator Resistor Reference..21
3.3 Card Installation......................................................................................21
Chapter 4 Software Requirements ....................23
4.1 Introduction .............................................................................................24
4.1.1 Definitions, Acronyms, and Abbreviations ..................................24
4.1.2 Reference ...................................................................................24
4.2 Overview of Advantech CAN Windows WDM&CE Driver.......................24
Table 4.1: Hardware Support ....................................................26
4.3 Introduction to API...................................................................................27
4.3.1 CreateFile ...................................................................................27
4.3.2 CloseHandle ...............................................................................29
4.3.3 DeviceIoControl ..........................................................................29
4.3.4 ReadFile......................................................................................36
4.3.5 WriteFile......................................................................................39
4.3.6 SetCommMask ...........................................................................41
4.3.7 GetCommMask...........................................................................42
4.3.8 WaitCommEvent.........................................................................42
4.3.9 ClearCommError.........................................................................44
4.3.10 GetOverlappedResult .................................................................46
4.4 Structure List...........................................................................................48
4.4.1 canmsg_t ....................................................................................49
4.4.2 CanStatusPar_t...........................................................................50
4.4.3 Command_par............................................................................51
4.5 How to dispose message........................................................................54
4.5.1 How to send Standard frame, compatible with CAN 2.0A. .........54
4.5.2 How to send Extended frame, compatible with CAN 2.0B..........55
4.5.3 How to send RTR frame. ............................................................55