CAN – Ethernet Gateway
90 © SYS TEC electronic GmbH 2007 L-1032e_9
ETHCAN_CANERR_MEMTEST
The memory test of the SJA1000 failed. Refer to the manual for the
CAN Controller SJA 1000.
7.3.5 Using the DLL Functions
7.3.5.1 Demo project
As mentioned in Section
7.2, a demo project was created in the
installation path upon installation. This project contains a „C“ source
code file Demo.c as well as the corresponding header file Demo.h and
shows how to use the DLL interface functions.
The EthCan.Dll is loaded dynamically during runtime with the
function LoadLibrary() and the function pointer is acquired with the
function GetProcAddress().
The demo program is based on a WIN32 console application and is
limited to the support of a CAN-Ethernet Gateway instance. After the
program has been started and the EthCan.Dll has been loaded, a
connection to a CAN-Ethernet Gateway, addressed by IP address and
Port number, will be established. If the connection was established
successfully, then a CAN message will be sent cyclically with the
CAN-ID 0x180.
To verify the receipt of the CAN message via Ethernet and its
subsequently transmission on the CAN bus, an monitor tool (e.g.
PCAN View or CAN-REport) should be used.
Using the same tools it is possible to send CAN messages, which are
transmitted to the PC via Ethernet and are displayed on the console
window with its CAN-ID, data length code and data field.