Home

User Manual

image

Contents

1. 1 CHAPTER WIN CAN USB CAN bus Product Overview This chapter contains general information that will be useful to know before using the UCAN CAN bus Board and the details about the USB CAN bus hardware utility Page 4 USB CAN bus User Manual V1 2 Chapter 1 Product Overview This chapter provides an overview of the UCAN CAN bus Board which can be connected with the PC to create a simple two mode Controller Area Network CAN bus and it can be controlled or monitored via the PC interface Using the PC interface user can configure the UCAN board registers send CAN bus and receive CAN messages This board is using the USB interface to connect with Windows or Linux OS Compatible PC It is also suitable for use with laptop computers Any PC can be linked to CAN bus network through this unit With the so called isolation version of the USB CAN adapter which can tolerates up to 2500V galvanic between the PCs JEE W l oy r tlle w 1 005258 USB Micro Contro Phil ips Philips __ pBridge C8051F363 ae TJA1050T Pie FT2232H m irm1sor M USB Philips soe ee TJA1050T mai Bridge Isolator Micro Contro Fhilips FT2232H C8051F363 aTA1000 Diagram 1 1 USB CAN bus Utility 1 1 Required Properties at a glance Connection of a High speed CAN CAN specification 2 0A and 2 0B to a PC Use of USB port at the PC Prefer with USB 2 0 compatible For 1M bps High bit rate Power supply via USB connection
2. Page 13 Page 14 USB CAN bus Win CAN Software Quick Start Guide This chapter describes how to use the WIN CAN software and Technical Spec of CAN bus Hardware Page 15 User Manual V1 2 CHAPTER USB CAN bus User Manual V1 2 Chapter 3 WIN CAN Software Quick Start Guide 3 1 WIN CAN Software Overview Program Start Step 1 After you finished the installation of WIN CAN driver you can find the icon of this program as follows please double click the WIN CAN icon WIN CAN Step 2 After you executed the program of WIN CAN a dialog for the selection of the CAN bus hardware as well as the setting of CAN bus parameters appear after the program start Connect to WIN CAN x a WI N CAN for USB Available CAN Hardware Device Index 0 ID 4036010 Location 1D 561 De n USB Senal Cable Device Index 1 ID 4036010 Location ID 581 Description USB lt gt Senal Cable ID Information C Standard Form 0 00000000 Her To Ox1 FFFFFFF Hex Extended Baud Rate fiM Bit s Run Cna Page 16 USB CAN bus User Manual V1 2 USB CAN bus User Manual V1 2 Step 3 There are Standard and Extended mode of ID information As the Step 5 After you click the Run button the WIN CAN Transmit Receive window Standard mode the parameters set up from O x000 to Ox 7FF by hexadecimal will pop up as follows The icons are the hot keys for
3. Equipped with the CAN controller SJA1000 by Philips CAN bus transfers rate up to 1MB bit s CAN bus connection 9 pin D Sub male pin assignment by CiA Recommendation DS102 VV V VV NN Galvanic isolation at CAN bus connection up to 2500V Support for operating system Windows 2000 SP4 XP Vista Vista 64 bit Windows 7 Windows 7 64 bit and Linux v v Page 5 USB CAN bus User Manual V1 2 1 2 Hardware Specification UCAN board is equipped with Philips SJA1000 chips which are designed for use as the USB CAN bus application The UCAN board delivers the baud rate up to 1M bits per second as its data transferring speed CAN bus Data Transfer bi directional transmission speeds Packages Sec Simplex Transfer send or receive only 3800 Duplex 1000 Transfer send and receive simultaneously Table 1 1 CAN bus Data Transfer speed bi directional Figure 1 1 UCAN Board Top View Figure 1 2 UCAN Board 45 degree angle view Page 6 USB CAN bus User Manual V1 2 ThE Sein dou Tal Oh s f eu A USB1 EET oT Hg y Go ick 45 H 4 onin vita me DE Es mi ut r a TON anc ce rom JU OCC E 4 Si Dodoo I x Le JCANDS 14 JP5w ve JP2 m er J3 Figure 1 3 UCAN Board Dimension CH2 CH2 CH2 CH1 CH1CH1 GNDLow High GNDLowHigh Figure 1 4 UCAN Board CAN BUS 1 0 Port Pin Definition Page 7 USB CAN bus CAN bus Hardware
4. 00 00 00 00 00 142 2195 Manual New Edit Delete Clear Transfer Rate Device Index 0 Connected to USB CAN 666 kBivs Step 7 After click New it will pop up the new message window You need to set up the ID information Hex Length and Data into the settings ID Hex s Data 0 7 12 22 133 44 155 Step 8 After you finish the new data setting click the Transfer Rate it will pop up Transfer Rate you can choose mini seconds or select full speed to transfer the data by WIN CAN Transfer Fate Full Speed Page 19 USB CAN bus W User Manual V1 2 CHAPTER indows SDK API Specification This chapter shows the Windows SDK API Code Page 20 USB CAN bus User Manual V1 2 USB CAN bus User Manual V1 2 Chapter 4 CAN bus Windows SDK API Specification 4 2 Function Documentation 4 2 1 FTDI FT_ STATUS WM_OPEN uint DeviceNo 4 1 Define Documentation Description Open by device index All kinds of transmitting rate enum BaudRate BR_20KBPS 0 BR_40KBPS 1 Parameters BR_5OKBPS 2 DeviceNo IN BR_80KBPS 3 If it exist two devices device will be assigned index 0 and 1 respectively BR_100KBPS 4 Type uint BR_125KBPS 5 Ex BR_200KBPS 6 using CanbusSDK BR_250KBPS 7 using FTD2XX_NET BR_400KBPS 8 BR_500KBPS 9 canbus WinCan new canbus BR_666KBPS 10 if WinCan WM_OPEN 0 FTDI FT
5. Pin Definition GND CAN2 L Normal terminator resistor 1 Short 2 1200 Page 8 User Manual V1 2 1200 Normal O USB CAN bus User Manual V1 2 USB CAN bus User Manual V1 2 Chapter 2 WIN CAN Driver and AP Installation 2 1 Connection to the PC We recommend that you set up the driver before connecting the WIN CAN USB CAN bus module to the PC for the first time Please follow the following steps to set up the driver 2 2 CAN Bus Driver Installation Step1 Insert the USB CAN bus driver CD that comes with the accessories into the D PC s CD ROM Open the file folder named Windows AP Windows Embedded Standard CHAPTER Win CAN Driver amp AP Installations This chapter provides how to install the CAN bus driver and software installations Page 9 Page 10 USB CAN bus Step2 Double click the Drivers folder then proceed User Manual V1 2 Ge windows AP a amp Fie Edt Wow Fovontes Took Hep F3 Address C3 C Documents and Settngsh dmnetratorDesktop Windours AP Ta Rename this folder L Mowe this Folder 4 fh Copy this folder 3 ZAR o Publish this folder to the Web dotnetfx2 0 EX Shore this folder Express Setup G E mail this Foldor s files ps a ot dK Delete th s Folder E Destop My Documents Shared Documents iy My Computer EQ My Network Places Fie Edt ew Favorites Tools Help Q OF Pod r s Fi j Rename this Fo
6. bus User Manual V1 2 dev IN dev IN Description Device index Description Device index Type enum DEVICE_USB_CAN Type enum DEVICE_USB_CAN Returns Returns _WM_OK if successful otherwise the return value is an error code _WM_OK if successful otherwise the return value is an error code 5 3 7 int WM_HW_RESET enum DEVICE_USB_CAN dev Description Hardware Reset Function Parameters dev IN Description Device index Type enum DEVICE_USB_CAN Returns _WM_OK if successful otherwise the return value is an error code 5 3 8 int WM_SW_RESET enum DEVICE_USB_CAN dev Description Software Reset Function Parameters Page 39 Page 40
7. setting on the top left corner numbers And the Extended mode the parameters set up from Ox 00000000 to of the window it is the user friendly interface to people to operate Ox 1FFFFFFF also by the hexadecimal calculating ways Connect to WIN CAN ra WIN CAN russ Available CAN Hardware Device Index 0 ID 4036010 Location ID 311 Description USE Receive lt gt Serial Cable A Device Index 1 ID 4036010 Location ID 611 Description USB lt gt Serial Cable A ID Information Extended Transmit Baud Rate 1M Bits Le Index 0 Connected to USB CAN 666 LBs Step 4 The Baud Rate speed can be adjusted from 50 kBit s to 1Bit s gt then click Run button Connect to WIN CAN It disconnects current device and reselect it again L Aves CAN Hantwere Reset It makes hardware reset and clear receive and Device Index 0 ID 403001 ocahon ID 6 Dexnpton USB lt gt Serna Cable A transmit window BIS It adds a new transmit package Bee It exits the WIN CAN program RE Get State Info It shows the mode and baud rate of the current Extended setting ou at It shows the version of the software Page 17 Page 18 USB CAN bus User Manual V1 2 Step 6 Click the right button of mouse on the transmit zone you can set up edit the new transmit data in this zone Action Transmit About BouBsb ee Data Length Data Period rigger 00 00
8. the opened device Parameters bAcceptID IN Description Set opened device ID OxOO OxFF Type BYTE Point Page 34 USB CAN bus User Manual V1 2 bBRatelndex IN Description Set transmitting rate Type BYTE bAcceptMask IN Description It s defined as a filter and it determines to receive any corresponding sending data Type BYTE Point X don t care The identifier consist of 11 bits ID 10 is most significant bit Only ID 3 1D 10 can be set At the bit positions containing a 1 in the mask any value is allowed in the composition of the identifier The same is valid for the three least significant bits bMode IN Description 0 Standard Mode 1 Extended Mode Type BYTE dev IN Description Device index Type enum DEVICE_USB_CAN Returns Page 35 USB CAN bus User Manual V1 2 _WM_OK if successful otherwise the return value is an error code 5 3 4 int _WM _WriteOnePacket BYTE bID BYTE bLen BYTE writebuf enum DEVICE_USB_CAN dev Description Write data with this ID header via opened device Parameters bID IN Description Write data with this ID OxOO OxFF header to wanted device Type BYTE Point bLen IN Length of data to be wrote 0 8 Type BYTE writebuf IN Description Written Data Type BYTE Point dev IN Description Device index Type enum DEVICE_USB_CAN Returns _WM_OK if successful
9. FF id i 2 OxFF id i 3 OxFF datalen i 0 8 for int j 0 j lt 8 j datali j j FTDI FT_STATUS ftStatus cb WM_WriteMultiPackets i id datalen data Returns FTDI FT_STATUS FT OK if successful otherwise the return value is FTDI FT STATUS error code Page 25 USB CAN bus User Manual V1 2 4 2 5 FTDI FT STATUS WM_ReadPacket ref bytel bID ref byte bLen byte readbuf ref int busheavy ref int mode Description Read data via opened device Parameters ID OUT Read data with this ID header via opened device Type ref byte array bLen OUT Received data length Type ref byte readbuf OUT Received data Type byte array Busheavy OUT If signal ocurrs some error to result in device not to work it will return false Type ref int mode OUT It show that the data format is standard or extended mode Type ref int EX byte ID new byte 4 byte Len 0 int status 0 int mode 0 byte receivedata new byte 8 WinCan WM_ReadPacket ref ID ref Len receivedata ref status ref mode Returns FTDI FT_STATUS FT OK if successful otherwise the return value is FTDI FT STATUS error code Page 26 USB CAN bus User Manual V1 2 4 2 6 FTDI FT_ STATUS WM_GET_STATE ref int Mode ref int BaudRate ref int ErrorCode ref int ErrorLimit ref int RxError ref int TxError Description Get bus status Parameters Mode OUT It shows cur
10. USB CAN bus User Manual V1 2 USB CAN bus User Manual V1 2 Revision History June 25 2010 1 Initial draft User Manual UCAN Board USB CAN bus User Guide Revision 1 2 Page 1 Page 2 USB CAN bus User Manual V1 2 Index Chapter 1 Product OvervieW s sssss1 5 1 1 Required Properties at a glance nnonannnnunnnnnnnnnnnnnnnnnnnnnnnnne 5 1 2 Hardware Specification iii 6 Chapter 2 WIN CAN Driver and AP Installation sscscssssssesenseseesees 10 2 1 Connection to the PC cccccececceseeceseeeeseeeeseeeeeeueuseeeeeeneesans 10 2 2 CAN Bus Driver Installation ccccccceceeeeeeeeeeeeeeeeeeeeeeneeeees 10 23 WIN CAN Software Setup 13 Chapter 3 WIN CAN Software Quick Start Guide csscsseseeeeeeeeeenees 16 3 1 WIN CAN Software OV rvieW ccccccecccceceeeeeeeeceseeeeeeeeeeeeaeeeeeeeeenaneees 16 Chapter 4 CAN bus Windows SDK API Specification cssesseeseesees 21 4 1 Define DOCUMENTAtION ccccceceeeeeeceeeeeeeeeeeeeeaeeeeeeueneaueeseeeeuaeeeeeees 21 4 2 Function DOCUMENTATION cccececeeeececeseeeeeeeeeeeaueueeeeeneaueeeeeeeeneeseneeas 22 Chapter5 CAN bus Linux SDK API Specification mmnmrmmernnes 30 5 1 Linux Driver Installation iii diissreeceneeseses 30 5 2 Define DOCUMENTATION cccceccececeseeeeceeeeeeeeeeeeeeaueueeseeeeaneeseeeeenaneers 31 Page 3 USB CAN bus User Manual V1 2
11. V1 2 2 3 WIN CAN Software Setup Step 3 Click on Next to proceed Step 1 Insert the Driver CD that comes with the accessories into the PC s CD ROM i WIN CAN Open the file folder named WIN CAN Click on Setup msi to start the setup Confirm in on procedure The installer is ready to install WIN CAN on your computer i WIN CAN Click Next to start the installation Welcome to the WIN CAN Setup Wizard The installer will guide you through the steps required to install WIN CAN on your computer WARNING This computer program is protected by copyright law and international treaties Unauthorized duplication or distribution of this program or any portion of it may result in severe civil or criminal penalties and will be prosecuted to the maximum extent possible under the law Step 4 Click on close to complete the installation i WIN CAN Installation Complete i WIN CAN Select Installation Folder WIN CAN has been successfully installed Click Close to exit The installer will install WIN CAN to the following folder To install in this folder click Next To install to a different folder enter it below or click Browse Folder C Program Files Winmate WIN CAM Please use Windows Update to check for any critical updates to the NET Framework Install WIN CAN for yourself or for anyone who uses this computer Cancel Everyone Just me tet JC a
12. _STATUS FT_OK BR_800KBPS 11 Open the first plugged in device successfully BR_1000KBPS 12 or if WinCan WM_OPEN 1 FTDI FT_STATUS FT_OK Open the second plugged in device successfully Returns FTDI FT_STATUS FT_OK if successful otherwise the return value is FTDI FT_STATUS error code Page 21 Page 22 USB CAN bus User Manual V1 2 4 2 2 FTDI FT_STATUS_WM_INIT byte bDevicelD byte bBRatelndex byte bAcceptMask byte bMode Description Specify and initial the opened device Parameters bDevicelD IN Set opened device ID as Ox00 O0x7FF Standard Mode or OxO00000000 0x1FFFFFFF Extended Mode Type byte array bBRatelndex IN Set transmitting rate Type byte bAcceptMask IN It is defined as a filter and it determines to receive any corresponding ID sending data Type byte array ID Mask X don t care The identifier consist of 11 bits ID 10 is most significant bit Only ID 3 1D 10 can be set At the bit positions containing a 1 in the mask any value is allowed in the composition of the identifier The same is valid for the three least significant bits bMode IN It is defined as a different mode Mode 0 Standard Mode Mode 1 Extended Mode Type byte EX byte bID new byte 4 bID O Ox1F bID 1 OxFF bID 2 OxFF bID 3 OxFF byte bMask new byte 4 bMask O OxFF bMask 1 OxFF bMask 2 OxFF bMask 3 OxFF Pag
13. d untar the file given to a suitable directory gunzip libftd2xx0 4 13 tar gz tar xvf libftd2xx0 4 13 tar 2 As root user copy the following files to usr local lib cp libftd2xx so 0 4 13 usr local lib 3 Change directory to usr local lib cd usr local lib 4 make symbolic links to these files using the following commands In s libftd2xx so 0 4 13 libftd2xx so 5 Change directory to usr lib cd usr lib 6 make symbolic links to these files using the following commands In s usr local lib libftd2xx so 0 4 13 libftd2xx so Page 30 USB CAN bus User Manual V1 2 7 Add the following line to etc fstab none proc bus usb usbdevfs defaults devmode 0666 0 0 There have been reports that you may need to use the following command for some distros none proc bus usb usbdevfs defaults mode 0666 0 O use usbfs in 2 6 kernels 8 Remount all in the fstab file mount a 9 Copy the following files to usr lib cp f libWCan so usr lib If you have problems with this check with usbview to check the usb file system is mounted properly 5 2 Define Documentation enum _WM_OK _WM_ERROR _WM_OPEN_ERROR _WM_WRITE_ERROR _WM_READ_ERROR _WM_CLOSE_ERROR Page 31 USB CAN bus User Manual V1 2 _WM_SETID_ERROR _WM_SETMASK_ERROR _WM_SETBAUDRATE_ ERROR Return current status define BYTE unsigned char define DWORD unsigned long enum DEVICE _ USB CAN USB_CAN1 0 USB_CAN2 1 Su
14. e 23 USB CAN bus User Manual V1 2 WinCan _WM_INIT bID Convert ToByte Canbus BaudRate BR_1000KBPS bMask 1 Returns FTDI FT_STATUS FT_OK if successful otherwise the return value is FTDI FT STATUS error code 4 2 3 FTDI FT STATUS WM _WriteOnePacket byte bID byte bLen byte writebuf Description Write data with this ID header via opened device Parameters bID IN Set ID header for writing packet to wanted device Type byte array bLen IN Length of data to be wrote 0 8 Type byte writebuf IN Written Data Type byte array Returns FTDI FT_STATUS FT_OK if successful otherwise the return value is FTDI FT STATUS error code Page 24 USB CAN bus User Manual V1 2 4 2 4 FTDI FT STATUS WM _WriteMultiPackets int level byte _id byte _datalen byte data Description Write all data with different ID headers at the same time via opened device Parameters level IN It shows numbers of IDs to be written Type int _id IN Write all data with different ID headers sequentially Type byte array of two dimensions _datalen IN Set every data length 0 8 sequentially to be written Type byte array of two dimensions _data IN All Written Data Type byte array of two dimensions EX byte id new byte 2 4 byte datalen new byte 2 1 byte data new byte 2 8 int i 0 for int i O i lt 2 i id i 0 i id i 1 Ox
15. lder L Move this folder D Copy this folder Publish this Folder tothe Web ES Share this folder E Emal this Folder s files X Delete thes Folder Windows AP Qo My Documents hoed Documents d My Computer My Network Places Page 11 USB CAN bus Step4 Select ftdbus inf and click right button of mouse and then click install to proceed COM 2 06 00 WHOL Certihed Fie Ede Vew Favortes Toos Help Qm O P Pura fran T Address C C Documents and Settings Administrator Desktop Windows APDrivers COM 2 06 00 WHQL Certified BD Rename this fle UB More this lle T Copy this Fite QD Pubish this file to the web E mail this file D Print this file X Delete this Ale gt Drivers My Documents D Daed Documents 3 My Computer Eg My Network Pisces Step5 Select ftdport inf and click right button of mouse and then click install to finish the installation CON 2 04 00 WHOL Certified File Edt View Favortes Tods Heb O O Pee fF roes Fi Address LD C Documents and Seltings Administrator Desktop Windows AP Drivers CDM 2 06 00 WHOL Cet Find Rename this fle b Mere this fie T Copy this Fite QD Publish this Fle tothe wed Emel th fe Dy Print ths fie X Dette this file Drivers D Mr Documerks D Fred Documents My Computer 4 hy Netvwork Places Page 12 User Manual V1 2 USB CAN bus User Manual V1 2 USB CAN bus User Manual
16. otherwise the return value is an error code 5 3 5 int WM WriteMultiPackets int level BYTE _id BYTE _datalen BYTE data enum DEVICE_USB_CAN dev Page 36 USB CAN bus User Manual V1 2 USB CAN bus User Manual V1 2 Description 5 3 6 int _WM_ReadPacket BYTE bID BYTE bLen BYTE readbuf int busheavy int mode enum DEVICE_USB_CAN dev Write different data with different ID header via opened device at the same time Description Parameters Read data via opened device level IN Parameters Description It presents how many data sets to write bID OUT Type int Description Read data with this ID header via opened device _id IN Type BYTE Point Description Write data with this ID OxOO OxFF header to wanted device bLen OUT Type BYTE Point Description Received data length datalen iN Type BYTE Point Description Length of data to be wrote 0 8 readbuf OUT Type BYTE Point Description Received data _dataliN Type BYTE Point Description Written Data busheavy OUT Type BYTE Point Description If signal ocurrs some error to result in device not to work it will return non zero lue dev IN value Type int Point Description Device index ii Type enum DEVICE_USB_CAN mode IN Description Get current mode Returns Type int Point _WM_OK if successful otherwise the return value is an error code yP Page 37 Page 38 USB CAN bus User Manual V1 2 USB CAN
17. pport two deivces struct CBUS STRUCT FT HANDLE ftHandle 2 CBUS_STRU 2 enum Baudrate BR_20KBPS 0 BR_4OKBPS 1 BR_SOKBPS 2 BR_80KBPS 3 BR_100KBPS 4 BR_125KBPS 5 BR_200KBPS 6 BR_250KBPS 7 BR_400KBPS 8 BR_5OOKBPS 9 BR_666KBPS 10 BR_800KBPS 11 Page 32 USB CAN bus User Manual V1 2 BR_1000KBPS 12 Baudrate Setting 5 3 Function Documentation 5 3 1 int _ WM OPEN enum DEVICE_USB_CAN dev Description Open device by choosing device index Parameters dev IN Description Device index Type enum DEVICE_USB_CAN EX if _ WM_OPEN USB CAN1 WM_ OK Open USB CAN1 successfully or if WM_OPEN USB_CAN2 _WM_OK Open USB_CAN2 successfully Returns _WM_OK if successful otherwise the return value is an error code 5 3 2 int _ WM Close enum DEVICE USB CAN dev Description Page 33 USB CAN bus User Manual V1 2 Close device by choosing device index Parameters dev IN Description Device index Type enum DEVICE_USB_CAN Ex if _ WM_Close USB_CAN1 WM OK Close USB_CAN1 successfully or if WM_Close USB_CAN2 _WM_OK Close USB_CAN2 successfully Returns _WM_OK if successful otherwise the return value is an error code 5 3 3 int _WM INIT BYTE bDevicelD BYTE bBRatelndex BYTE bAcceptMask BYTE bMode enum DEVICE_USB_CAN dev Description Initial
18. rent executing mode Type ref int BaudRate OUT It shows current executing transmitting rate Type ref int ErrorCode OUT It shows current executing error code Type ref int ErrorLimit OUT It shows current executing error limit Type ref int RxError OUT It shows current executing RX error Type ref int TxError OUT It shows current executing TX error Type ref int Returns FTDI FT_STATUS FT OK if successful otherwise the return value is FTDI FT STATUS error code Page 27 USB CAN bus User Manual V1 2 4 2 7 FTDI FT STATUS WM_PURGE Description It uses to purge the Tx and Rx buffer Returns FTDI FT_STATUS FT OK if successful otherwise the return value is FTDI FT STATUS error code 4 2 8 FTDI FT STATUS WM_HW_RESET Description When the device isn t working you need to reset the device to make sure that it could keep on working Returns FTDI FT_STATUS FT_OK if successful otherwise the return value is FTDI FT STATUS error code 4 2 9 FTDI FT_STATUS _WM_CLOSE Description Close the opened device Returns FTDI FT_STATUS FT_OK if successful otherwise the return value is FTDI FT STATUS error code Page 28 USB CAN bus User Manual V1 2 D Linux SDK API Specification This chapter shows the Linux SDK API Code CHAPTER Page 29 USB CAN bus User Manual V1 2 Chapter5 CAN bus Linux SDK API Specification 5 1 Linux Driver Installation 1 unzip an

Download Pdf Manuals

image

Related Search

Related Contents

tresmostatic  (後編) JIS T1001/1002とJIS T0601−1のおもな相違点  E Manual de instrucciones - Interruptor horario con función  Embedded DVR User Manual - Electrosa Security & Networking  Manual - White Light  Sanyo CE42FD90-B 42" Full HD Black LCD TV      Operating Instructions  BNC-2120 Installation Guide  

Copyright © All rights reserved.
Failed to retrieve file