PCI-1680U/1682U User Manual
54
2.
While configuring target, the following commands are supported:
4.5
How to dispose message
CAN2.0 Spec. includes CAN 2.0A and CAN 2.0B. CAN 2.0A supports standard 11 bit
Identifier. CAN 2.0B supports both 11 bit Identifier and extended 29 bit Identifier. So
CAN 2.0B are compatible with CAN 2.0A. SJA1000 supports BasicCAN mode and
PeliCAN mode. BasicCAN mode supports CAN 2.0A, while PeliCAN mode supports
2.0B. Advantech CAN Windows WDM&CE Driver runs in PeliCAN mode, thus it can
support both Standard frame and Extended frame.
While sending and receiving messages, the user can set or tell the message type via
canmsg_t.flags. For detailed information, please refer to canmsg_t.
The following part introduces how to send and receive CAN messages.
4.5.1
How to send Standard frame, compatible with CAN 2.0A.
DWORD dwWrite=0;
canmsg_t WriteBuffer;
ZeroMemory(&WriteBuffer, sizeof(canmsg_t));
WriteBuffer.flags = 0; //Standard frame
WriteBuffer.id = 0;
WriteBuffer.length = 8;
for(int i=0; i<8; i++)
{
WriteBuffer.data[i] = i;
}
WriteFile(hDevice, &WriteBuffer, 1, &dwWrite, 0);
Optional
configures
Corresponding
value of target
Description val1
val2
CONF_ACC 0
Acceptance code regis-
ter and acceptance
mask register. Need to
enter reset mode.
Acceptance mask
register.default set-
ting: 0xFFFFFFFF
Acceptance code
register default set-
ting: 0xFFFFFFFF
CONF_ACCM 1
Acceptance mask only.
Need to enter reset
mode.
Acceptance mask
register default set-
ting: 0xFFFFFFFF
Reserved
CONF_ACCC 2
Acceptance code only.
Need to enter reset
mode.
Acceptance code
register default set-
ting: 0xFFFFFFFF
Reserved
CONF_TIMIN
G
3
Bit timing. Need to enter
reset mode.
Baud Rate default
setting: 125k
Reserved
CONF_LISTE
N_ONLY_MO
DE
8
Listen only mode.Need
to enter reset mode.
1: ON; 0: OFF default
setting: 0
Reserved
CONF_SELF_
RECEPTIOM
9
Self reception.
1: ON; 0: OFF default
setting: 0
Reserved
CONF_TIMEO
UT
13
Configure read and write
timeout.
Write timeout (ms)
default setting: 5s
Read timeout (ms)
default setting: 3s
CONF_ACC_F
ILTER
20
Acceptance filter mode:
1-Single, 0-Dual. Need
to enter reset mode.
1: Single; 0: Dual
default setting: Single
Reserved
Summary of Contents for PCI-1680U
Page 10: ...PCI 1680U 1682U User Manual 4 ...
Page 16: ...PCI 1680U 1682U User Manual 10 5 Click Next as the following 6 Click Next as the following ...
Page 22: ...PCI 1680U 1682U User Manual 16 ...
Page 26: ...PCI 1680U 1682U User Manual 20 Figure 3 2 PCI 1682U Silk Screen ...
Page 85: ...79 PCI 1680U 1682U User Manual Chapter 4 Software Requirements WDM CE ...
Page 90: ...PCI 1680U 1682U User Manual 84 4 8 2 2 Receive flow chart ...
Page 91: ...85 PCI 1680U 1682U User Manual Chapter 4 Software Requirements 4 8 2 3 Configure flow chart ...
Page 103: ...97 PCI 1680U 1682U User Manual Chapter 5 Pin Assignments and Wiring ...