Skip to content

Commit

Permalink
Documentation Update
Browse files Browse the repository at this point in the history
  • Loading branch information
srossmann authored and srossmann committed Jan 26, 2021
1 parent e65e6a8 commit 805a190
Showing 1 changed file with 72 additions and 4 deletions.
76 changes: 72 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ Visit www.eeip-library.de for more informations and Codesamples

### Table of Contents
1. [Installation](#installation)
3. [Library Documentation](#librarydocumentation)
3.1. [Methods](#methods)
2. [Explicit Messaging](#explicitmessaging)
2.1. [Supported Common Services](#supportedcommonservices)
3. [Examples](#examples)
3.1. [Usage of Implicit Messaging to Read and Write data to Rockwell Point I/O](#example1)
4. [Library Documentation](#librarydocumentation)
4.1. [Methods](#methods)

<div id="installation"/>

Expand Down Expand Up @@ -47,13 +51,77 @@ The following services are supported by the library:
- Set\_Attribute\_Single - Service Code: 0x10
- No Operation (NOP) - Service Code: 0x17

<div id="examples"/>

### 3. Examples

All examples are available in the folder "examples" in the Git-Repository

<div id="example1"/>

#### 3.1 Usage of Implicit Messaging to Read and Write data to Rockwell Point I/O

The Following Hardware Configuration is used in this example

Allen-Bradley 1734-AENT Ethernet/IP Coupler
Allen-Bradley 1734-IB4 4-Channel Digital Input Module
Allen-Bradley 1734-IB4 4-Channel Digital Input Module
Allen-Bradley 1734-IB4 4-Channel Digital Input Module
Allen-Bradley 1734-IB4 4-Channel Digital Input Module
Allen-Bradley 1734-OB4E 4-Channel Digital Output Module
Allen-Bradley 1734-OB4E 4-Channel Digital Output Module
Allen-Bradley 1734-OB4E 4-Channel Digital Output Module
Allen-Bradley 1734-OB4E 4-Channel Digital Output Module
IP-Address: 192.168.178.107 (By DHCP-Server)
This example also handles a reconnection procedure if the Impicit Messaging has Timed out
(If the Property "LastReceivedImplicitMessage" is more than one second ago)

```python
from eeip import *
import time

eeipclient = EEIPClient()
#Ip-Address of the Ethernet-IP Device (In this case Allen-Bradley 1734-AENT Point I/O)
#A Session has to be registered before any communication can be established
eeipclient.register_session('192.168.178.107')

#Parameters from Originator -> Target
eeipclient.o_t_instance_id = 0x64
eeipclient.o_t_length = 4
eeipclient.o_t_requested_packet_rate = 100000 #Packet rate 100ms (default 500ms)
eeipclient.o_t_realtime_format = RealTimeFormat.HEADER32BIT
eeipclient.o_t_owner_redundant = False
eeipclient.o_t_variable_length = False
eeipclient.o_t_connection_type = ConnectionType.POINT_TO_POINT

#Parameters from Target -> Originator
eeipclient.t_o_instance_id = 0x65
eeipclient.t_o_length = 16
eeipclient.t_o_requested_packet_rate = 100000 #Packet rate 100ms (default 500ms)
eeipclient.t_o_realtime_format = RealTimeFormat.MODELESS
eeipclient.t_o_owner_redundant = False
eeipclient.t_o_variable_length = False
eeipclient.t_o_connection_type = ConnectionType.MULTICAST

#Forward open initiates the Implicit Messaging
eeipclient.forward_open()
while 1:
print('State of the first Input byte: {0}'.format(eeipclient.t_o_iodata[8]))
print('State of the second Input byte: {0}'.format(eeipclient.t_o_iodata[9]))
time.sleep(0.1)

#Close the Session (First stop implicit Messaging then unregister the session)
eeipclient.forward_close()
eeipclient.unregister_session()
```

<div id="librarydocumentation"/>

### 3. Library Documentation
### 4. Library Documentation

<div id="methods"/>

#### 3.1 Methods
#### 4.1 Methods

**Constructor def \_\_init__(self)**

Expand Down

0 comments on commit 805a190

Please sign in to comment.