Skip to main content

Python wrapper for zlgcan driver.

Reason this release was yanked:

report bug

Project description

PyPI Downloads PyPI Downloads

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.17.tar.gz (18.3 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.17-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (502.5 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

zlgcan-0.1.17-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (502.5 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

zlgcan-0.1.17-cp313-cp313-win_amd64.whl (316.5 kB view details)

Uploaded CPython 3.13Windows x86-64

zlgcan-0.1.17-cp313-cp313-win32.whl (309.6 kB view details)

Uploaded CPython 3.13Windows x86

zlgcan-0.1.17-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (500.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

zlgcan-0.1.17-cp312-cp312-win_amd64.whl (317.0 kB view details)

Uploaded CPython 3.12Windows x86-64

zlgcan-0.1.17-cp312-cp312-win32.whl (309.8 kB view details)

Uploaded CPython 3.12Windows x86

zlgcan-0.1.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (500.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

zlgcan-0.1.17-cp311-cp311-win_amd64.whl (317.3 kB view details)

Uploaded CPython 3.11Windows x86-64

zlgcan-0.1.17-cp311-cp311-win32.whl (310.3 kB view details)

Uploaded CPython 3.11Windows x86

zlgcan-0.1.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (502.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

zlgcan-0.1.17-cp310-cp310-win_amd64.whl (317.3 kB view details)

Uploaded CPython 3.10Windows x86-64

zlgcan-0.1.17-cp310-cp310-win32.whl (310.3 kB view details)

Uploaded CPython 3.10Windows x86

zlgcan-0.1.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (502.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

zlgcan-0.1.17-cp39-cp39-win_amd64.whl (318.3 kB view details)

Uploaded CPython 3.9Windows x86-64

zlgcan-0.1.17-cp39-cp39-win32.whl (311.2 kB view details)

Uploaded CPython 3.9Windows x86

zlgcan-0.1.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (502.2 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

zlgcan-0.1.17-cp38-cp38-win_amd64.whl (317.6 kB view details)

Uploaded CPython 3.8Windows x86-64

zlgcan-0.1.17-cp38-cp38-win32.whl (310.8 kB view details)

Uploaded CPython 3.8Windows x86

zlgcan-0.1.17-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (503.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

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

File metadata

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

File hashes

Hashes for zlgcan-0.1.17.tar.gz
Algorithm Hash digest
SHA256 b4b0f8e4c6dacfa232cd9428c4210a12417b1c31d0049ee9ebc1e5ab83f86551
MD5 93c881267430dcfb13cb036b5444fe8e
BLAKE2b-256 5d189941e32e926a8ff34d003ed3267c9fa464efc039aebab4a8de28576a0e7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.17-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 096a6a6326d259e8132fa5056547f46c73c345b8b7428fa9ee38a74e8ac68fb9
MD5 de663fa502542398e68cc7b559d0a27c
BLAKE2b-256 067591c4f27a8db8df76f0532b7e6325b38ee0104623b656a38dacb07f2e4ed3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.17-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a3e3c414f3a6eea2deaf0061d8afdf04a4fef4398dd338f30bee07191bf31504
MD5 e0bd9ec5c5580c6032fa2688ad745039
BLAKE2b-256 659d5f29e9da44139b0ea6ff25eea251d97e8495c6793df48f42c2a5a14bee10

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.17-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 316.5 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.17-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0099c11ba1910c50b3c374c3b869202da90281e83f4f7512d990a7bbe4f3f568
MD5 498ba16a28fcb8c7707ac2f6922c61e5
BLAKE2b-256 17a367459bcd73b98645866b476c607bd050005df613d19575ece2f96ac302c7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.17-cp313-cp313-win32.whl
  • Upload date:
  • Size: 309.6 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.17-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 292d6eeda940006ce677b26cc68dd729acba66d7ba9ba028a55cb12082450b0c
MD5 02ed9fba2ef15976130987fa95cb35c3
BLAKE2b-256 c66e2e4517262b51df5f56b85cce7cc3e7618cebe1f1c89c83613aeb674f6505

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.17-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d570143e963c32e31f9cc0bb21e6dcb5a12e8efe8f6d1e985f0d45f10c0ab1f8
MD5 60a4cc934acc4f33ce3edba69a7462b9
BLAKE2b-256 8083e4761300526f2b5e0316d1567aeeb4c3b5d81e92c26028c9fa5389c58aea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.17-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 317.0 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.17-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8919a2ba93d9107906d8735659dee2b9d2773ce0385575fe87fc91dbca751a01
MD5 0fa3ad2c7c13cb0143ae48950ba56e05
BLAKE2b-256 6d4ef0d46044f81a06e562a02caeb1010d9c874abe677f4ac52c4d0ed1c1aaf5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.17-cp312-cp312-win32.whl
  • Upload date:
  • Size: 309.8 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.17-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 fbcbc67fbd9cee92ff713f2827f01cde4d197fc0da8bc3c1e3a7d0f794d8df59
MD5 9f6115c04be7849b1b1384f9c7b4a213
BLAKE2b-256 d055c24a8be2516651ad365a51449adebf94f829c8ad67b1c51959a9f17c8926

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e7ceffc11e05c43cf331f7667d9544390af43bd29c1fdd38a1c926828461bd2a
MD5 b4c5ce9fca313b8f5d16bc5d389dd4ea
BLAKE2b-256 5d9a093c6d6b62ac6b36707d8e7fdceadd6e3ab231f0558a17f065ce8af07791

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.17-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 317.3 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.17-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b3a132c1b20caf5f83804d422222d4e3ebc13c002b07249e3d8a018e2b98fea7
MD5 9d596a63dffa7bd5c0e06539813822d0
BLAKE2b-256 1b6e4136ff6a93867b70906d7bd16c977c9a5c08002dde54437a9fdd3d0219df

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.17-cp311-cp311-win32.whl
  • Upload date:
  • Size: 310.3 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.17-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 ad5a7028c95be50cd99b90a522252ccc1e05d569c62e29659d6529053136fe10
MD5 a5370e962277dd5047de856c96cb10a6
BLAKE2b-256 5fcc576759c35b6a236c475657762dec6ff77b8fc2c31c6b87fb472a8d75fae5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 634bca6b2ce6169a44c70d378d24b27e1f7cfc51b3145d5f962d226300ed4e28
MD5 e1107fdb46f099d197471f433ec96352
BLAKE2b-256 9249071829c759b10c2ab4b8fce5ce73e984e53f1c74d16e7b7f8b1f68a34c90

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.17-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 317.3 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.17-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cca0ff2ead8fb0094bdcce3e304ed047c2b1c5a069e9952d6bdc4cc9f809826d
MD5 b1a333de57193f5c7f6a33810e100392
BLAKE2b-256 cdc2edcb2c7e80e270a2340eb88566c9aca392679ef6ff29a9ae4581b8b02904

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.17-cp310-cp310-win32.whl
  • Upload date:
  • Size: 310.3 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.17-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 07c212c979987062f85e484294ae7d8b76ee38c773cc8289cf4aa84a342b601a
MD5 2244edd5004730b52f4605f2383f100c
BLAKE2b-256 bd23fdfe91a9592a8854de4ad7d8bab1f86f5485643d267fb3b59ebee9cf8fd8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a3dbd422a435aa5aefc5827d144da6bee4bfd8942ad9e031cddce096e866593e
MD5 3bb983212100199d9fb7e7a0964f96ba
BLAKE2b-256 5a2a144797e372b04a4165349c14e4de0e8d674c52f7dff513c94b20bc1e505b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.17-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 318.3 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.17-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5f784a072a19ed92b742d172b67a6c442a689f669a2b8b487ff02c731b6817ba
MD5 731fcb570c9cbe5c188f583f2ab0cbfd
BLAKE2b-256 c1f1489a8f9183eca689ff6f9c62dbfe11a46e6a5b7171154a8a8fae57323607

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.17-cp39-cp39-win32.whl
  • Upload date:
  • Size: 311.2 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.17-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 07634cce945ae279b4b04d86b6f983cdad93e14a25e54cbcb046123d71227753
MD5 5cdb982f6e6e10d156f567d714c8c6ba
BLAKE2b-256 7e94bbecc217b2d4c920400d4e09091ceb72bdfa4d47ff4fe5a7412fe5094029

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 93052b318847f05c8f4e4b53ebc68ed05a6484f2e21c62c8a39b31b94b4d32ef
MD5 7ab810693a790672104e117e6c43aaf0
BLAKE2b-256 a157c9539cdc62d38f719e274430d911798d8a337a50983d9e29f058042a1586

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.17-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 317.6 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.17-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 84c1d42321e2d793536e25484e67deb9264235d5c35be76e53f198521b2777e6
MD5 40180f2fee3fa0d8ab5a30c7fa770881
BLAKE2b-256 ba7af891e51acbe3c591d27e765bb51d4e24206db7eafb72fdf883e471a2b72c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.17-cp38-cp38-win32.whl
  • Upload date:
  • Size: 310.8 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.17-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 016275912e6fd79e73d903661b8f1ec0983ff1c2a8e516c2e77798be7d74e5c6
MD5 faada066fae11e781d87d1e257f47b2e
BLAKE2b-256 282e51a111196a5d58e6a228734425abbf38ec10db2f87f623f7913ffca201a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.17-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f500eed255f2dce1c06380794ee3392cef9842a6e2a9b2da554f55c1892e5b3f
MD5 04aadcb861cc3e326516a90728fd0c30
BLAKE2b-256 7672abb78a1cbe0710709d89dac7a84153cbaa29784896ef71c7006d08dcf3f5

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