Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

1.USB-CAN Adapter Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18
At a glance
Powered by AI
The key takeaways are that the document discusses the features, installation, and use of a USB-CAN adapter for connecting a PC to a CAN bus network.

The main components of the CAN frame are the frame format bit, remote transmission request bit, data length code, message identifier, and data field.

Standard CAN frames use 11 bits for the message identifier while extended CAN frames use 29 bits. Extended frames also have 5 bytes for the identifier versus 3 bytes for standard frames.

Shenzhen Fangxing Liutong Industrial Co., Ltd.

USB to CAN Adapter Manual

USB-CAN Adapter Manual

Manual Ver: V1.80

Last Update: 2013.10.01

1 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

Content
Chapter 1: Features...............................................................................................................................3
1.1 Product Overview ............................................................................................................................3
1.2 Parameters........................................................................................................................................4
1.3 Typical applications..........................................................................................................................4
1.4 Packing Checklist ............................................................................................................................5
1.5 Technical support and services ........................................................................................................5
1.6 Product Selection Table ...................................................................................................................5
Chapter 2: Appearance and interface....................................................................................................6
2.1 Appearance of the product................................................................................................................6
2.2 Interface Definition ..........................................................................................................................6
2.3 Factory configuration ......................................................................................................................7
Chapter 3: Drivers Installation and USB-CAN Tool.............................................................................8
3.1 Your first time to install the driver into the system .........................................................................8
3.2 USB-CAN Tool Software...............................................................................................................12
3.3 Software operation and Features....................................................................................................12
3.4 Self-Test .........................................................................................................................................15
3.5 Simultaneous use of multiple USB-CAN ......................................................................................16
Chapter 4: Appendix.............................................................................................................................17
4.1 CAN2.0B standard .........................................................................................................................17
4.2 CAN2.0B extended ........................................................................................................................17

2 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

Chapter 1: Features

1.1 Product Overview


USB-CAN adapter is an intelligent CAN-bus communication interface that compatible with USB1.1 bus
and supports one/two CAN channels. Using this module will enable PC to connect to CAN-bus network
via USB bus, forming the CAN-bus network control nodes for the data processing and data collection for
the CAN-bus networks such as bus laboratory, industrial control, intelligent residential zone, auto
electronics network, and etc.
There are three independent types for USB-CAN adapter:
USB-CAN-1(x): signal channel intelligent CAN interface module
USB-CAN-2(x): dual-channel intelligent CAN interface module
CANalyst-II Analyzer: dual-channel intelligent CAN interface module, with CAN-bus protocol analysis
capabilities that support to analysis SAE-J1939 DeviceNet CANopen iCAN and user-selfdefine-protocol,
compatible with the ZLG CANPro software.
USBCAN intelligent CAN interface module is a powerful tool for CAN-bus products development and
CAN-bus data analysis. It has a small size and supports plug and play function. It is also the best choice
for the users who are using portable operation systems. USBCAN interface comes with an electrical
isolation module, which could be used to avoid the damage caused by the ground loop and enhance the
system reliability when working under a tough environment.
USB-CAN-1A and USB-CAN-2A intelligent CAN interface module is not isolated in the CAN-bus terminal
with USB direct power supply.
USB-CAN-1B,USB-CAN-1C,USB-CAN-2B,USB-CAN-2C intelligent CAN interface module and
CANalyst-II Analyzer is isolated with independently isolated DC-DC power module and High-speed
magnetic coupling isolation module in the CAN-bus terminal, that can make it has a strong anti-jamming
capability, thus greatly improving the reliability of the module used in harsh environments.
We also provided USB-CAN-Tool software to help users operating the USB-CAN adapter quickly.
USBCAN provides a uniform application programmable interface and the complete d emonstration code,
including VC, VB, LabVIEW, Delphi and C++ Builder, which make it convenient for user to develop
programs.
You do not need to understand the complicated USB interface communication protocol when you do
secondary software development with the USBCAN intelligent CAN interface module.

3 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

1.2 Parameters
 USB and CAN-bus protocol conversion;
 USB-CAN-1(x) is signal channel intelligent CAN interface module;
 USB-CAN-2(x) is dual-channel intelligent CAN interface module;
 CANalyst-II Analyzer is dual-channel intelligent CAN interface module with CAN-bus protocol
analysis capabilities;
 PC interface supports USB1.1 protocol and is USB 2.0 compliant;
 Supports CAN2.0A and CAN2.0B protocols supports standard and extended frame;
 Support CAN transmit and CAN Receive;
 Support data frame and remote frame;
 Programmable CAN-bus communication Baud rates from 10Kbps to 1Mbps;
 USB-CAN-(x)A products:not isolated in the CAN-bus terminal;
 USB-CAN-(x)B /C products: isolated with independently isolated DC-DC power module and High-
speed magnetic coupling isolation module in the CAN-bus terminal;
 CANalyst-II Analyzer: isolated with independently isolated DC-DC power module and High-speed
magnetic coupling isolation module in the CAN-bus terminal;
 Max data flow for a single channel: 8000 fps (standard frame) for receiving and 8000 fps(standard
frame) for transmitting;
 Buffer size:1000 frames length buffer for transmit(with auto repeat transmit when failed) per
channel,2000 frames length for receive per channel;
 Adopts USB bus power supply, eliminating the need for an external power supply;
 USB-CAN-(x)A products,no electrical isolation;
 USB-CAN-(x)B products, adopts electrical isolation, the isolation voltage is : 1000V;
 USB-CAN-(x)C products, adopts electrical isolation, the isolation voltage is : 2500V;
 CANalyst-II Analyzer, adopts electrical isolation, the isolation voltage is:2500V;
 Operating temperature: -20 ~ 85 ℃;
 Physical size: (length) 70mm * (width) 45mm * (height) 24mm;
 Product compatibility:Function library is similar to the library in Guangzhou ZLG USBCAN interface
module.

1.3 Typical applications

4 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

 Transmit or receive massages in CAN-bus network with PC or laptop's USB;


 The fast CAN network data collection, data analysis;
 CAN-bus-USB gateway;
 USB interface to CAN network interface;
 Extend CAN-bus line length;
 Industrial site CAN network data monitoring.

1.4 Packing Checklist


NO. Name Amount Comment
1 Adapter host 1
Includes: manual, drivers, secondary
development library files, the secondary
development sample program source
code, USB_CAN TOOL software, baud
2 CD-ROM 1 rate detection tools,etc.
3 USB data cable 1 gift
4 8Pin Terminal Blocks 1 gift
5 3-inch Phillips screwdriver 1 gift

1.5 Technical support and services


Return of goods unconditionally within 7 days from the date of receipt, 1 year free maintenance, lifelong
maintenance and upgrade services.
Technical support please contact:
Email: support@szjara.com
1.6 Product Selection Table
Model Channels Isolation Isolation voltage
USB-CAN-1A 1 No
USB-CAN-1B 1 Yes 1000V
USB-CAN-1C 1 Yes 2500V
USB-CAN-2A 2 No
USB-CAN-2B 2 Yes 1000V
USB-CAN-2C 2 Yes 2500V
CANalyst-II Analyzer 2 Yes 2500V
Note:

1. The penultimate number of USB-CAN products Model said the number of CAN channels,
and the last one said the isolation voltage level;
2. The isolation refers to isolation between USB and CAN, not isolated between the two CAN
channels.
3. CANalyst-II analyzer contains 2 CAN channels, industrial-grade isolation. Support protocol
analysis and compatible ZLG CANPro software.

5 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

Chapter 2: Appearance and interface

2.1 Appearance of the product


There are two sets of external interfaces in USB-CAN intelligent CAN interface module: A standard USB
interface, an 8-pin binding post terminals, CAN-bus interface.
LED Description:
PWR-Power indicator light, red;
CAN1-CAN Channel 1 indicator light, red, for indicating the transmitting or receiving state of the
channel 1(When the USB-CAN adapter insert into a USB interface, the power is turned on, the system
self-test, the light flashes twice);
CAN1-CAN Channel 2 indicator light, red, for indicating the transmitting or receiving state of the
channel 2(When the USB-CAN adapter insert into a USB interface, the power is turned on, the system
self-test, the light flashes twice);

Figure 1: USBCAN products uniform appearance (Specific kind shall prevail)


2.2 Interface Definition
Name Description

R+ Terminal resistance(internally connected to CANH)

R- Terminal resistance(internally connected to CANL)

CANH CAN_H signal cable

CANL CAN_L signal cable

6 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

Work:
CAN Transmit: When a user application call the Transmit-Function, a message will be push to the
channel T-Buffer(it’s a FIFO buffer) in USB-CAN adapter immediately, then
the CAN Controller transmit it to the CAN-Bus.
CAN Receive: The CAN Controller receives a CAN frame from CAN-Bus, and push it to the channel R-
Buffer(also a FIFO buffer) in USB-CAN adapter immediately, when a user application call the Receive-
Function ,the message will be return.
2.3 Factory configuration
1) CAN Baudrate:1Mbps;
2) Acceptance mask register:0xFFFFFFFF,means to accept all CAN frame;
3) Termination resistor is internally, connect the R+ and R- to active the resistor. The above description
is effective for each channel.

7 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

Chapter 3: Drivers Installation and USB-CAN Tool

3.1 Your first time to install the driver into the system
Connect USBCAN intelligent interface module to the PC with USB cable correctly. The Windows will then
auto run an installation wizard called “new hardware is found” after the hardware is detected. Select
“Install from a list or specific location(Advanced)”.
Click “Next” to continue;

If the windows do not run the wizard, open the “Device Manager” and find the “other devices” in other
devices list:

8 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

Right click “Unknown device”, and select “Update Driver” from the menu:

Select “Install from a list or specific location(Advanced)” .Click “Next” to continue:

9 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

In the next step, select “Search for the best driver in these locations.”, and check

“Include this location in the search:”, then click “Browse” button to browse the driver folder:

Use the “Browse For Folder” window selects where the driver at:

Click “OK” to finish select:


10 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

Click “Next” to search and install driver:

11 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

3.2 USB-CAN Tool Software


You must install the “LabVIEW 2011 Run Time Engine” if you are use the “USB CAN Tool” first time, it is
located in the “CD-ROM directory\Tools\LabVIEW 2011 RTE Setup.exe” and about 130MB hard disk
space is required.
The “USB-CAN Tool” is green software, copy it to any hard-disk directory,and run.
Attention: Never run “USB CAN Tool” in the CD-ROM directory, because it cannot create configuration
files and will cause an error!
If you need the termination resistor, set the R + and R-with a lead.
Connected to the USB interface of the device with the PC via USB.
Run “USB-CAN Tool.exe”,as shown in the following figure:

3.3 Software operation and Features


 Select Device
If use USB-CAN-1(x) product, select menu “Select Device”-> “USB-CAN”.
If use USB-CAN-2(x) or CANalyst-II Analyzer product, select menu “Select Device”-> “USB-CAN2.0”(the
default option).

12 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

 Start/Stop Device
Select menu “Device Operation”-> “Start”, to open all channels.
Select menu “Device Operation”-> “Stop”, to close all channels.
 Registers
Select menu “Device Operation”-> “Registers”, to view the registers’information(compatible the ZLG
mode).
 current configuration
Select menu “Information”-> “ParamNow”, to view the current configuration.
 Device Information
Select menu “Information”-> “Device Information”, to view the device information.
 Select Channel
USB-CAN-1(x) product have one channel , the index number is 0(Ch1).
USB-CAN-2(x) product have two channels , the index number is respectively 0,1(Ch1,Ch2).
Set CAN parameters to ensure that the setting for each channel.
 CAN Baud Rate
Select menu “Settings” -> “CAN Settings”, to open the CAN Settings dialog.
Select channel you want to modify, and then select the Baud-Rate from drop-down list or DIY
parameters by select the “self-define” item, click “Set” button near Baud-Rate settings.
Note: We recommend that you first set baud rate, then connect it to CAN-bus.
 Work mode
USB CAN products support 3 kind of work-mode: normal, listen , self-Test.
Normal: The CAN module will appear on the CAN-bus, and it can send and receive
 CAN messages.
Listen: The module will appear on the CAN-bus, but in a passive state. It can receive CAN
messages, but cannot transmit CAN messages or answer. This mode can be used as a bus monitor
because it does not affect CAN-bus communications but can observe the CAN-bus states.

13 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

Self-Test: For adapter self-test, CAN module receives its own messages. In this mode, the send part of
the CAN module is connected internally with the reception one. This mode will provide a "false" response,
so that don’t need another node to provide the acknowledge bit. And the CAN messages will not sent to
CAN-bus.
 Filter
Users can set the filter-mode , ACR and AMR to filter the received CAN messages.
 Transmit messages
Modify the message information on the send area, and click “send” button to transmit messages.
Note: The “System time” in data list is system time in computer, and compare with the actual
eventuate-time there may be up to 50ms difference.
Attention: The USB-CAN products will not receive acknowledge message when it isn’t connect to the
CAN-bus or parameters settings error , then it will resend the messages automatic until the message
is received by other node in CAN-bus or the USB-CAN product restart. There is 1000 frames length
send buffer, it will return 0 when call the “VCI_transmit” function failure.
 ID Format
There are two kind of format for ID: SJA1000 mode (Align Left) and Real ID(Align Right).
SJA1000 mode:SJA1000 internal registers format, the highest bit of the ID and ID byte Bit31
alignment. For example, standard frame ID = 2, make 0x00 00 00 02 shift left 21 bit, and the
SJA1000 mode ID is 0x 00 40 00 00; if the frame is extended one, make 0x00 00 00 02 shift left 3 bit,
then the SJA1000 mode ID is 0x00 00 00 10.
Real ID: The lowest bit (Bit0) of ID is aligned with the ID byte Bit0.For example, if ID=2, and the real
ID is 2 whatever the frame format is standard or extended.
 Enable/Disable Receive
Check “CAN receive enable” to open the receive thread. The latest messages will be shown in list
control in time. If uncheck “CAN receive enable”, when there are messages on CAN-bus, the receive
buffer on the USB-CAN adapter may overflow.

14 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

When in the high-speed receiving, it is best not operating the CAN settings, query etc. that can
impact of receiving.
 High-speed mode, show list data, information save
These three items are located in “Display” menu.
When the “High-speed mode” is checked, “show list data” and “information save” become invalid.
When the “”show list data” is checked, the latest messages will be shown in list control.
When the “information save” is checked, the messages will be save to the specified text-format
excel-file.
We recommend that you check the "high-speed mode" in order to save memory and CPU
consumption when using the high-speed transceiver.

3.4 Self-Test
Each channel supports self-test mode. To Self-test in the following steps:
1) Plug the USB-CAN adapter into the PC's USB, and then run the “USB-CAN Tool”.
2) -CAN”, and then
open the USB-CAN adapter, and set the “work mode” to “self-test” in next popup dialog.
3) In the main UI Send area, set “Frames=1”, “Send Interval=1000”, check “CAN receive enable”, then
click “send” button to send message. It will receive the same message in same channel.
4) If USB-CAN adapter is USB-CAN-2(x) product, you also can interconnect channel1 and cchannel2 to
test.
Tips:
If the above operation is not successful, please carefully check the correct steps. If it still does not work,
please contact consult factory.
If it can’t receive messages after the USB-CAN adapter restart, may need to restart the USB-CAN Tool.

15 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

When the actual debugging using the USB-CAN adapter, make sure that the CANH and CANL
connected correctly.

3.5 Simultaneous use of multiple USB-CAN


USB-CAN Tool supports the same computer at the same time to connect up to four USB-CAN modules.
A copy of the USB-CAN Tool to open another USB-CAN adapter, and a copy of the USB-CAN Tool can
only open a USB-CAN adapter.

16 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

Chapter 4: Appendix
4.1 CAN2.0B standard
There are 11 bytes in CAN standard frame, dividing it into two parts: information and data. The first three
bytes are part of information.
7 6 5 4 3 2 1 0
Byte1 FF RTR X X DLC(data length)
Byte2 (message ID)ID.10-ID.3
Byte3 ID.2-ID.0 X X X X X
Byte4 Data1
Byte5 Data2
Byte6 Data3
Byte7 Data4
Byte8 Data5
Byte9 Data6
Byte10 Data7
Byte11 Data8
Byte 1 is frame information. The bit 7 represents frame format, and in standard frame, FF=0; The Bit6
represents type of frame, and RTR=0 means data frame, RTR=1 means remote frame.
DLC represents the actual data length in data frame. Bytes 2-3 are message ID, and 11 bits is effect.
Bytes 4-11 are actual data area, and it is invalid for remote frame.

4.2 CAN2.0B extended


CAN extended frame information include 13 bytes, dividing it into two parts: information and data. The
first five bytes are part of information.
7 6 5 4 3 2 1 0
Byte1 FF RTR X X DLC(data length)
Byte2 (message ID)ID.28-ID.21
Byte3 ID.20-ID.13
Byte4 ID.12-ID.5
Byte5 ID.4-ID.0 X X X
Byte6 Data1
Byte7 Data2
Byte8 Data3
Byte9 Data4
Byte10 Data5
Byte11 Data6
Byte12 Data7
Byte13 Data8
Byte 1 is frame information. The bit 7 is frame format, and in extended frame FF=1; the bit6 is type of
frame and RTR=O represents data frame RTR=l is remote frame; DLC represents the actual data length

17 / 18
Shenzhen Fangxing Liutong Industrial Co., Ltd. USB to CAN Adapter Manual

in data frame
Bytes 2-5 are message ID its high 29 are effect
Bytes 6-13 are the actual data area and it is invalid for remote frame

18 / 18

You might also like