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.2.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.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (482.1 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

zlgcan-0.2.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (482.4 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

zlgcan-0.2.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (480.0 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

zlgcan-0.2.2-cp313-cp313-win_amd64.whl (307.9 kB view details)

Uploaded CPython 3.13Windows x86-64

zlgcan-0.2.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (479.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

zlgcan-0.2.2-cp312-cp312-win_amd64.whl (308.3 kB view details)

Uploaded CPython 3.12Windows x86-64

zlgcan-0.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (480.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

zlgcan-0.2.2-cp311-cp311-win_amd64.whl (308.5 kB view details)

Uploaded CPython 3.11Windows x86-64

zlgcan-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (480.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

zlgcan-0.2.2-cp310-cp310-win_amd64.whl (308.2 kB view details)

Uploaded CPython 3.10Windows x86-64

zlgcan-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (480.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

zlgcan-0.2.2-cp39-cp39-win_amd64.whl (309.1 kB view details)

Uploaded CPython 3.9Windows x86-64

zlgcan-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (482.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

zlgcan-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (481.8 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: zlgcan-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 d13a2e4611807814233c54555359a486cc0ef936d75c3d651be1c1bf14727a70
MD5 a7e811fb84656b28593fc88b09948b88
BLAKE2b-256 1803e9bd34d6f7d51226c4d9594095ad305cf0fb04cd28d0eee54a6854e62b9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e7a6c4bdb98d8bc4a1ceec7a7e445dd95905c9b9bcb2b7c272b6cb5946a2105e
MD5 b4c9ebbdb3024465e91e8f56c07c96df
BLAKE2b-256 89c8231075265db88a43b220fca566203a67f9ae8495523022b59af1aec51e97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9a6db8a89c11a746a57b0ba3028a8ce85e39af5bf62e1e1192b24d5c826ec083
MD5 68a6736f5f05f58a64e4714123b2da53
BLAKE2b-256 be89c188c0ecadfcdcee074b338941e1b606b7964e54f5b73de626cf9b121bed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2fefea97558fa03efcfb41e4785eb94ab7f0cc4d1c766b96e64c782b65c08583
MD5 e5ef529f770e3e4fa6072d347f10cc5d
BLAKE2b-256 efb3288c275fef5e2b3486d43c3979490e3cf2d196540cb3e0ac6d673ce66a1d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.2.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 307.9 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.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5e16b30cc06f5a08c12416110c363e9ed034ac2039118b360589e8709680e292
MD5 9033ece497a2e6e1a37b6fcb9b5f8727
BLAKE2b-256 0c50d502a4d6dcec874b9fbaa8c84add1d00d172c91b506aff662c93031f900a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7e4ae0a757f440b9ee686b58968db2e67723177913216bbb8bd13a6b3f810c44
MD5 b4e5abf6f4b049d8816102532213c663
BLAKE2b-256 1c01881d5205d2f24f0639d4046d188840387ff1af89505cff40ddbe820d6575

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.2.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 308.3 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.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ec2db124e058b8064e93d700cb1edde9a400a613e3d49c0b8ab92424810dfd80
MD5 18b9001256722667991f9b2f61ab0798
BLAKE2b-256 fd3f572d9b7082a0d12ecc5b300bcd6bfb919d2692c7ea348c1ca049ae1b27ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 01bdf843a681e87b8bbcd1c543da88c62b4578043c914efd1d328e096dc6b6f5
MD5 36178e3071892d4aada929644fa97da2
BLAKE2b-256 9d4cb9fbc79c8cfbbb66409ecab7235d11ec50c30cb029e09b64b6ffca439467

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.2.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 308.5 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.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9af58b4293b3508447d3dc4164e375373be193512f8fd0ec3e3e4f28277b582e
MD5 430e64e62eb2cc937d4a8059f30506b9
BLAKE2b-256 ec7b8ecf63eaa2a79ce307a956a2c7acb3fc39af1044ac72ec31756d1ff18d8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 af414d56392247cfff36855c1cdd599a6cb8db2a755243c8fed614c9cbd782dc
MD5 c3568a587e4697fda28ec4db652788a1
BLAKE2b-256 8d6debc3e4a00d8aeca645b33fa2fa650eecc6a21b08b6a06560dc0698145866

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.2.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 308.2 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.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 074d92072642a36c5a963c7cd08bc0e77c8904e72fbfe1c66a6ff0e0b280920a
MD5 4f40d673ca158adc7d6e54b3a2dda73b
BLAKE2b-256 355c1248fb2517f407aef9ed6386388ea44d328b9033dcfd1644b3ddacaf767c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8b85443a1cc63c46478a8eb3bb1acff41f42f6fa8cb91dcff38512315fc2b92b
MD5 e61f9a158cc1ae19173b3c1120b3afad
BLAKE2b-256 809ffde3e731c9cd1deb07e0be518193c5874ca52329a327e283277239676e04

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.2.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 309.1 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.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f11626d999dc52fc9a895ee7e4a2d1b01eea4d1f508887af00ac5700d16f775e
MD5 284154e4da3764b182018b0539937518
BLAKE2b-256 80c49f099c735b8c7fb1c5cc3490e4d5f95e2d9641fff631fdf59e958a4c321d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 37b80bd201e21e9c545d9a8a8e74527832e70769f239f1544b43bda6fd5fcb45
MD5 2d335564912190742ad5a2748152543e
BLAKE2b-256 f17ac621701a1df148dc30e3249960792259340476fafed440cebc82fbc7fc22

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0e543e026ef49d870c6fc3558e49d72f02dc4f46ac8d166ec5730b41ac5c8eaf
MD5 033d32c20a4b3ed2080824094cfe6054
BLAKE2b-256 b9ea638c8c3b784ac3f59c34e55443c62c74beee241e65f2a77189aba4488e75

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