GithubHelp home page GithubHelp logo

dhunt84971 / pylogix_cli Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 64 KB

Command line application for executing pylogix commands.

License: Apache License 2.0

Python 100.00%
compactlogix ethernetip rockwell rslogix

pylogix_cli's Introduction

pylogix_cli

The pylogix_cli application is intended to encapsulate all of the pylogix commands into a single directly executable program. Using pyinstaller, pylogix_cli can be packaged into an .exe file that can be run on any Windows computer without the need for installing Python. This can be particularly handy for systems where an end-user does not have the Rockwell software, but needs to update a value, set the time on the controller or read or write settings from or to the target PLC.

Warning! PLCs control industrial equipment and writing values to a PLC that is actively operating equipment should be done with great care and is at your own risk.

Click below to download the current standalone executable for Windows 7/10:
https://github.com/dhunt84971/pylogix_cli/releases/download/v0.1.4/pylogix_cli.exe

Execution of the application will take the form of a single command or a shell console application allowing multiple commands to be executed.

Examples of Usage

Single command syntax example:

pylogix_cli 192.168.1.10 Read CurrentScreen
None 12 Success

Peek 2022-04-18 15-17

Console app example:

pylogix_cli 192.168.1.10
pylogix_cli> Read CurrentScreen
None 12 Success
pylogix_cli> quit

OR

pylogix_cli
pylogix_cli> Read CurrentScreen
ERROR - No IPAddress specified.  Use IPAddress command.
pylogix_cli> IPAddress 192.168.1.10
pylogix_cli> Read CurrentScreen
None 12 Success
pylogix_cli> quit

Peek 2022-04-18 15-13

The pylogix Project

This application is a command line wrapper to ease the use of the many functions of the pylogix library. The pyinstaller program is used to create an executable package on Windows that does not require the installation of Python.

For more information and documentation: https://github.com/dmroeder/pylogix

Special thanks to dmroeder and all the contributors that make pylogix possible.

Currently Implemented Functions

        Help                        - Displays this list of commands.
        IPAddress <ip address>      - Sets the IP address for the target PLC.
        Quit                        - Leave console application.
        GetPLCTime                  - Returns the PLC time.
        SetPLCTime                  - Sets the PLC time to the current time.
        GetModuleProperties <slot>  - Gets the properties of the module in the specified slot.
        GetDeviceProperties         - Gets the properties of the connected device.
        * GetFaultCodes             - Gets the Type and Code of the current controller fault.
        * GetFaultInfo              - Gets the Module slot for an IO fault or location for a logic fault.
        Read <tag>                  - Returns the specified tag's value from the target PLC.
        Write <tag> <value>         - Sets the specified tag's value in the target PLC.
        Version                     - Returns the version of pylogix_cli and pylogix.
        GetTagList                  - Returns the list of tags in the target PLC.
        Output (Raw | Readable)     - Sets the output format.  Raw is the default.     

* - Is not a standard pylogix command.

(Commands are not case sensitive.)

Development Environment

In order to build the executable using pyinstaller, first clone this repository and then install both pylogix and pyinstaller using pip.

git clone https://github.com/dhunt84971/pylogix_cli.git
cd pylogix_cli
pip install pylogix
pip install pyinstaller

Building the Executable

In order to build the executable for the Windows platform it is necessary to run pyinstaller on a Windows computer. Keep in mind that Python 3.9+ cannot run on Windows 7. For this reason it is recommended that a Windows 7 system with Python installed be used to create the executable in order to ensure compatability with Windows 7 and newer versions of Windows.

pyinstaller -F pylogix_cli.py

License

This project is licensed under Apache 2.0 License - see the LICENSE file for details.

pylogix_cli's People

Contributors

dhunt84971 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.