Skip to main content

Panasonic PLC mewtocol lib via serial port

Project description

pypanasonic

Table of Contents

Install

This lib contains panasonic PLC use mewtocol via serial port.
pip install regex
pip install pypanasonic
pip install pyserial

Usage

Here is an example of using it.

import serial
from pypansonic import mewtocol

#Change port number fits your desired port, here is com3
ser = serial.Serial(port="COM3",
                    baudrate=9600,
                    bytesize=serial.EIGHTBITS,
                    parity=serial.PARITY_ODD,
                    stopbits=serial.STOPBITS_ONE,
                    xonxoff = True,
                    timeout=0.5)
if ser.is_open:
    print("\n"+ser.name)

    #Write the function here:
    write_len = ser.write(plcVer().encode('ascii'))
    write_len = ser.write(switchSingleOn('R0001'))

    while True:
        com_message=ser.readline()
        if com_message:
            print("Port Open sucesses, message received is: ")
            print(com_message.decode('ascii'))
    ser.close()
else:
    print("Fail of open ports")

License

MIT

pypanasonic is distributed under the terms of the MIT license.

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

pypanasonic-0.0.8.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

pypanasonic-0.0.8-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file pypanasonic-0.0.8.tar.gz.

File metadata

  • Download URL: pypanasonic-0.0.8.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for pypanasonic-0.0.8.tar.gz
Algorithm Hash digest
SHA256 12b5f536a983a4c2e6a58fde89248cb6583f0d5f47dbf81d8ba353dbff86cc00
MD5 f245ca592aa3b17f1029265f69a124c3
BLAKE2b-256 c8560b42c2fa33772b37727d331eecb5d8fcebd72cce0198812cdc871c176ebb

See more details on using hashes here.

File details

Details for the file pypanasonic-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: pypanasonic-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for pypanasonic-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 fffa7d9ae8c9df264ba4651de5fed4bf72ecc8141f3790a1ff8b3468b22411e6
MD5 815bf4f6f7cd398e5ba9a11daf911540
BLAKE2b-256 e86d37adab7dff0d87ca4cb00dfd0c5972ac82b27fd0bdd643cf9ba05605ff7c

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