Skip to main content

A pkg to operate mitsubishi PLC by MCProtocol.

Project description

诚信昌FMS项目三菱PLC通信工具

支持三菱Q系列和Fx系列,采用MC协议

示例:

from CXCFmsMC import CXCFmsMC

mc = CXCFmsMC.CXCFmsMC('10.0.1.236')

print(mc.readBitFromPLC(0, 'M', 16))
print(mc.readWordFromPLC(0, 'D', 6))
print(mc.writeBiToPLC(210, 'M', 8, '00000000'))
print(mc.writeWordToPLC(200, 'D', 3, [0, 0, 0]))

方法解析

  1. readBitFromPLC(self, startAddr, varType, length)
    从PLC中批量读取位数据,目前只支持M线圈的读取。
    参数:
    startAddr(起始地址,类型:int)
    varType(线圈类型,类型:str)
    length(传输数据位数,类型:int)
    返回值: dict
  2. readWordFromPLC(self, startAddr, varType, length)
    从PLC中批量读取字数据,目前只支持D寄存器的读取。
    参数:
    startAddr(起始地址,类型:int)
    varType(线圈类型,类型:str)
    length(传输数据位数,类型:int)
    返回值: dict
  3. writeBiToPLC(self, startAddr, varType, length, data)
    向PLC中批量写入位数据,目前只支持M线圈的写入。
    参数:
    startAddr(起始地址,类型:int)
    varType(线圈类型,类型:str)
    length(传输数据位数,类型:int)
    data(写入的数据,类型:str)
    返回值: str
  4. writeWordToPLC(self, startAddr, varType, length, data)
    向PLC中批量写入字数据,目前只支持D寄存器的单字(16 Bit)写入。
    参数:
    startAddr(起始地址,类型:int)
    varType(线圈类型,类型:str)
    length(传输数据位数,类型:int)
    data(写入的数据,类型:list)
    返回值: str

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

CXCFmsMC-binbin6106-1.0.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

CXCFmsMC_binbin6106-1.0.3-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file CXCFmsMC-binbin6106-1.0.3.tar.gz.

File metadata

  • Download URL: CXCFmsMC-binbin6106-1.0.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.2

File hashes

Hashes for CXCFmsMC-binbin6106-1.0.3.tar.gz
Algorithm Hash digest
SHA256 2331bd7509b2fe782ba4cb56eaacd50f027a255ce4e79aefacffd59903bf7b2c
MD5 fcfcde5725098998e3ca759e1e85a6ee
BLAKE2b-256 e55cebc06bd5d045bfe6ea92b39fc2f181056632ee6eb8c332d73131cc0cd306

See more details on using hashes here.

File details

Details for the file CXCFmsMC_binbin6106-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: CXCFmsMC_binbin6106-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.2

File hashes

Hashes for CXCFmsMC_binbin6106-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 01b3f664d41192da133a1e3b07f48c6a8c4339e912fbab459a2bc129dff6469c
MD5 9fd6564b5ca67344832a6c8ccd0387e8
BLAKE2b-256 f67ff23229d760ad0ec78c0ca494c4c100044f9564c7982e7b1fe125d4fd9770

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