PHYTEC Support FAQ

http://www.phytec.com/products/can/can-software-development-tools/pcanevaluation.html. The following PCAN software overview/comparison page shows you ...
129KB taille 0 téléchargements 247 vues
PHYTEC Support FAQ CAN Category

Generated by KnowledgeBuilder - http://www.activecampaign.com/kb

Contents CAN CAN software

CAN software: CAN advantages CAN software: Support For Multiple CAN Interfaces CAN software: "Busheavy" Error at startup followed by "Buslight" PCAN software packages

CANopen I/O Nodes

CANopen I/O Nodes: Analog Input Update Rates Problems launching MicroMod config. utility

PC-to-CAN interfaces

PC-to-CAN interfaces/PCAN-USB: "Bus Heavy, Bus Off" Error with IPEH-002021E PC-to-CAN interfaces/PCAN-USB: Connection of USB Device via PCAN-USB Adaptor

Generated by KnowledgeBuilder - http://www.activecampaign.com/kb

1 1 1 1 1 2 2 2 3 3 3 3

CAN

There are no articles in this category.

CAN software

CAN software: CAN advantages Question: What are the advantages of CAN (controller area network) implementations over(more standard) Ethernet and other protocols? Answer: CAN has built in collision control through it’s arbitration process that ensures that a message is not missed.

CAN software: Support For Multiple CAN Interfaces Problem: I need to support more than one CAN Network interface on the same PC. We do have the software for PCAN Explorer already; however, I do not believe that this package comes with an API library. I am interested in accessing more than one physical devices via software API. Please advise us as to what we will need for the API and minimize our development effort Solution: When using the pcan_usb.dll (or in other words the PCAN light version) it is only possible to access one PCAN-USB adapter from your application. In order to use the canapi2.dll you have to buy the PCAN-Evaluation or PCAN-Developer software package. Only these packages include the necessary header files with the function definition etc. With this package you can connect to up to 16 PCAN hardware devices.

CAN software: "Busheavy" Error at startup followed by "Buslight" Problem: We are testing a motor control module that includes a CAN interface. The CAN bus is connected to the module and a Parallel CAN Dongle only. The bus is terminated properly with 120 ohms at each end. On the first read attempt there is a BUSHEAVY error. This error is discarded, and the actual power-on response message is read. Next various CANWrite commands are sent and after each write, a response message from the module is read. On about the 33rd to 35th read, there is a BUSLIGHT error, but after this there are no more errors. What could be the cause of this behavior? Resolution: A "Buslight" occurs when the error counter value of the CAN-Controller reaches the value of 96

Generated by KnowledgeBuilder - http://www.activecampaign.com/kb

1 of 4

errors. Another limit is 128 errors, than it shows a Busheavy error. When you say that at the beginning you receive a "Busheavy" error due to the fact that there are errors on the bus during power up of your module, the error counter on the CAN-Controller has reached the value of 128 errors. So from that value on the error counter were decremented by one with each message which was received in good condition, so after receiving 32 "good" CAN messages the error counter reaches 96, which will cause the Controller to release the error interrupt which will than tell our driver that we reach error limit 96 (=Buslight) (128-32=96). Thats why you get that "buslight" error warning. So it tells you that the bus conditions are getting better. Its not a problem its just an info from the driver. What you can do to prevent that behaviour is to reset the CANController after recieving the "Busheavy" error in the beginning (with CAN_ResetHardware()). This will set the error counter values to 0 again, and no Buslight error message will occure because the error interupts were cleared, and will not be cleared after 32 messages. Enclosed you will find the application note of the Philips SJA1000 CAN Controller, please see page 44 and 45 for more details about error warning limits.

PCAN software packages Problem: I have 3 PCAN-PCI (P/N IPEH-002067E) Dual port CAN cards in my PC. I am developing an application in ANSI C and I need to write control routines that independently control each of the 3 PCAN-PCI cards in my PC and I do not see a way to do so using the API provided with the Pcan_pci.dll and Pcan_2pci.dll that came with the PCAN-Light software. Are there other PCAN software packages available with dlls’ that include API calls that will allow me to independently control each of the 3 PCAN-PCI cards in my PC?

Solution: The software product that you would need for accessing multiple PCI-CAN cards with dual channel CAN interface would be the CANAPI2.DLL driver from PEAK. This driver is part of their PCANEvaluation software package, described in more details on the product page shown below: http://www.phytec.com/products/can/can-software-development-tools/pcanevaluation.html The following PCAN software overview/comparison page shows you the (feature) differences between the PCAN Light and the PCAN Evaluation package: http://www.phytec.com/pdf/manuals/PCAN-SW_overview_e_b2.pdf The PCAN Developer would be recommended if you plan to bundle your CAN software with the CANAPI2.DLL along with the PCI-CAN cards and sell such package in quantities to your end customers. The PCAN Evaluation gives you 5 licenses of the CANAPI2 driver, PCAN Developer has unlimited seats plus some other nice applications.

CANopen I/O Nodes

CANopen I/O Nodes: Analog Input Update Rates Question: What is the analog inputs update rate for the CANopen Chip/DIPmodul-F4? Answer: According to the engineer at SYSTEC the analog input sample and processing rate is about 1 millisecond. This is based on the fact that the analog inputs are queried and updated once per firmware runtime cycle on the CANopen Chip F40. These analog inputs are not interrupt activated. The actual A/D conversion takes 12 microseconds per channel. Taking the entire CANopen stack processing time for

Generated by KnowledgeBuilder - http://www.activecampaign.com/kb

2 of 4

all the functions the average processing time for analog inputs results in this 1 millisecond rate.

Problems launching MicroMod config. utility Question: I am using the PEAK USB-CAN module on my WinXP SP2. I was able to successfully install the USBCAN drivers but I get the following error when I try to launch the MicroMod Config utility: "The system DLL user32.dll was relocated in memory. The application will not run properly. The relocation occurred because the DLL C:\WINDOWS\system32\HHCTRL.OCX occupied an address range reserved for Windows system DLLs. The vendor supplying the DLL should be contacted for a ne DLL." Answer: This is a known Microsoft XP SP2 issue. For details regarding error and solution, please go to the following link: http://support.microsoft.com/?scid=kb%3Ben-us%3B935448&x=12&y=10

PC-to-CAN interfaces

PC-to-CAN interfaces/PCAN-USB: "Bus Heavy, Bus Off" Error with IPEH002021E Problem: We are using the PCAN-USB between a host-PC and target CAN hardware, connected via a two-wire CAN cable to SUB-D9 interfaces. A 120 ohm resistoris on the SUBD-9 interface on the CAN target hardware, but not on the SUBD-9 on the PCAN-USB. We are able to receive messages and view them in the PCANview software that monitors send and receive activity over the CAN bus, but every time we attempt to transmit, we receive a "Bus Heavy, Bus Off" error. This error always repeats, even after we are reset the target hardware and again successfully receive messages. Solution: This problem could be caused by a baudrate related problem, a wiring problem (missing CAN-line) or a CAN-transceiver problem on the PCAN-USB module. To check the CAN transceiver: disconnect the CAN cable from the PCAN-USB start PCAN-View don't send any message use a DC Voltmeter to measure the voltage between Pin2 and Pin3 (for the CAN-L voltage) and Pin7 and Pin3 (for the CAN-H voltage) on the SUB-D 9pole CAN connector of the PCAN-USB. Both times you must measure 2.5Volts +/- 0.2V. If the above measurements are correct then the CAN-transceiver is okay, and the problem must be in the wiring of the CAN cables or the baudrate does not fit.

PC-to-CAN interfaces/PCAN-USB: Connection of USB Device via PCAN-USB Adaptor

Generated by KnowledgeBuilder - http://www.activecampaign.com/kb

3 of 4

Question: I am using phyCORE-MPC555 and would like to connect a USB device (eg. flash memory) to the controller. Can I use the PCAN-USB adapter for this purpose? Answer: The PCAN-USB adapter is to be used to connect a host PC to the module through the CAN, it can not be used the other way around to connect to a USB device. The phyCORE-MPC555 does not have a USB controller on-board so to implement a connection between the module and an external device would require additional circuitry, however Phytec does offer products that have the USB interface included on-board, for example: http://www.phytec.com/products/sbc/ARM-XScale/phyCORE-XScale-PXA270.html http://www.phytec.com/products/sbc/ARM-XScale/phyCORE-XScale-PXA255.html http://www.phytec.com/products/sbc/ARM-XScale/phyCORE-ARM9-LPC3180.html

Generated by KnowledgeBuilder - http://www.activecampaign.com/kb

4 of 4