Skip to main content

Python wrapper for zlgcan driver.

Reason this release was yanked:

channel init error

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

Uploaded PyPymanylinux: glibc 2.17+ x86-64

zlgcan-0.2.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (484.6 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

zlgcan-0.2.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (482.1 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

zlgcan-0.2.1-cp313-cp313-win_amd64.whl (308.2 kB view details)

Uploaded CPython 3.13Windows x86-64

zlgcan-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (481.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

zlgcan-0.2.1-cp312-cp312-win_amd64.whl (308.6 kB view details)

Uploaded CPython 3.12Windows x86-64

zlgcan-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (482.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

zlgcan-0.2.1-cp311-cp311-win_amd64.whl (308.8 kB view details)

Uploaded CPython 3.11Windows x86-64

zlgcan-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (482.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

zlgcan-0.2.1-cp310-cp310-win_amd64.whl (308.5 kB view details)

Uploaded CPython 3.10Windows x86-64

zlgcan-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (482.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

zlgcan-0.2.1-cp39-cp39-win_amd64.whl (309.4 kB view details)

Uploaded CPython 3.9Windows x86-64

zlgcan-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (484.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

zlgcan-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (484.0 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: zlgcan-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 4b5309cbf29f0d6869c2f32e3c81bea5a4a55487857c61469fa25b2d6274d7fe
MD5 57c3459937e6f6bce840c0e020d4dbfe
BLAKE2b-256 9109c9705c664acf10391b8c3d9f0cf518186b72b27b751db4c23363a8ef2d23

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 61b93b8943ffc7722f2576b6750dea5f90ae8030c97cf8e541d99def260b8e42
MD5 fbd863cc0259e48ab3652c3916c7a47e
BLAKE2b-256 7c1228ef2fd210f204e8ce7c09fad83ee4538e8f16648816153780dc88ac334a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d9b1723eddbbdea5d06cf91bb143539ff5a226d5af1a5740fad3d4eb613c4cef
MD5 f70f18780946ded59c4f01d04a54f819
BLAKE2b-256 2c1a8138dd3b8a4fc0183a8fb69e7da48a2dec24c4e4e49fae4ce49ca2b2cfc1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7795a2dabbbf0ca5d39d02122bcba387cc16a3b954b921c784f9fa37ab2dbe0e
MD5 1acd9f2d29382624002faeeea282c4a0
BLAKE2b-256 d85c1331212c8a03b470f23619f939386d05c224e967cec0a9e06f756ae7dc9a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.2.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 308.2 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.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b8dab917b44b15c223980f02501a24a85d7d3ca498223e84bf620ab179fdc1b0
MD5 a9167a988afd72246164bc83a01bef56
BLAKE2b-256 6c86a32c686f2c7196be2ea33de7dc2d6b4395f0816c53fcad6a1d705d1c0c7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 97b4a5b1910b913ccff6a8f3c46c4b140182a75a926102d9aa272335471a3614
MD5 3ece29356fea6d5d0832629f13ca6185
BLAKE2b-256 a0fc80cf52f415bfdc2bab9418e3df8e65c6fd2f1bedfec53ccba916999975bd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.2.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 308.6 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.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4a0bfbc65eda9a01b11a1c3b40551aab56af415d4655910722053f51c3a7e9b1
MD5 e173bdac1f1f6008eb82bcafbdb6f8c4
BLAKE2b-256 194ed73818f3d37e513bc9624e41ea1515e9ac23c54aad95e1fbbdca6b923670

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ad2e36b817778155401cde3249748612eed632defb5978a536a12ecf6bee5746
MD5 1387427004563c8da3a0fa05a1c9a95e
BLAKE2b-256 ced7481ea4bdd4a2f6a9b9d79082892a11c6a9279b4424f1b61f1b0055bf63f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.2.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 308.8 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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 575c87b112f3f2273eb1a5550cf47eb435d85e8d72174f1ecdf05315c107b356
MD5 1969a80d3eb19e4f3ed144d8bfc2a5ae
BLAKE2b-256 338d36eb119af3290c98bdc7bb2186060b4855f6aba51624955545131a9e2083

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c8d18a705b5d5e2034a24d062143fb947f5d3b886be63735dd330a01120844be
MD5 f341a3c42552a0e24750e53262c72ffa
BLAKE2b-256 02b74a0300c68827e24ca1b3b9b231e02e736ce945d71e8c6bc15a86072f023b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.2.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 308.5 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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 acd4fa797005e0588e68faf1c5acad2487b8b059012cf483c2137b5cac0d659c
MD5 f0eb6df457b9abccec33291157e02935
BLAKE2b-256 2f80968244fb66aa10c1d8ccb002f6c91741d8510be9ac7d134ee6d11ec57c0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 71196feeafc5df15d97bc6ac1d04d29ca06baac56795e4cfe78eca122583e584
MD5 a9db6df1879796136e776e2436140224
BLAKE2b-256 21930b63745ee02aa6c5726adbde8578f7d2092ada1eda91ad12479e2901175c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zlgcan-0.2.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 309.4 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.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d2cad6b8c431a60b19e6043ae29530082bf10757db2353d86ecd9a42998fe6db
MD5 c86653c49ec93d4c308da4eb9370de2a
BLAKE2b-256 f6b485fee11a8c8089d84702b0f41422725810cbb1fae86ca9f9f6b6f9c5e738

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2cb77612bd86c92471a6e8792fbea2522f1aaf53bf0b34a1a5f000f44cc5fb41
MD5 cd5602f6103c8f904af93e664c458617
BLAKE2b-256 fa379ff17237c8abd8b7eb1febaebeecdead238f995472f1f8bbd8a72362d3dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zlgcan-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ef683cbefa6992be9ba578af4efbe36b96f5d1032cbb276ee548b6a08f3578fe
MD5 896af760383ad63fedbcaba28426b65c
BLAKE2b-256 1d9d6e87ac2a44dda7ac01cbccae671ebfbe67e1f2c5a7e657fc9d8827468ace

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