Skip to main content

Python wrapper for zlgcan driver.

Reason this release was yanked:

report bug

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.16.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.1.16-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (502.7 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

zlgcan-0.1.16-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (502.8 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

zlgcan-0.1.16-cp313-cp313-win_amd64.whl (317.6 kB view details)

Uploaded CPython 3.13Windows x86-64

zlgcan-0.1.16-cp313-cp313-win32.whl (310.3 kB view details)

Uploaded CPython 3.13Windows x86

zlgcan-0.1.16-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (500.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

zlgcan-0.1.16-cp312-cp312-win_amd64.whl (318.1 kB view details)

Uploaded CPython 3.12Windows x86-64

zlgcan-0.1.16-cp312-cp312-win32.whl (310.5 kB view details)

Uploaded CPython 3.12Windows x86

zlgcan-0.1.16-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (501.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

zlgcan-0.1.16-cp311-cp311-win_amd64.whl (317.8 kB view details)

Uploaded CPython 3.11Windows x86-64

zlgcan-0.1.16-cp311-cp311-win32.whl (311.1 kB view details)

Uploaded CPython 3.11Windows x86

zlgcan-0.1.16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (502.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

zlgcan-0.1.16-cp310-cp310-win_amd64.whl (317.8 kB view details)

Uploaded CPython 3.10Windows x86-64

zlgcan-0.1.16-cp310-cp310-win32.whl (310.9 kB view details)

Uploaded CPython 3.10Windows x86

zlgcan-0.1.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (502.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

zlgcan-0.1.16-cp39-cp39-win_amd64.whl (318.4 kB view details)

Uploaded CPython 3.9Windows x86-64

zlgcan-0.1.16-cp39-cp39-win32.whl (311.4 kB view details)

Uploaded CPython 3.9Windows x86

zlgcan-0.1.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (503.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

zlgcan-0.1.16-cp38-cp38-win_amd64.whl (318.5 kB view details)

Uploaded CPython 3.8Windows x86-64

zlgcan-0.1.16-cp38-cp38-win32.whl (311.4 kB view details)

Uploaded CPython 3.8Windows x86

zlgcan-0.1.16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (503.3 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

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

File metadata

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

File hashes

Hashes for zlgcan-0.1.16.tar.gz
Algorithm Hash digest
SHA256 a8e2a461442304785136d841808c9e706caf6c6e6784a9f9b88ed668b26438d7
MD5 d814ae8757bfa94c9d739a6ce2629aa1
BLAKE2b-256 7abb9a9426d5b36357deb4b418c5383bf4d8cb63f8cd604ac164932424029b97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.16-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 779176369f228e2e81cb5734c7135a13be2d5211b3fbb9737e433baaaa5bcc9f
MD5 f75688b6a5ece82d7e44b76d81200250
BLAKE2b-256 549ee61525ff312288ba1fea259806898b42a3bae382055307d5afb4b3d300db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.16-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3f580ddeb0bb3a7748cc8f526bcefbaaf24a84d34afaa418a8f82d9e6700fa95
MD5 43f4333b65571e12ac8d3259e9529d7c
BLAKE2b-256 2af9ab30fc9930bcc79abbce691dd33dc2d87790b320421e62cd10bc5d1ab11c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.16-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 317.6 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.16-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 86894e9eb740c60fd912d69c6e9983f9dcd91574d2bd1719123701b01521cf71
MD5 5257397046dbcb3452ab6e5a594d3727
BLAKE2b-256 5adb7fd5470a22e11ed6005926d1098f1a418341ffd8d289d068e41d325dbc2a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.16-cp313-cp313-win32.whl
  • Upload date:
  • Size: 310.3 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.16-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 461c274b7cc298b8e96d0a92ec1f53e292f97a8f3e422524dee576974606b7c4
MD5 35e1aee08472799acb2afe13fea84960
BLAKE2b-256 5bed5c22e5c97790fd2558bd97deae081b37f39e9460c4984ed2be684bca0b0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.16-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 380ed38ecb032a883f72f68358346e2a7815d23a0708abd067df6cdd06cd559e
MD5 802c484af769f9ade8dbc5876545934c
BLAKE2b-256 3311e167a8070faa2d2c954c5943d9bb0d36fc3192eeb1499d3b0bcb3839bddb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.16-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 318.1 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.16-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9ff047c5ac5542b370b830902c14e339777187262e9f55b7acb54c2f31f20038
MD5 96d9b6d2642a8ad8334549406b820ea3
BLAKE2b-256 ee1396d9739b6694b6938ae7e94d9e0c35cb0c1da5a82f33a861607d0d0740d1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.16-cp312-cp312-win32.whl
  • Upload date:
  • Size: 310.5 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.16-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 d14411f00401f1a2b8f61293364b1b8f9f72144cfa7856ba6b1c6cde9eaa5f9c
MD5 b9a6daa8de59fd598178f76a4a462cca
BLAKE2b-256 21b9f9df70275b65a6b31dc819332bb29e07009307f8fa26d97ceb795bd09f46

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.16-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cec9889691932ff025c9d1bcc9b421aa7a6953fbdf91f3627e18689ea6da4878
MD5 58d145578cc33dde9fa3c60570144715
BLAKE2b-256 7848416b9e7c1d350e622fe4341a5bc91b5bc472c3786ce01f4f305d3f68984a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.16-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 317.8 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.16-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5575736b3dbb21137a256ca9ce55a4def5095c215aadfff779439d298ef2c891
MD5 15a4a2cc8a87df75237de8e78efb3058
BLAKE2b-256 d7d65db335db01c71c52789424428d8b631a35e8d60261192a398a5d19f1adcb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.16-cp311-cp311-win32.whl
  • Upload date:
  • Size: 311.1 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.16-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 8df5bc448d56be5fceb44d052470c1d2b8ad954bdb715407742cbd2a4e05cfd8
MD5 bd820a7f7c5708420271bd4694f9182d
BLAKE2b-256 ea3521404557c17127524d0e27a13f80c6bfdc030039a92346719f00d847d82c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5e559b32870f66a0ce085146de284b22f24146e87f85556baf925d4898f2ce5a
MD5 1467287e01cbcd0a1d31e29c2f012f33
BLAKE2b-256 0e249a7d71c338ed10bce56e10a43ed06137a9e03557156c28e74fc082cad9ba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.16-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 317.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.16-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 38f502066ec617517bdd2e3552355931e1c09c69d448dcefe8d0f379d7809c87
MD5 88f40ca52c4e3a41dd1d2f96b82f5486
BLAKE2b-256 cca010f38302ca507a3710f19e49f172bc76f900e0eb9096468c40ef88ffa257

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.16-cp310-cp310-win32.whl
  • Upload date:
  • Size: 310.9 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.16-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 ce9e72bdbbc3a90481ec9060f31da74cac91582959c68cb66a045c7611924d75
MD5 64da077adc30104a4453d45494b7ad65
BLAKE2b-256 5fe045bfd18f15e06533b414bec232e5cc13dc8c20d2d017c3064e71bae711ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b490c44aea5178e565007db6b5552153124308947926529c1bd0131831330e5e
MD5 5bbd83475a85acded9becec09c10eb38
BLAKE2b-256 a80bd3d801e3a3222555a64bc22cbaa9362f76a565709fcd675236af18e96b72

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.16-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 318.4 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.16-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6cb8f2e955f62ca98c3cf8cee662ce3934fb36749de5540f16955a2d834d22b3
MD5 650672fc3c8c50b218aca073d3b2ab8e
BLAKE2b-256 b1d2567ea48da44f4c5b27c192c46af928713aae4b076ed97e5c94c8e636fece

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.16-cp39-cp39-win32.whl
  • Upload date:
  • Size: 311.4 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.16-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 0ea424ebce96063097bd848ef87113a356ea6b5a9810ba56f6c9bd6f9da62a41
MD5 a7e7d57cfa4f175cc40c1bfbc4922a30
BLAKE2b-256 e93490c15d011f7d8003030669c80edf9c5402662eae7c65be088e1e6e7b25bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d60b2f342a138d974235313b6876f81a2739d87aac746f2866becb3cbdd6a840
MD5 b5206c2cb6581d634927374a5e5d1f0a
BLAKE2b-256 37260733b4151d34260dbb5bd35d02aad6fe4080b7c4bebeec0fd04b4e0c2c56

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.16-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 318.5 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.16-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 62c93dc368da9c66a2dfc0cc3c17bcd51d03d37a5780ac79a803693aad0aa578
MD5 d2903cb38399868c6d6ff918d3af5077
BLAKE2b-256 5c6f7540292ab5b50d72e5fc18af2d3088bdb830595d0c52f20508961c8d2d9a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.1.16-cp38-cp38-win32.whl
  • Upload date:
  • Size: 311.4 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.16-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 86ca13d7b7d93e47c72dde27c7570965a396fd9943bea7964e0f0a561c989e4e
MD5 c5e77eef35b8401218d514c5eb588774
BLAKE2b-256 c048d39e90793844ed4f1dd3a44f4f2c5d5ebea47ebb2e6a3e45c111c7e87ec7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.1.16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 938fbec9240ff68d6e3e749d6fb717f299e8409a683ab0f089d52f323ca24843
MD5 5b305b4cc1d35bdfe53f348077421f72
BLAKE2b-256 ff2a328ba27defc6ec157d267ff01ce25f69ce3b9070af54e00812e0e4dd9a7c

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