ZLG USBCAN-4E-U User Manual page 21

Industrial high performance can interface card
Table of Contents

Advertisement

Guangzhou ZHIYUAN Electronics Co., Ltd.
7. How to set the communication baud rate of the PC-CAN interface card?
Provide a set of commonly used baud rate settings. If users want to use other baud
rates, please refer to "CAN-bus Universal Test Software and Interface Library User
Manual" to calculate. Note that the CAN controller of the USBCAN-4E-U interface
card uses a 36MHz clock. When users define the Baud rate, they should calculate
according to this clock frequency.
8. Whether the system entering into standby or sleep mode affects reception?
It will affect reception. All processing will be stopped at this time, and it probably lead
to hardware receiving buffer overflow error. If a program is started, the device will try
to prevent the system entering into the standby or sleep mode, thus ensuring the
system to work properly. When using the USBCAN-4E-U interface card, please
disable the standby and sleep function of the system.
9. How to deal with errors in the application?
Errors are mainly divided into function call error and CAN-bus communication error.
Function call error is generally caused by parameter errors. For example, the device
number is out of range or type number has error. The error number returned by
Win32 function GetLastError is 87. And operating for the disable device is actually an
illegal handle operation. Since the call of specific function has provided a
corresponding Win32 standard error code, users can use GetLastError for error
analysis. This part of debugging work should be completed in design generally.
CAN-bus communication error is generally caused by the CAN network. Also, it may
be caused by improper user settings, for example, inconsistent baud rate settings, or
calling the transmit function without starting the CAN controller, etc. Most of the errors
have been handled simply in the device driver, and if you want a deeper level of error
analysis and processing, you can call the VCI_ReadCANStatus function.
Also note that the data overflow interrupt error may be caused by these conditions: (1)
software receiving buffer overflow. This means that the application can not process
the received data timely, and users should optimize the application or change the
communication policy. (2) hardware receiving buffer overflow. This error is caused by
PC interrupt delay at the receiving terminal. It just can resolve by upgrading the
computer performance or coordinating the remaining nodes to reduce the
transmitting speed.
10. What matters should be considerated for turning on/off the device?
The USBCAN-4E-U interface card provides four CAN ports, allowing users to operate
different ports in the same program. The USBCAN-4E-U interface card is not allowed
to share the way to open the device, and the same device can not be opened by
different program through calling the VCI_OpenDevice function for several times. The
VCI_OpenDevice and VCI_CloseDevice functions can only be called once when the
application is initialized and exited.
If the current port is no longer used when the device is turned off, users should call
the VCI_ResetCAN function to make the current port separated from the CAN bus.
User Manual
Date: 2017/03/09
USBCAN-4E-U User Manual
Industrial high performance CAN interface card
©2017 Guangzhou ZHIYUAN Electronics
16
V1.00

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents