Skip to main content

Python wrapper for zlgcan driver.

Reason this release was yanked:

bug on windows

Project description

PyPI Downloads PyPI Downloads

ZLGCAN驱动及集成到python-can(不支持32位)

  1. 准备

    • 确保安装相关驱动(USBCAN-I/II驱动得额外安装)
    • 确保安装相VC++运行环境
    • 下载library文件夹(里面包含bitrate.cfg.yaml)
    • 库文件示例:
      library
        ├──bitrate.cfg.yaml
        ├──linux
          └─x86_64
        └─windows
           └─x86_64
      
    • 在初始化can.Bus的时候指定zlgcan库路径(从0.2.0开始移除zcan.env配置), 默认为相对工程运行文件同级目录下library
      libpath=r"C:\your\library\path"
      
  2. 安装zlgcan(不建议使用低于0.2.0版本)

    pip install zlgcan >= 0.2.0
    
  3. 使用:

    import can
    from zlgcan.zlgcan import ZCanTxMode, ZCANDeviceType
    
    with can.Bus(interface="zlgcan", device_type=ZCANDeviceType.ZCAN_USBCANFD_200U,
                 libpath="library/",
                 configs=[{'bitrate': 500000, 'resistance': 1}, {'bitrate': 500000, 'resistance': 1}]) as bus:
        bus.send(can.Message(
            arbitration_id=0x123,
            is_extended_id=False,
            channel=0,
            data=[0x01, 0x02, 0x03, ],
            dlc=3,
        ), tx_mode=ZCanTxMode.SELF_SR)
    
        # time.sleep(0.1)
        _msg = bus.recv()
        print(_msg)
    
  4. CAN测试列表:

    • USBCAN-I-mini - ZCAN_USBCAN1, ZCAN_USBCAN2
    • USBCAN-4E-U - ZCAN_USBCAN_4E_U
    • USBCANFD-100U-mini - ZCAN_USBCANFD_MINI
    • USBCANFD-100U - ZCAN_USBCANFD_100U
    • USBCANFD-200U - ZCAN_USBCANFD_200U
    • USBCANFD-800U - ZCAN_USBCANFD_800U
  5. 注意事项:

    • ZCAN_USBCAN1及ZCAN_USBCAN2类型的设备无论是windows还是Linux, 波特率支持均在bitrate.cfg.yaml中配置
      • 此时计算timing0及timing1请下载CAN波特率计算软件
      • bitrate.cfg.yaml文件中USBCANFD设备只配置了500k及1M的波特率, 如需使用其他波特率, 请自行添加
    • 其他CANFD类型的CAN卡仅仅在Linux上使用时bitrate.cfg.yaml中配置
      • 此时计算相关值可以通过ZCANPRO软件
    • 在Linux上使用ZCAN_USBCAN1衍生CAN卡时, 请在初始化时候设置ZCanDeriveInfo信息
    • 该库主要依赖rust-can,如有问题,请提issue
  6. 官方工具及文档:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zlgcan-0.2.3.tar.gz (18.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

zlgcan-0.2.3-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (484.4 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

zlgcan-0.2.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (484.7 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

zlgcan-0.2.3-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (482.3 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

zlgcan-0.2.3-cp313-cp313-win_amd64.whl (308.2 kB view details)

Uploaded CPython 3.13Windows x86-64

zlgcan-0.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (482.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

zlgcan-0.2.3-cp312-cp312-win_amd64.whl (308.6 kB view details)

Uploaded CPython 3.12Windows x86-64

zlgcan-0.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (482.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

zlgcan-0.2.3-cp311-cp311-win_amd64.whl (308.8 kB view details)

Uploaded CPython 3.11Windows x86-64

zlgcan-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (483.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

zlgcan-0.2.3-cp310-cp310-win_amd64.whl (308.4 kB view details)

Uploaded CPython 3.10Windows x86-64

zlgcan-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (483.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

zlgcan-0.2.3-cp39-cp39-win_amd64.whl (309.3 kB view details)

Uploaded CPython 3.9Windows x86-64

zlgcan-0.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (484.3 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

zlgcan-0.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (483.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file zlgcan-0.2.3.tar.gz.

File metadata

  • Download URL: zlgcan-0.2.3.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.0

File hashes

Hashes for zlgcan-0.2.3.tar.gz
Algorithm Hash digest
SHA256 f2f2be828df26ff1f684a1e74d0f2ab434c4d5281e9ffbaba51c0cdef4150db2
MD5 a0db21880485d69a6059a1debac448b9
BLAKE2b-256 d513805524780fe6d979afe2b31a1756873329c96fc74916b9c46761a1c369e6

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.3-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.3-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6c61af16a9e785ec286bf99d9d48b3499aabe8867fa2b3356bad9bbcaad2eab9
MD5 bc7045739439e3ab88e2c054d3b8e68f
BLAKE2b-256 1f58577eb588c21d4a50e455ac1dfddc681f204f7fb07bf705521a90ff6474ea

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 07e0f20ab048fb2964a7d3364f16a2c41bc3568ebb8d5983fbf16c49d6fe49e8
MD5 552d6aef03c1f12270b40fcdb4d597ec
BLAKE2b-256 d0b0743c0d0dc58262f12a659c2ce6013e0878b3bfb53762b186da9c2b791e95

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.3-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.3-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2f9432c089d3aa0f0e1f2f843dd3ec74207181fb0417e215f877c15060df9c9b
MD5 5a86e08ade82de1591fa814e0af154d9
BLAKE2b-256 571070c49b6b381870b1de38d989ddfbdc4443da7888f80e7b0188ccdf7b65cd

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.3-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: zlgcan-0.2.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 308.2 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.0

File hashes

Hashes for zlgcan-0.2.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6bca124223af28829e83fdc4a065593d87c98d87f6df8b35bb2732ad99dc5936
MD5 0ea79fcbc0fd68638581e04df16a568a
BLAKE2b-256 fd1716b31c986694ab36cb6a3af805687db1f2ebca80d51f770d871ebce5f7c1

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3919d155537c3f144baa53588b582a555ec20dd4be1d41a4e0437b3e7bf7d6dc
MD5 48e04d2d91935d425974fe793f6a57be
BLAKE2b-256 1ff280f67d94237a61896f7d7a4464e08115788f11e852274fba2acd7476c93b

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: zlgcan-0.2.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 308.6 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.0

File hashes

Hashes for zlgcan-0.2.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1bb58d1b07ee6259aea786bc79f17187c6d15ecd95d2f0a9d93efe736e520d0d
MD5 df1125add102c18d08cd2d61d53909f7
BLAKE2b-256 42c8726069c0fd4821778c587995787ef716e92011bca7e3a3de853372f94727

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9778ad7a3184ba6f9215ce8847de9a80f2aa271bf66cfbd2a53f6fac3bfefb43
MD5 54519b463007122fe085426586f18a79
BLAKE2b-256 330f8a843a2f20eca29790310b674cb230cedbb09b63a94be1928da64b9443d8

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: zlgcan-0.2.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 308.8 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.0

File hashes

Hashes for zlgcan-0.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5f1c93637a541e40eb10f245bbdbc47e6adea6d08d51654edf05be11f33ddda9
MD5 73766bddca495039030b2f50f0d0fadd
BLAKE2b-256 71c0faa319121657d7d7e5fd74e73846b3c9f904cf24d8fccc7c485da167ca56

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c1876f591e1c03658b0f6159f62087a1d18a18de3cfbeb7a6dbd6fa44803a13b
MD5 1def9ffac60b484c0c6057931212fbc7
BLAKE2b-256 ccc93f09a43152cadfe6158c7894cdfb5fbce57bb7e33ce503da9411ec1312bd

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: zlgcan-0.2.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 308.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.0

File hashes

Hashes for zlgcan-0.2.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c5eabf0a99a9047a9261f54060205d4ca9b0490c517c837e61ae7a0dca704ed9
MD5 02ecc0eda00eca4055e28c1bfaf1a5d4
BLAKE2b-256 1013f8e7e3705176ca4206c237564fba45bca21e882f08b856743f71d3be3274

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 292fa1e4c92bb0a45ce78d698105654f8d782857af07a0bf25dd91d8568f612f
MD5 5733a1ce858d09a29140903d7b31b3b2
BLAKE2b-256 a2abcc74b89774a6f2fbb2a60f4cb697715791b330938aad64c184c660c911e2

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.3-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: zlgcan-0.2.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 309.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.0

File hashes

Hashes for zlgcan-0.2.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 25dbde4b6a30185319e14dad134ce5abd365d908585d6a2f28d85c4695104c05
MD5 2a20db4e5a4d24ce8314ad3f7a23a168
BLAKE2b-256 abde7fa6a93486de3f3d175e736988939d3d7540cea144eb4e2a3f4925448d2c

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d013d76583d7da7fbfb0c15c6855737c1807059ccb0ec28755bda2c4b74fd212
MD5 c5c98eb6d49b197c81d72eabed5a7283
BLAKE2b-256 09873ffe80f844c43ec1adbd36d969a5fe6dce8f2852ae0b780adb9ae7b43589

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a430f88a45139c9bae48f85eed226419ac3f8018a946fd34d77ca8bdec66a73d
MD5 26cb918fb8fbb7747d11b6f31b7c5521
BLAKE2b-256 22dea5da2601c7b7e62ac1138a67b27daf664eb87a60627646e3bf5d75a601b1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page