Skip to content
Open in AI

ZLG API (zlgcan.dll) ​

zlgcan.dll is ZLG's unified Windows communication library supporting both Classic CAN and CAN FD interfaces, including CANmeleon devices running USBCANFD-200U/400U, USBCAN-2E-U, or USBCAN-II firmware. Official SDK packages include headers, libraries, and sample projects for C/C++, C#, LabVIEW, and Python.

Library Setup and Runtime Requirements ​

zlgcan.dll is distributed as a Windows dynamic-link library (x86 and x64) providing functions to open devices, configure bitrates, initialize and start channels, transmit and receive frames, and close devices.

Because zlgcan.dll is built with Microsoft Visual Studio 2008, ensure the Microsoft Visual C++ 2008 Redistributable matching your application's architecture (x86 or x64) is installed on the target Windows machine before loading the library.

Typical API Call Sequence ​

Follow ZLG's standard zlgcan call sequence when opening and operating a CAN or CAN FD channel:

  1. Open device (ZCAN_OpenDevice) — obtain a device handle for the selected device type and index.
  2. Set channel properties / bitrates (ZCAN_SetValue) — configure standard or custom arbitration-phase and data-phase bitrates via IProperty or ZCAN_SetValue.
  3. Initialize channel (ZCAN_InitCAN) — initialize the target CAN / CAN FD channel and obtain a channel handle.
  4. Start channel (ZCAN_StartCAN) — bring the channel online (optionally call ZCAN_ResetCAN to reset the channel before restarting).
  5. Transmit and receive frames:
    • Classic CAN: ZCAN_Transmit and ZCAN_Receive
    • CAN FD: ZCAN_TransmitFD and ZCAN_ReceiveFD
  6. Close device (ZCAN_CloseDevice) — release the device handle before exiting.

ZLG zlgcan API call flowchart from ZCAN_OpenDevice and ZCAN_SetValue through ZCAN_InitCAN, ZCAN_StartCAN, Transmit/Receive, and ZCAN_CloseDevice

CANmeleon · USB-CAN / CAN FD Hardware, Firmware & Solutions

Image preview0 × 0 px
100%
Click backdrop or press Esc to return