Skip to main content

aphyt

This is a library for communicating with Omron NX and NJ industrial PLC and motion controllers using Ethernet/IP.

Communicating with Omron Sysmac Controllers Using Ethernet/IP

This software implements the core functionality of reading and writing numeric, Boolean, string, structure and array variables to an Omron NX or NJ controller using symbolic names. The read_variable and write_variable methods allow the programmer to use Python based data types to write to variables, as well as properly format the data received when reading variables. The example code below demonstrates how to establish the explicit Ethernet/IP connection and then read and write variables to a test project in the NJ or NX controller.

Example Use

Installation

This package is on PyPI so the user can install using:

pip install aphyt

Getting Started

In order to connect to an Omron N-Series controller for data exchange using Ethernet/IP, the programmer should import omron from the aphyt module and instantiate an instance from the NSeries or NSeriesThreadDispatcher object using a context manager or by assignment. If the program supplies the host to the object, it is not necessary to explicitly connect to the IP address of the controller, and register a session. If the object is created without a host, the connection and session registration must be done explicitly.

import time
from aphyt import omron


if __name__ == '__main__':
    with omron.NSeries('192.168.250.9') as eip_conn:
        for i in range(10):
            print(eip_conn.read_variable('TestInt'))
            eip_conn.write_variable('TestInt', 24)
            print(eip_conn.read_variable('TestInt'))
            eip_conn.write_variable('TestInt', 7)
            time.sleep(.5)

Other Ethernet/IP Libraries

Omron EIP for NodeJS

For users that want to communicate with an Omron NX/NJ controller from NodeJS or NodeRed, omron-eip has implemented similar functionality to aphyt for use in those environments.

Python EIP for Rockwell Controllers

For Python users that need to communicate with Rockwell controllers, Pylogix is a fully featured communications driver. Rockwell and Omron diverge on many vendor specific Ethernet/IP implementation details, so this is a better project if that is your target controller

C EIP Library with Wrappers

libplctag is a library written in C with wrappers for many other languages including C++ and C#. They have implemented Omron specific functionality in addition to Rockwell. Since this library is written in C, it is very appropriate for applications where resource usage is limited.

Metadata

Release files for aphyt 0.1.30

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aphyt 0.1.30
File Size Uploaded
aphyt-0.1.30.tar.gz 46.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aphyt 0.1.30
File Interpreter ABI Platform
aphyt-0.1.30-py3-none-any.whl Python 3 none any Details

Total release size: 96.2 kB

Release files / aphyt-0.1.30.tar.gz

Download URL aphyt-0.1.30.tar.gz
Size 46.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4a293c20bc565a1e3b439b982cb9e34960f86a78d37801fc925e5a2a91bbdd5d
BLAKE2b-256 checksum
How to use checksums
d834973fd7a3d555df6d7a642d22a0b5b0ebb37264bfe1286df658f3e21536f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / aphyt-0.1.30-py3-none-any.whl

Download URL aphyt-0.1.30-py3-none-any.whl
Size 49.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a719af528d8297a03ee55878fe9af2c191f2dfa0383739ac1494134c2705e2b7
BLAKE2b-256 checksum
How to use checksums
e6334f5fbf79a2c1ecbcf47b2470e1c662bcd38f54d628d6e418b1dd342a70ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.30 This release

2 release files

0.1.29

2 release files

0.1.28

2 release files

0.1.27

2 release files

0.1.25

2 release files

0.1.24

2 release files

0.1.23

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page