Skip to main content

Python wrapper for zlgcan driver.

Reason this release was yanked:

libray load failed

Project description

ZLGCAN驱动及集成到python-can(因内存模型不同,目前Windows下32位python会报内存非法访问的错误)

  1. 准备

    • 确保安装相关驱动(USBCAN-I/II驱动得额外安装)
    • 确保安装相VC++运行环境
    • 下载library文件夹(里面包含bitrate.cfg.yaml)
    • 在当前工程目录下(相对运行脚本)新建一个zcan.env文件, 中间配置ZCAN_LIBRARY环境变量(相对路径/绝对路径),否则使用默认(相对运行脚本)路径:
      • 默认(相对运行脚本)路径文件夹内容示例:
      ├─main.py
      ├─library
      │  ├──linux
      │    └─x86_64
      │  └─windows
      │     ├─x86
      │     └─x86_64
      └─ bitrate.cfg.yaml
      
      • (相对运行脚本)zcan.env文件指定library示例:
      ├─main.py
      ├─zcan.env
      └─library
        ├─linux
          └─x86_64
        ├─windows
          ├─x86
          └─x86_64
        └─ bitrate.cfg.yaml
      
    • 以下为zcan.env文件内容示例
    ZCAN_LIBRARY="C:/your_library_path"
    
  2. 安装zlgcan-driver-py(不建议使用低于0.1.10版本)

    pip install zlgcan >= 0.1.10
    
  3. 使用:

    import can
    from zlgcan.zlgcan import ZCanTxMode, ZCANDeviceType
    
    with can.Bus(interface="zlgcan", device_type=ZCANDeviceType.ZCAN_USBCANFD_200U,
                 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.1.15.tar.gz (18.0 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.1.15-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (495.5 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

zlgcan-0.1.15-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (495.6 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

zlgcan-0.1.15-cp313-cp313-win_amd64.whl (313.8 kB view details)

Uploaded CPython 3.13Windows x86-64

zlgcan-0.1.15-cp313-cp313-win32.whl (307.0 kB view details)

Uploaded CPython 3.13Windows x86

zlgcan-0.1.15-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (493.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

zlgcan-0.1.15-cp312-cp312-win_amd64.whl (314.4 kB view details)

Uploaded CPython 3.12Windows x86-64

zlgcan-0.1.15-cp312-cp312-win32.whl (307.4 kB view details)

Uploaded CPython 3.12Windows x86

zlgcan-0.1.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (493.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

zlgcan-0.1.15-cp311-cp311-win_amd64.whl (314.0 kB view details)

Uploaded CPython 3.11Windows x86-64

zlgcan-0.1.15-cp311-cp311-win32.whl (307.9 kB view details)

Uploaded CPython 3.11Windows x86

zlgcan-0.1.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (494.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

zlgcan-0.1.15-cp310-cp310-win_amd64.whl (313.8 kB view details)

Uploaded CPython 3.10Windows x86-64

zlgcan-0.1.15-cp310-cp310-win32.whl (307.5 kB view details)

Uploaded CPython 3.10Windows x86

zlgcan-0.1.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (494.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

zlgcan-0.1.15-cp39-cp39-win_amd64.whl (314.5 kB view details)

Uploaded CPython 3.9Windows x86-64

zlgcan-0.1.15-cp39-cp39-win32.whl (308.1 kB view details)

Uploaded CPython 3.9Windows x86

zlgcan-0.1.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (495.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

zlgcan-0.1.15-cp38-cp38-win_amd64.whl (314.4 kB view details)

Uploaded CPython 3.8Windows x86-64

zlgcan-0.1.15-cp38-cp38-win32.whl (308.0 kB view details)

Uploaded CPython 3.8Windows x86

zlgcan-0.1.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (495.6 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

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

File metadata

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

File hashes

Hashes for zlgcan-0.1.15.tar.gz
Algorithm Hash digest
SHA256 e7f67e823744b3a255af2b3aeb7c1dcb787cc40f27b6d0918dbbeb6830da1d42
MD5 002622aff16bc1c8b76e713e257b0d8e
BLAKE2b-256 76a1212e0c493ec5d810368efda02e3146e9e4c5982c0bdeca73aa4e4e2dca5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.15-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1447f5a3e6aaa6de7fc756f0b21c092dc1602315e45f7c7da9f1e9819b7bf30f
MD5 75104d1fb979db0e3f718364099caa07
BLAKE2b-256 03f238910f93b76a1501492c93c5cb92365cccaed0050aa0adda910513082d17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.15-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9d5b40bdcce9408f3cbb9c3e617eac76f78513bb5dd8f83adb90c7bf4ae60643
MD5 a4e66c1182d76ec7059b66f5bfc55476
BLAKE2b-256 f04754776d5c3543af52694c5b96506e349ee46ed92c5956d09afbec863be031

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for zlgcan-0.1.15-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e4c38113083e82253b7928cd9140725dc676147f7ffecc87a7303f51e2082f3d
MD5 fe54096cebb579e6448dc5694bff64af
BLAKE2b-256 15007bcd04c4312eee6b712be340b58629c5710242c252f27929847532da4511

See more details on using hashes here.

File details

Details for the file zlgcan-0.1.15-cp313-cp313-win32.whl.

File metadata

  • Download URL: zlgcan-0.1.15-cp313-cp313-win32.whl
  • Upload date:
  • Size: 307.0 kB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.1.15-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 651d56c100b259b99ea313245db3c722dd2b1fcf535378cf07b7b4bb8ad7fc3f
MD5 141976cffaa9f051cbee5854fa18c7ed
BLAKE2b-256 988109ecc3c6ec4482903911349c772c5c796e8138594ccc2f335eb84e489eee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.15-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 92e65a0bfe8379ba3beeddbb808211a334efa05046a6ec599d3af28c373360a7
MD5 6c19c8835c3f1eb30232fdd5deab426c
BLAKE2b-256 7a85a011235f42add3c21b3d9f849b5a91cd9c126f7f39a2da25eefe3c758df8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for zlgcan-0.1.15-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2b193c2d560f0be23612efc70f66733c9794918b70aca5c1f810ac77b1f9a6dc
MD5 5129c50a4018be92cf910de171716ccf
BLAKE2b-256 be12fe9df84c14a294db224a8804094834770de202abcb21b18f7e8b6b9968d3

See more details on using hashes here.

File details

Details for the file zlgcan-0.1.15-cp312-cp312-win32.whl.

File metadata

  • Download URL: zlgcan-0.1.15-cp312-cp312-win32.whl
  • Upload date:
  • Size: 307.4 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.1.15-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 459506fff0fa2fecb57a0488c8e4aa7a100cef4eb304a45b62a93c5bf1127400
MD5 d41403c4d570aee7aef0cf2b984c4e57
BLAKE2b-256 1309ff4750f627880a0a2317df433b08139d27a782b97df7670e8358439c513d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 36a24d9fb767b908b2d6e9e9f183a41905e82d8aa2aff466329dc9b90a632c67
MD5 a17b50d9a6f7cf56eddad2546403e033
BLAKE2b-256 1989166b58a5692d6cb16c58574e4a748945a12b9eaaf3532a08384e91c55301

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for zlgcan-0.1.15-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 681bd9c6e4abe31163112ad28cb457aaedef0e0e7d26a5cde838614b51fff0bc
MD5 d714c64d8da46988cc649a7fcd0d6099
BLAKE2b-256 5538326817702101e2cf42a24346d8adf450299113d639dc9944aeb26f56ef30

See more details on using hashes here.

File details

Details for the file zlgcan-0.1.15-cp311-cp311-win32.whl.

File metadata

  • Download URL: zlgcan-0.1.15-cp311-cp311-win32.whl
  • Upload date:
  • Size: 307.9 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.1.15-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 01a38312d52aab15290e0ebe10ae062e9bec2fac9aead225ad31e86eac54fe51
MD5 240dc435d211e7170bfbd42e93212c35
BLAKE2b-256 784f73297a376f7d09cf72c31b434a43b9a98dfd2ff975aecf631a90e22703f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 307ad9e783873be2b4bbb07c6810fb0e154fa1bc4ce7463b515c2660f0dafe9b
MD5 a8024e82eeb8a034919140b248b1f78b
BLAKE2b-256 16431f7ab6091d62f6cb60ad796b502a4d90d2c402c912eaa4476b8c8a85493e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for zlgcan-0.1.15-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 abc30adfe9ba648bfbb5ddb8f85c18039353b37951ac6e6c0b652d8e0fca6189
MD5 722287fd92e11a8a41da96fe75020e88
BLAKE2b-256 dc42f9e8ba12570418bad674858022e00fd1082b5fc596b57a49562231ef609a

See more details on using hashes here.

File details

Details for the file zlgcan-0.1.15-cp310-cp310-win32.whl.

File metadata

  • Download URL: zlgcan-0.1.15-cp310-cp310-win32.whl
  • Upload date:
  • Size: 307.5 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.1.15-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 a31a2d8034ff2aed6bbcac138ab7c75747f4fe8425df474dfdd3927a2d1d9eb4
MD5 ac8ab2e19540d52e79ef6428a7709e71
BLAKE2b-256 c20bd68d12ba0709ecca177da8a0aedf1082a34902801b9f09f1dc363a821010

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ab249756ee1b6a838ca14e567f91f321a64fd5a4b9d2021a83cbcdc4caf012d0
MD5 f37ed65766477274ebe42beb67607ba7
BLAKE2b-256 609572433ec084ba60962afdb23ba439da16ffaefe7f82e384278c595a97326b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for zlgcan-0.1.15-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1f569dcbdc36d0d5d96478fe810db420d8f996bd2cb9365dd4d117b18d90a5c1
MD5 110f65c054e2a8e9e8cf8dc0f2dce030
BLAKE2b-256 f1cac740daffc1de9806515365b31ecaddc200b0971f63a1f2b15772e82c402a

See more details on using hashes here.

File details

Details for the file zlgcan-0.1.15-cp39-cp39-win32.whl.

File metadata

  • Download URL: zlgcan-0.1.15-cp39-cp39-win32.whl
  • Upload date:
  • Size: 308.1 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.1.15-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 5a1288de21650a4f73272b9ba96833521d53475ff19505cb48fbcc482bcac09e
MD5 b4d6f00f916238ab73ac59c66bbf6322
BLAKE2b-256 31cdbce69e58845f6ab176a7ae72c4044e08edc3cdef3f5ac47afdc4564bc976

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c4a351a2b5afec4a358ed3f7054ccf83c27732e8857d4987f6f89b6189715e3c
MD5 21c36932098137bc2096cf1c3eb15bf7
BLAKE2b-256 2c9ce963c31fc5c9d5a9c93e200bed4a40d37cb61427696fc405c2ded4c6a28a

See more details on using hashes here.

File details

Details for the file zlgcan-0.1.15-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: zlgcan-0.1.15-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 314.4 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.1.15-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 915e81accd62877f79b218aa2b7f23ecefead2217644f584512d7d76b2728a97
MD5 6b8cb9384b4ba327c27d63c0e662d14e
BLAKE2b-256 e961205f79b09c606165633364c2068caefb5b0ee4d575cb24d137bef8f722a1

See more details on using hashes here.

File details

Details for the file zlgcan-0.1.15-cp38-cp38-win32.whl.

File metadata

  • Download URL: zlgcan-0.1.15-cp38-cp38-win32.whl
  • Upload date:
  • Size: 308.0 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.1.15-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 a1c65669be8a735c1e50631d17d598c2098ad81b71e676095e98638dd9f51ca2
MD5 6b149df6c9d2f241dec922a43a416409
BLAKE2b-256 1eeca7a99ddf68e36e1836b61eb779061dabb4a17f983c48e818c70c885153d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4341bca006ffca93bd7e68702145a1f5937e1829c2d4332876400f7fca3e2d41
MD5 dbd07dc541cf43bb5c85d929bf9e8e8f
BLAKE2b-256 22ff2852d21fcb9eba33f58a627efbcf318e238bfa43678af7223ac671e88a99

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