Skip to main content

Python wrapper for zlgcan driver.

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.x移除了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.3.0.tar.gz (13.6 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.3.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl (489.2 kB view details)

Uploaded PyPymanylinux: glibc 2.28+ x86-64

zlgcan-0.3.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl (459.1 kB view details)

Uploaded PyPymanylinux: glibc 2.28+ ARM64

zlgcan-0.3.0-cp315-cp315-manylinux_2_28_x86_64.whl (484.3 kB view details)

Uploaded CPython 3.15manylinux: glibc 2.28+ x86-64

zlgcan-0.3.0-cp314-cp314t-manylinux_2_28_aarch64.whl (452.5 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ ARM64

zlgcan-0.3.0-cp314-cp314-win_amd64.whl (303.1 kB view details)

Uploaded CPython 3.14Windows x86-64

zlgcan-0.3.0-cp314-cp314-manylinux_2_28_x86_64.whl (484.0 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

zlgcan-0.3.0-cp314-cp314-manylinux_2_28_aarch64.whl (454.8 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ ARM64

zlgcan-0.3.0-cp313-cp313t-manylinux_2_28_aarch64.whl (452.4 kB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.28+ ARM64

zlgcan-0.3.0-cp313-cp313-win_amd64.whl (302.3 kB view details)

Uploaded CPython 3.13Windows x86-64

zlgcan-0.3.0-cp313-cp313-manylinux_2_28_x86_64.whl (484.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

zlgcan-0.3.0-cp313-cp313-manylinux_2_28_aarch64.whl (453.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

zlgcan-0.3.0-cp312-cp312-win_amd64.whl (302.9 kB view details)

Uploaded CPython 3.12Windows x86-64

zlgcan-0.3.0-cp312-cp312-manylinux_2_28_x86_64.whl (484.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

zlgcan-0.3.0-cp312-cp312-manylinux_2_28_aarch64.whl (454.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

zlgcan-0.3.0-cp311-cp311-win_amd64.whl (304.9 kB view details)

Uploaded CPython 3.11Windows x86-64

zlgcan-0.3.0-cp311-cp311-manylinux_2_28_x86_64.whl (487.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

zlgcan-0.3.0-cp311-cp311-manylinux_2_28_aarch64.whl (458.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

zlgcan-0.3.0-cp310-cp310-win_amd64.whl (304.8 kB view details)

Uploaded CPython 3.10Windows x86-64

zlgcan-0.3.0-cp310-cp310-manylinux_2_28_x86_64.whl (487.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

zlgcan-0.3.0-cp310-cp310-manylinux_2_28_aarch64.whl (458.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

zlgcan-0.3.0-cp39-cp39-manylinux_2_28_x86_64.whl (490.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

zlgcan-0.3.0-cp39-cp39-manylinux_2_28_aarch64.whl (461.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ ARM64

zlgcan-0.3.0-cp38-cp38-manylinux_2_28_aarch64.whl (462.4 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ ARM64

File details

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

File metadata

  • Download URL: zlgcan-0.3.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zlgcan-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b169fceff9a2b35b4390f9cb795f7ed20a37df03f94e3f337891eeda874d141d
MD5 ddfa2b18cae61e15a9fda3539e1da2e3
BLAKE2b-256 af3a51478f7d44d651f9584331d236e0addf0416ca1e79aee78fa2d5ba8d3149

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ef8552e37ed6e843dc92d53039b4c96fcb3ead733eccd11eb4a6f41b051d1f5e
MD5 840b42672fcf128d1701ef1a60c2a82c
BLAKE2b-256 bdc3c78d6edce36eab5a21396bcc05878d2dcbdabc779c77b5c90b9a8c546348

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 dc3014db705fdf50c2f264ac01ad67fa735c04e7555f31afe1c269d081c675a7
MD5 d4f282a0e45fd4d632c79d761f4e525b
BLAKE2b-256 dbd5b80c2bf47578c458d9dcb0bd5c539f24e7c38ae66e2152570d67cd19dd59

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp315-cp315-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp315-cp315-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b286c1e107e9c97a03df0f889923f6a5e1e91aef262e2cabbacb862b25bd7bd4
MD5 f96060736c7f1df3b6d7a64f05697f43
BLAKE2b-256 ff60673a108e5251ea2abf6669a10190e33356e1c664030a13e627a95567b03b

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp314-cp314t-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp314-cp314t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ecd427a7cf8adae2bc1079b222e2736ddafbc6cd0997034e1cc5dc2b15e96132
MD5 0ca8b643cb855a1d0638b2b448fd738c
BLAKE2b-256 e22667a01f7d4d133a3e40ec80a0101743747c523f87c77838f418d7b2f40be5

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: zlgcan-0.3.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 303.1 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zlgcan-0.3.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 8cae9c00f6bc4554a0e436cb50b8c0c820d9fa39771115fe3249d0257bc28e64
MD5 cf0814d6c7135e55a22cb5822aa8670c
BLAKE2b-256 1443530567366874db1e5c3b1d16757dea5925f850d94680b6267adde309f9e4

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cbfb5c6989865b1bda2b4737f6b3370a9d591b7b956baf31e01d3ae57c4b5189
MD5 261ba0732d288de9c299aead71e4d7d3
BLAKE2b-256 9dab976dedfbc847e1b9453ae32ab7fdc0ed0b78a0de86eb11a8b0d84ca16149

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp314-cp314-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7095587e76803d6b3efd8489dcad6be4d862b91f1825f7d2dd90614e1e50c23f
MD5 34cf8862e13cebfd8af2906aa6416231
BLAKE2b-256 ee394f9ad566b484a5d6add0a5940b8d1a7bb8d9316d8f3bea03e77f14d7efd8

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp313-cp313t-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp313-cp313t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6e0b0a18aef04aa893d1081162abcf02c56cebec28407a66f8f57f5978f67186
MD5 b3196b7db2c70085f6fd9b9d26721e1b
BLAKE2b-256 4b1b1022ff19688bfd01fcd7e222b20944e4587aa68b71543bdbc5cfb812d363

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.3.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 302.3 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zlgcan-0.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 68223c0190e6da27bf188673233a50527becc5c23369de55efb4534cd82193ca
MD5 e07e78cf36a9c42261a1602c7c9ff634
BLAKE2b-256 e6bd495938e245421a0efbb76d4369873d0e04306bfd5c26d949d6eb24e4fb98

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b04a312ab62284ff63809a57af4fb8410747f113e19231be412ea265372e5f72
MD5 98ed6fb2758c5f4ce179e76e2d61239d
BLAKE2b-256 72bbf0b730a713bf0f261670d1252cb018d2953ed7a41ab7ca411609152f39cd

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7490a3231943c1035faf241aff09bcfab777b4fcfcdc14d518f5e47dc885f21d
MD5 be2fa0799ca7d63de2b15060d834e8a5
BLAKE2b-256 108758c6b5722823710ae696536a9d7a7a390d31bd7a9609f535423ca42e833c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.3.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 302.9 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zlgcan-0.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 56173773d78cc83627328bb519b8b07740cb5c10beb0055b7aad63f79bde7588
MD5 89a55e1ac3bcc993b49857a85fa6f15f
BLAKE2b-256 98335558c3ada88f6a58d44b61a7e9a4dd73bd81ebef98506655b2040fe53961

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 67567cf192e75bf1f2d34ffc10db212d00e0b8f63622343ce605cd98d995ee25
MD5 d1c334ee85ad6d310f43cdff8b85824b
BLAKE2b-256 74b2a0a8985dec82a9d012fad940ff851f11fe54052e8afe0b381097e21e05cd

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ad08e46a22832d90d58b91b722d6ee68b07fd895e1dcd9a92e476263debd7d98
MD5 7aeed4a974546928f489e6a18ce13a25
BLAKE2b-256 08c902e1ec598d7ddc6ac2dc54a30e661c17bcfb5c1b6eed54110f72cbd64434

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.3.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 304.9 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zlgcan-0.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 21d503eb2eff9dcea98b7369c8fd9a723d3c251e96e115b9ded015cd66324b57
MD5 299681b962c3cd4a5cffb9d5c40dd49f
BLAKE2b-256 4eb811d11f77e23178662813bf498bebd69ba119555db7221ee9162639473afa

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 de7412d055728ffe71698d9a36b2fe9b12078d588e97e524a6196594c0fd6190
MD5 f25c39cf7512fbe2cb338054aa20f78d
BLAKE2b-256 4a32e3db6b84efda8dc7cb3ea0f211af690c76742fed7542ebf0543128bbdf05

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 599aef66d6953b793915ed202f9a6a0678795faa83cbed0cbe9459f2d2afdfa9
MD5 08d730829a59f7cecaa263e1aaa60e6d
BLAKE2b-256 f8c93a9cf56194dbd7c7509d332e0aedeb714485a994963e45ce9962aed57a14

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.3.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 304.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zlgcan-0.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 641d9cc4140705005bc52266e8c4bc81b57a803829567e083c0de7746d2d3680
MD5 a3ab715680d797ed0044886e40883623
BLAKE2b-256 d4b326a86bcd8eff9f34657ec5274dc75f87a2cd5bac051177aa1a9a6e778a4e

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a49fcf2c9965b0a34d77a55b7ab2709946a56db6ab8250c3f618e308437e639b
MD5 be32d5315ee37410d180b2580737ed6f
BLAKE2b-256 b6478526deadf25ceb0464720fb929ee47d36b05b4c937c01dabed34c484de6c

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d8d9915161983ec86db4505f4bef5bdd930712dcfe3dc53c8e3f8e1947629192
MD5 9794b68d6a5c313071a9dbbe5a187a38
BLAKE2b-256 53fd0f53109f46829f0672b1a792a65efbc10565144bae1c1ae2c915088d796d

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ec3f5c5f8b6d045bfe828cb37b136404923186df787154207b31370fdc3aa7aa
MD5 f1c3b4f3e30a288dbad0a545f748258a
BLAKE2b-256 13b86f5df30695a4c42a68d832740eb8bce86426f08015eef3fee10dcfbf72cc

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp39-cp39-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 face3725f7111935c3dc3cf089fb5749991745d9ff26736396ac83a69b93ebc9
MD5 de26dacf61a84c4ff97faeb0f64fc0cb
BLAKE2b-256 30e68f54a25b049b7bd59568ce396888fa2763a2a0e66d7c93964bb3dacbcab6

See more details on using hashes here.

File details

Details for the file zlgcan-0.3.0-cp38-cp38-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for zlgcan-0.3.0-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1ffc15cb2404ef25fa181296bd6939e87be9c374bd5d1b178dcaa468ba9fac68
MD5 2a90aa0c94746b66f821d28957fb4112
BLAKE2b-256 ee185f2d2c62944d2289282e5b85ce7a31b8177841abd907227949096eb381cb

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