Skip to main content

MC Protocol(MELSEC Communication Protocol) implementation by Python

Project description

pymcprotocol

MC Protocol(MELSEC Communication Protocol) implementation by Python

installation

pip install pymcprotocol

Protocol type

Now, pymcprotocol supports mc only mcprotocol 3E binary type.
In the future, I`m going to support 4E type. (And if possible, 1C~4C type also.)]

How to use mc protocol

1. Set up PLC

First, you need to set upopen your PLC port to communicate by mcprotocol in Gxworks2 or Gxworks3.

  • Open port you want to communicate.
  • Select communication Data Code Binary Code
  • If you would like to write in to PLC, you also have to check Enable online change

2. Connect by Python

from pymcprotocol import Type3E

pyplc = Type3E(ip="192.168.1.2", port=1025)

3. Communicate



          

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

pymcprotocol-0.1.0.tar.gz (1.6 kB view hashes)

Uploaded Source

Built Distribution

pymcprotocol-0.1.0-py3-none-any.whl (1.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page