background image

PCAN-USB – User Manual 
 

24 

5.2.2

 

Principle Description of the API 

The PCAN-Basic API is the interface between the user application 
and device driver. In Windows operating systems this is a DLL 
(Dynamic Link Library). 

The sequence of accessing the CAN interface is divided into three 
phases: 

1.

 

Initialization 

2.

 

Interaction 

3.

 

Completion 

Initialization 

A CAN channel must be initialized before using it. This is done by 
the simple call of the function 

CAN_Initialize

. Depending on the 

type of the CAN hardware, up to eight CAN channels can be opened 
at the same time. After a successful initialization the CAN channel is 
ready for communication with the CAN hardware and the CAN bus. 
No further configuration steps are required. 

Interaction 

For receiving and transmitting CAN messages the functions 

CAN_Read

 and 

CAN_Write

 are available. Additional settings can be 

made, e.g. setting up message filters to confine to specific CAN IDs 
or setting the CAN controller to listen-only mode. 

When receiving CAN messages, events are used for an automatic 
notification of an application (client). This offers the following 
advantages: 

 

The application no longer needs to check for received messages 
periodically (no polling). 

 

The response time at reception is reduced. 

Summary of Contents for PCAN-USB

Page 1: ...USB to CAN Interface User Manual V2 0 4 PCAN USB...

Page 2: ...A are registered community trade marks of CAN in Automation e V All other product names mentioned in this document may be the trademarks or registered trademarks of their respective companies They are...

Page 3: ...ermination 13 3 3 2 Example of a Connection 13 3 3 3 Maximum Bus Length 14 4 Operation 15 4 1 Status LED 15 4 2 Unplugging the USB Connection 15 4 3 Distinguishing Several PCAN USB Adapters 15 5 Using...

Page 4: ...PCAN USB User Manual 4 6 Technical Specifications PCAN USB 26 Appendix A CE Certificate 28 Appendix B Dimension Drawings 29 Appendix C Quick Reference 30...

Page 5: ...PCAN USB adapter 1 1 Properties at a Glance Adapter for USB connection USB 1 1 compatible with USB 2 0 USB voltage supply Bit rates up to 1 Mbit s Time stamp resolution approx 42 s Compliant with CAN...

Page 6: ...at the computer or at a self powered USB hub connected to the computer Operating system Windows 7 Vista XP 32 64 bit or Windows CE 6 x x86 and ARMv4 processor support or Linux 32 64 bit Note Do not u...

Page 7: ...PCAN USB User Manual 7 PCAN Basic programming interface consisting of an interface DLL examples and header files for all common programming languages Manual in PDF format...

Page 8: ...eeded for normal use of the PCAN USB adapter later on 2 Insert the supplied CD into the appropriate drive of the computer Usually a navigation program appears a few moments later If not start the file...

Page 9: ...the computer or of a connected USB hub The computer can remain powered on Windows notifies that new hardware has been detected 2 Windows XP only A Wizard dialog box appears Follow its instructions De...

Page 10: ...he PCAN USB adapter With the pins 1 and 9 devices with low power consumption e g bus converters can be directly supplied via the CAN connector At deli very these pins are not assigned You can find a d...

Page 11: ...interconnected DC DC converter Therefore the current output is limited to 50 mA Proceed as follows to activate the 5 Volt supply In order to access the board open the casing of the PCAN USB adapter b...

Page 12: ...coupled board IPEH 002022 solder field R11 5 Volt supply None Pin 1 PCAN USB opto decoupled solder field R11 For reassembly place the board overhead onto the top part of the casing Ensure that the cab...

Page 13: ...even when they are turned off standby operation 3 3 Cabling 3 3 1 Termination A High speed CAN bus ISO 11898 2 must be terminated on both ends with 120 Ohms Otherwise there are interfering signal ref...

Page 14: ...ble to process messages simultaneously The maximum bus length depends on the bit rate The following table shows some examples with the bus length in relation to the bit rate Bit rate Max bus length 10...

Page 15: ...the connected CAN bus 4 2 Unplugging the USB Connection Under Windows the icon for removing hardware safely is not used with the PCAN USB adapter You can unplug the adapter from the computer without a...

Page 16: ...onitor PCAN View for Windows PCAN View for Windows is a simple CAN monitor for viewing transmitting and logging CAN messages Figure 5 PCAN View for Windows Do the following to start and initialize PCA...

Page 17: ...ing the CAN parameters appears Figure 6 Selection of the CAN specific hardware and parameters 2 From the list Available CAN hardware select the CAN channel to be used 3 Select the bit rate that is use...

Page 18: ...ent of PCAN View It contains two lists one for received messages and one for the transmit messages Representation of CAN data is in hexadecimal format Do the following to transmit a CAN message with P...

Page 19: ...e greater than 0 For a manual only transmission enter 0 4 Confirm the entries with OK The created transmit message appears on the Receive Transmit tab 5 You trigger selected transmit messages manually...

Page 20: ...bus During this process the CAN messages are cached in the working memory of the PC Afterwards they can be saved to a file The tracer can be configured to run in linear or in ring buffer mode In linea...

Page 21: ...computer Furthermore the current firmware version of the connected adapter is displayed on the tab 5 1 4 Status Bar Figure 11 Display of the status bar The status bar shows information about the curre...

Page 22: ...c functions for linking own programs to CAN interfaces by PEAK System and can be used for the following operating systems Windows 7 Vista XP 32 64 bit Windows CE 6 x x86 ARMv4 The API is designed for...

Page 23: ...r internal buffer for 32768 messages per CAN channel Receive timestamp for CAN messages Real time precision of the received messages down to 1 s Access to some hardware parameters such as listen only...

Page 24: ...hannels can be opened at the same time After a successful initialization the CAN channel is ready for communication with the CAN hardware and the CAN bus No further configuration steps are required In...

Page 25: ...LL and further files needed for linking are property of the PEAK System Technik GmbH and may be used only in connection with a hardware component purchased from PEAK System or one of its partners If a...

Page 26: ...d CAN up to 1 Mbit s 2 0A standard format and 2 0B extended format Controller NXP Philips SJA1000 Transceiver NXP Philips PCA82C251 Galvanic isolation PCAN USB none PCAN USB opto up to 500 V Supplying...

Page 27: ...and transport 40 100 C 40 212 F Relative humidity 15 90 not condensing EMC EN 55024 2003 10 EN 55022 2007 04 EC directive 2004 108 EG Ingress protection IEC 60529 IP20 Measures Size w o cable PCAN US...

Page 28: ...PCAN USB User Manual 28 Appendix A CE Certificate...

Page 29: ...PCAN USB User Manual 29 Appendix B Dimension Drawings Figure 13 View PCAN USB Figure 14 View PCAN USB opto decoupled The figures don t show the actual size of the product...

Page 30: ...fter the installation process is finished successfully the red LED on the adapter is illuminated Getting Started under Windows Run the CAN monitor PCAN View from the Windows Start menu as a sample app...

Reviews: