EMS CPC XTI. CAN-PC Interface. User Manual THOMAS WÜNSCHE. Documentation for CAN-Interface CPC-XTI.

Similar documents
EMS CPC 104I. CAN-PC Interface. User Manual THOMAS WÜNSCHE. Documentation for plug-in board CPC-104I.

CPC-PP EMS. CAN-PC Interface. User Manual. Documentation for CAN-Interface CPC-PP. Document version: V2.0 Documentation date: January 17th, 2005.

CAN PC Interface. CPC PCIe. User manual

EMS. CRep Opto-.../DS24/RMD CRep Opto-.../SS24/RMD. CAN-Repeater. User Manual. CRep Opto-.../SS24/RMD

EMS. CRep DS-102-PT CRep DS-102-PI. CAN-Repeater. User Manual. CRep DS-102-PI. Documentation for CAN-Repeater CRep DS-102.

Product Line CST User Manual (Preliminary)

Serial/CAN-Gateway. SerCAN-ARM7/RMD. User Manual. Thomas Wünsche

PCAN-PC/104 CAN Interface for PC/104. User Manual V2.2.3

PCAN-PC/104-Plus Quad Four-Channel CAN Interface for PC/104-Plus. User Manual V1.0.1

PCAN-PC/104-Plus Quad Four-Channel CAN Interface for PC/104-Plus. User Manual. Document version ( )

Kvaser PCIcan II User's Guide

Kvaser PCIcanx II User's Guide

Kvaser PCI104 User's Guide

port GmbH, Halle ; AT-CAN-MINI User Manual

PCAN-PCI PCI to CAN Interface. User Manual V2.1.0

PCAN-cPCI CompactPCI to CAN Interface. User Manual V2.0.0

Kvaser PC104+ User's Guide

CAN-ISA/200. ISA to CAN Interface. Hardware Installation and Technical Data. Hardware Installation and Technical Data CAN-ISA/200 Rev. 1.

PCAN-cPCI CAN Interface for CompactPCI. User Manual. Document version ( )

PCAN-B10011S. Converter High-speed CAN to Truck Trailer CAN. User Manual

PCAN-PCI Express PCI Express to CAN Interface. User Manual V3.2.0

PCAN-USB CAN Interface for USB. User Manual. Document version ( )

PCAN-PCI/104-Express PCI/104-Express to CAN Interface. User Manual V2.1.0

PCAN-PCI Express PCI Express to CAN Interface. User Manual V2.0.0

PCAN-ExpressCard ExpressCard to CAN Interface. User Manual V2.0.0

PCAN-PCI Express CAN Interface for PCI Express. User Manual. Document version ( )

PCAN-Router FD Universal, programmable Converter for CAN FD and CAN. User Manual. Document version ( )

CAN-PCI/266. Passive 66-MHz PCI-CAN Interface. Hardware Installation and Technical Data. Installation and Technical Data CAN-PCI/266 Rev. 1.

CANopen IO X4 Fact sheet

PCAN-PCI/104-Express CAN Interface for PCI/104-Express. User Manual. Document version ( )

PCAN-PCI. PCI to CAN Interface. User Manual

CAN-PCIe/200. Passive CAN-Interface Board for PCI Express. Hardware Manual. to Product C.2042.xx

PCAN-B10011S Bus Converter High-speed CAN to Truck-Trailer CAN. User Manual V2.0.0

PCAN-PC Card PC Card to CAN Interface. User Manual V2.1.1

Hardware Manual ipc-i 320/PCI II Intelligent PC/CAN Interface

PISO-CM100-D/T PISO-CM100U-D/T

UEP10M005 Power Supply User s Manual

PCAN-PCI Express. PCI Express to CAN Interface. User Manual

Chapter 3 Installation

PCAN-M.2 CAN FD Interface for M.2 (PCIe) User Manual. Document version ( )

CPCI-CAN/200. CompactPCI-CAN-Interface. Hardware-Installation and Technical Data. Installation and Technical Data CPCI-CAN/200 Rev. 2.

PCAN-PCI (ISO) Adapter Card PC-PCI to High-speed CAN. User Manual

Fan Tray Unit UEL03M User Manual

Installation Guide AVA-2902E/I. PCI-to-Fast SCSI Host Adapters. PCI SCSI Host Adapter with Internal or External Connector

PCAN-USB CAN Interface for USB. User Manual. Document version ( )

CAN-ISA/331. ISA-CAN Interface. Hardware Installation and Technical Data. Installation and Technical Data CAN-ISA/331 Rev. 1.5

PCAN-miniPCIe FD CAN FD Interface for PCI Express Mini. User Manual. Document version ( )

DF PROFI II CPCI. Installation Instructions V Project No.: 5302 Doc-ID.: DF PROFI II CPCI KUNBUS

BUS CONVERTER (TJA1054) User Manual

PCAN-Optoadapter Plug-on Adapter for Decoupling CAN Networks. User Manual. Document version ( )

PCAN-ExpressCard CAN Interface for the ExpressCard Slot. User Manual. Document version ( )

User Manual Connection to CAN

HARDWARE MANUAL ENGLISH

ONYX-MM-XT PC/104 Format Counter/Timer & Digital I/O Module

CPCI-USB-5. CPCI-USB 2.0 Interface with 6 USB Ports. Hardware Manual. to Product I.2326.xx

USB-to-I2C. Professional Hardware User s Manual.

CANcheck. Installation Tester for CAN/CANopen Networks MANUAL ENGLISH

CANopen IO X1 Fact sheet

CANopen IO X2 Fact sheet

PCL Port RS-232 Interface Card

Installation Guide AHA-1540CP/1542CP. ISA-to-SCSI Plug and Play High-Performance Bus Master Host Adapter with SCSISelect Utility

USB-to-I2C Basic. Hardware User s Manual.

PCAN-PCI Express FD CAN FD Interface for PCI Express. User Manual. Document version ( )

Installation Guide AHA -1530P/1532P. Plug and Play AT-to-SCSI Host Adapter with SCSISelect Utility

MU-Thermocouple1 CAN. Temperature Measurement Unit with CAN Connection. User Manual

ABSOPOS Series CANopen DS406 V3.1 Operating Manual Configuration and CAN-Bus Coupling

Industrial PC IPC191V2. General Operating, Maintenance and Installation Manual. Hardware Platform Protocol Converter

in Berlin (Germany) Sponsored by Motorola Semiconductor NEC Electronics (Europe) Siemens Semiconductors Organized by

PCAN-Dongle. User Manual. Parallel Port to CAN Interface. Document version ( )

PISO-CAN400-D/T PISO-CAN200-D/T

PCAN-Dongle. Parallel Port to CAN Interface. User Manual

hipecs-cio55 CANopen I/O module with 4 analog inputs

Win-I2CUSB Hardware User s Manual

PCAN-MiniDiag FD PCAN-MiniDiag Diagnostic Device for CAN FD FD Buses. User Manual. Document version ( )

LPT-to-I2C SE. Hardware Reference Guide.

AD 512 DATA ACQUISITION CARD USER'S MANUAL

8051 Microcontroller

iscan USB User Manual

DF PROFI II PCIe. Installation Instructions V Project No.: 5302 Doc-ID.: DF PROFI II PCIe KUNBUS

PCAN-LIN Interface for LIN, CAN, and RS-232. User Manual. Document version ( )

hipecs-cio100 CANopen I/O module with 16/16 digital I/O

USB-to-I2C. Ultra Hardware User s Manual.

User Manual MIOe port CAN-bus PCIE/MIOe Module with Isolation Protection

CANopen Unit CANit-20

AHA PCI-to-Fast SCSI Host Adapter. Fast SCSI Connection for High-Performance SCSI Peripherals for Pentium PCs

Videum Duo & Quattro Xpress

PCAN-MicroMod Analog 1 Application-specific PCAN-MicroMod Motherboard. User Manual. Document version ( )

ESC(LP)-100. Eight Channel Low Profile RS-232 Asynchronous Communications Adapter. for PCI bus. User's Manual

EASY219 / IEC CANopen Master / Slave

PCAN-USB FD CAN FD Interface for High-Speed USB 2.0. User Manual. Document version ( )

ICN Mini Link/External. User s Guide. 1733N Model A Mini Link/EXT (Version 1) 1732N Model A ICN Interface Board (Version 1)

MC 11 EB-2 Power supply cabinet with external bus, AC version

URCOM. User s Manual

crio PN Installation Instructions V0.2/ COMSOFT

Expanded Systems Guide

Kvaser USBcan II User's Guide

Embedded Systems and Software. Serial Communication

MOS-1110Y-0101E Isolated 16 DI/8 DO, 1-Ch, DB37, PCIe I/F

Easy Kit Board Manual

ADI12-8(USB)GY. Features. Packing List. F&eIt Series Isolated Analog Input Module for USB ADI12-8(USB)GY 1. Ver.1.02

Transcription:

Documentation for CAN-Interface. Document version 1.3. Documentation date: January 17th, 2005. No part of this document or the software described herein may be reproduced in any form without prior written agreement from EMS Dr. Thomas Wünsche. For technical assistance please contact: EMS Dr. Thomas Wünsche Sonnenhang 3 CAN-PC Interface CPC XTI D-85304 Ilmmünster Tel. +49-8441- 490260 Fax +49-8441- 81860 Email: support@ems-wuensche.com Our products are continuously improved. Due to this fact specifications may be changed at any time and without announcement. EMS THOMAS WÜNSCHE Sonnenhang 3 D-85304 Ilmmünster Tel +49-8441-490260 Fax +49-8441-81860 WARNING: hardware and software may not be used in applications where damage to life, health or private property may result from failures in or caused by these components. ii EMS Dr. Thomas Wünsche

Contents THIS PAGE INTENTIONALLY LEFT BLANK 1 Overview...1 1.1 Attributes...1 1.2 General description....1 1.3 Sample Applications...2 1.4 Ordering Information...3 2 Software...4 2.1 Functions of...4 2.2 Application program: Realization Concepts.... 4 2.3 Synchronous Interface...5 2.4 Asynchronous Interface...5 2.5 Data Structures and Library Functions....... 6 2.6 MS-Windows Driver Additional Information.... 15 3 Electrical Characteristics...17 3.1 Absolute Limiting Values...17 3.2 Nominal Values...17 4 Operation Instructions...18 4.1 Connection Scheme....18 4.2 Configuration...19 4.3 Installation....21 EMS Dr. Thomas Wünsche iii iv EMS Dr. Thomas Wünsche

1 Overview 1.1 Attributes offers a range of unique features which make it valuable for many CAN based applications: 1.2 General description CAN-interface for industrial applications Available with one or two CAN-channels Compact size for 8-bit slots CiA DS-102 and IS0 11898 compatible physical layer Smart system with fast integrated microcontroller Dallas DS80C320 Equipped with CAN controller Philips PCA82C200 or SJA1000 Philips PCA82C251 CAN transceiver for increased robustness Extended ESD-protection of the CAN transceiver(s) Galvanic decoupling between PC and CAN bus Modular application interface with libraries for Borland C++, Borland Pascal and Microsoft C Optional MS-Windows driver with DLL based API and VxD technology for high communication throughput Automatic address range detection by memory managers. is a short PC plug-in board for the CAN bus. With its small size and the possible application in 8 bit slots can be used in space restricted conditions as well. Designed for industrial series applications has a robust and cost efficient construction. eases the development of application software on the PC. The integrated microcontroller takes load of the PC-CPU and buffers and preprocesses CAN messages. A high level programming interface with modular design results in efficient software development. A library of interface routines for Borland C++, Borland Pascal and Microsoft C is included. is shipped with one or two CAN channels. For high volume applications cost optimized versions without galvanic decoupling and with PROM based code storage are available. Interrupt channels 3-7aresupported. 1.3 Sample Applications The application area of is wide. Some sample applications are detailed in the following and supported by corresponding software: Online configuration of CAN networks Network setup and analysis Use of PCs as CAN nodes on the application level Visualisation of process parameters in CAN based systems. EMS Dr. Thomas Wünsche 1 2 EMS Dr. Thomas Wünsche

1.4 Ordering Information 2 Software 10-04-201-20 10-04-211-20 CPC 104I/SJA1000S320-GTI CAN plug-in board with microcontroller Dallas 80C320 and 1 galvanically separated CAN channel with Philips SJA1000 CPC 104I/SJA1000D320-GTI CAN plug-in board with microcontroller Dallas 80C320 and 2 galvanically separated CAN channels with Philips SJA1000 The software consists of two parts. One part is executed by the microprocessor inside. The application program runs on the PC and makes use of the interface library. 2.1 Functions of offers enhanced functionality for CAN communication: Transmission and reception of CAN-messages Filtering and buffering of received messages Measurement of bus-load The functions of are accessed across the interface library of the PC. 2.2 Application program: Realization Concepts The library of interface functions supports two ways to implement the application program. The synchronous mode complies with conventional programming. The sequence of program steps is given by the program structure. Asynchronous mode allows event driven programming similar to the way used in graphical user interfaces. EMS Dr. Thomas Wünsche 3 4 EMS Dr. Thomas Wünsche

2.3 Synchronous Interface 2.5 Data Structures and Library Functions main program command initiation wait for result continue command execution by Implementation of the main program with synchronous interface allows simple and clearly arranged programs with sequential control flow. It is suitable mainly for simple applications, which allow a predefinition of events to process. This is true if, for example, only CAN messages are to be received or only bus load measurement is to be realized. 2.5.1 Data Structures The following structures are declared in the include file CPC.H. Please notice that the structures and functions described in the following refer to the old DOS and Windows libraries and are included in this manual for compatibility reasons. The new structures and functions are described within the manual CPC Series Development Kit for MS Windows Environment. 2.4 Asynchronous Interface struct CPC_MSG main program command initiation further program execution use result command execution by The asynchronous interface provides enhanced flexibility in reaction to events which are not predictable in their sequence of occurrence. Communication objects can be processed independent of program state, reactions can be configured flexible. For this purpose every communication object is handed on to a set of handling functions. Such functions are provided within the programming library. The application programmer can add routines as required by application purposes. Declaration: struct CPC_MSG { unsigned char typ; unsigned char length; union { unsigned char genericmsg[]; unsigned char textmsg[]; char versionmsg[]; char serialmsg[]; struct CPC_CAN_MSG canmsg; unsigned char busloadmsg; unsigned char canstatemsg; struct CPC_CAN_PARAMS can_params_msg; }; }; CPC_MSG serves for parameter transfer between application program and interface library. EMS Dr. Thomas Wünsche 5 6 EMS Dr. Thomas Wünsche

struct CPC_CAN_MSG struct CPC_INIT_PARAMS Declaration: struct CPC_CAN_MSG{ unsigned short id; unsigned char length; unsigned char overrun; unsigned char msg[8]; }; Declaration: struct CPC_INIT_PARAMS{ struct CPC_CAN_PARAMS std_can_params; unsigned char secure_transmit; void interrupt (far * inthandler)(); }; CPC_CAN_MSG serves for transfer of CAN messages between application program and interface library The global variable CPC_Init_Params, which has this type, holds initialization parameters. struct CPC_CAN_PARAMS Declaration: struct CPC_CAN_PARAMS{ unsigned char acc_code; unsigned char acc_mask; unsigned char btr0, btr1; unsigned char outp_contr; }; CPC_CAN_PARAMS defines initialization values for the CAN controller in (type PCA82C200) EMS Dr. Thomas Wünsche 7 8 EMS Dr. Thomas Wünsche

2.5.2 Synchronous Functions CPC_Exit CPC_CAN_Init Return value: CPC_Control Return value: int CPC_CAN_Init(void); CPC_CAN_Init() initialises the parameters of the CAN controller within. The CAN-controller is set up with parameters supplied in the global structure CPC_Init_Params (declaration in cpc.h). These parameters can be changed before the call to CPC_CAN_Init(). CPC_CAN_Init is to be called before data transmission across the CAN is initiated. int CPC_Control(int); CPC_Control() serves for setup of the message types to be transmitted from to the PC. The upper 6 bits select the type of message, the lower 2 bits determine the transmission behaviour. The properties that can be influenced are described in cpc.h. Return value: CPC_Get_Busload void CPC_Exit(void); CPC_Exit() is to be called before leaving the application program. CPC_Exit() is in any case to be used paired with CPC_Init(). int CPC_Get_Busload(void); CPC_Get_Busload() measures the actual bus-load and returns it as percentage of the maximum bus load. Return value: Actual bus load: 0 corresponds to 0%, 255 corresponds to 100% bus-load. CPC_Get_Serial Return value: char * CPC_Get_Serial(void); CPC_Get_Serial returns the serial number of the connected module. Pointer to a string with the serial number or NULL in case of errors. EMS Dr. Thomas Wünsche 9 10 EMS Dr. Thomas Wünsche

CPC_Get_Version CPC_Read_Msg Return value: char * CPC_Get_Version(void); CPC_Get_Version returns the version number of the connected CPC-PP module. Pointer to a string with the version number or NULL in case of errors. void CPC_Read_Msg (struct CPC_CAN_MSG *); CPC_Read_Msg() receives a message from the CAN. The received communication object is stored in a structure of type CPC_CAN_MSG, which is indicated by the pointer passed on function call. CPC_Init int CPC_Init(void); Return value: CPC_Send_Msg CPC_Init() initialises the communication with. is initialised to standard parameters, which are stored in the global structure CPC_Init_Params (declaration in cpc.h). These parameters can be changed on demand before calling CPC_Init(). CPC_Init() is to be called before using the other functions of the interface library. Return value: 0 for correct initialization, 1 for initialization errors. Return value: int CPC_Send_Msg (struct CPC_CAN_MSG *); CPC_Send_Msg() sends a message across the CAN. The function call passes a pointer to a structure of type CPC_CAN_MSG, which contains the communication object to be transmitted. EMS Dr. Thomas Wünsche 11 12 EMS Dr. Thomas Wünsche

CPC_Send_RTR Return value: int CPC_Send_RTR (struct CPC_CAN_MSG *); CPC_Send_RTR() transmits a Remote-Transmission-Request message across the CAN. The function call passes a pointer to a structure of type CPC_CAN_MSG, which contains the communication object to be transmitted. 2.5.3 Functions for the Asynchronous Programming Interface CPC_Add_Handler int CPC_Add_Handler(void (*handler) (const struct CPC_MSG *)); CPC_Add_Handler() adds the handler indicated by the pointer passed at function call to the list of handlers which are executed on any incoming message. Return value: 0 on error free execution, 1 if the list of handlers is full. CPC_Remove_Handler int CPC_Remove_Handler(void (*handler) (const struct CPC_MSG *)); CPC_Remove_Handler() removes the handler indicated by the pointer passed at function call from the list of handlers which are executed on any incoming message. If the handler is contained more than once, the last occurence is removed. Return value: 0 on error free execution, 1 if handler was not within the list. EMS Dr. Thomas Wünsche 13 14 EMS Dr. Thomas Wünsche

CPC_Handle Return value: struct CPC_MSG * CPC_Handle(); CPC_Handle() checks for availability of a new message from. If a message is available, all asynchronous handlers are called in the sequence of their entry position with the new message as parameter. CPC_Handle() returns immediately, independant of the availability of a message. A pointer to a static memory area containing the message is returned. This memory area is overwritten during following calls to CPC_Handle() and also on use of many of the synchronous interface functions. If no message is available, CPC_Handle() returns NULL. 2.6 MS-Windows Driver Additional Information Please notice: this subchapter refers to the older version of the Windows Development Kit. For information on the new version please read the CPC Series Development Kit for MS Windows environment manual. The installation program performs the following actions: 2.6.2 Additional Functions CPC_Get_Init_Params_Ptr Return value: copy the files install entry for virtual device driver in SYSTEM.INI (Windows9X) One additional function is necessary to compensate the fact that the initialisation structure is not directly accessible to the application: #include cpc.h structure CPC_INIT_PARAMS CPC_Get_Init_Params_Ptr(void); This function provides access to the initialization structure, which is contained in the Dynamic Link Library. A pointer to the initialization structure in the Dynamic Link Library. 2.6.1 Installation The software functionality and interface equals the MS-DOS version. Differences exist in the software setup and a few additional functions. The installation is provided by the setup program. Run SETUP.EXE from delivery disk. EMS Dr. Thomas Wünsche 15 16 EMS Dr. Thomas Wünsche

3 Electrical Characteristics 4 Operation Instructions 3.1 Absolute Limiting Values 4.1 Connection Scheme Any (also temporary) stress in excess of the limiting values may cause permanent damage on. Parameter Min. Max. Unit Storage temperature 20 80 C Operating temperature * Voltage on the bus connections Current across ground connection 3.2 Nominal Values 0 60 C 30 30 V 1 A * Extended temperature range on demand Parameter Min Typ Max Unit CAN controller clock frequency Bus data rate 16 MHz 10, 20, 50, 100, 125, 250, 500, 1000 and others kbit/ s The CAN-interface-connector (D-Sub 9 male) complies to CiA Standard DS 102-1. The pin usage is detailed in the following table. Pin 1 Reserved by CiA Pin 2 CAN_L CAN_L bus-line (dominant low) Pin 3 GND Ground Pin 4 Reserved by CiA Pin 5 Reserved by CiA Pin 6 (GND) Optional ground, internally connected to Pin 3 Pin 7 CAN_H CAN_H bus-line (dominant high) Pin 8 Reserved by CiA (error line) Pin 9 V+CAN Positive power supply from CAN (not used by default) EMS Dr. Thomas Wünsche 17 18 EMS Dr. Thomas Wünsche

4.2 Configuration The configuration of the address space and used interrupt channel is achieved by jumpers on. Their position on the board is indicated in figure 1. Flash- ROM RAM DC/DC- Converter CAN 1 The base address is set with jumper bank J1. The possible selections are listed in figure 2. Jumper Allocation: 1 8 Linear Adress Bit Bit 17 Bit 16 Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Address = 0C0000h + Jumper Value Jumper installed Bit = 1, else Bit = 0 Figure 2: Address settings Sample Settings: Address 0C8000h Address 0D0000h Address 0D4000h Address 0DFC00h Processor 1 8 J1 1 5 J2 Controller CAN 1 Controller CAN 2 Figure 1: Jumper locations CAN 2 Jumper bank J2 determines the used interrupt channel. The settings can be seen in figure 3 (IRQ 5 is set as an example). It is not allowed to set more than one jumper on this bank. Jumper Allocation: 1 5 IRQ line IRQ 7 IRQ 6 IRQ 5 IRQ 4 IRQ 3 Figure 3: Interrupt settings Jumper J3 (optional) allows to supply + 12V from the PC to the CAN on card configurations without galvanic decoupling. J3 may only be set if no other device supplies the CAN power line and the PC has enough capability on its +12V line. This feature does not provide protections against overvoltage, overload, short circuit or other error conditions. The use of this option is in the resposibility of the user. EMS Dr. Thomas Wünsche 19 20 EMS Dr. Thomas Wünsche

4.3 Installation WARNING: may be installed in an empty expan-sion slot on the mainboard of IBM-XT or IBM-AT compatible computers. To avoid damage please pay attention to the following hints: Computer devices and components are sensitive against static discharge. For this reason keep in the antistatic cover until installing. Just before removing from the protection cover touch the metal case of your computer. Avoid damage by achieving equal potential between all devices on the CAN before plugging the connection. To the rear side connectors of only CAN networks with a physical layer complying to CiA DS-102 may be attached. In some versions of PC interface and CAN bus are not galvanic decoupled. Use in systems with diverging ground potential of PC and CAN bus is not permitted in this case. Execute the following steps for installation only if you have knowledge about and experience in installing PC plug-in boards: Disconnect the computer from the power line. Open the case of the computer and remove the cover from the expansion slot rear panel. Insert carefully into the ISA or EISA slot. For this take the card at its top corners and shift it down into the slot equally. Push onto the upper side of to achieve correct seat in the slot. If the card can not be inserted without problems, please don t use extensive force. Remove the card and retry. Fix the mounting screw and close the PC case. Connect the required cables. If you do not have sufficient knowledge and experience to install the board, please consult a computer service person with the mentioned prerequisites. Besides the instructions below carefully observe the instructions in the computers user manual. If you are not sure about the installation please contact EMS Dr. Thomas Wünsche. EMS Dr. Thomas Wünsche 21 22 EMS Dr. Thomas Wünsche