Skip to content

Commit

Permalink
Rewrote all methods to return the Result class, which returns tag_nam…
Browse files Browse the repository at this point in the history
…e, value and status
  • Loading branch information
dmroeder committed Sep 18, 2019
1 parent 1d78894 commit 5126281
Show file tree
Hide file tree
Showing 27 changed files with 207 additions and 241 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ pylogix.__version__

### Your First Script:

The cloned repository will come with many examples, I'll give one here. We'll read one simple tag and print out the value.
The cloned repository will come with many examples, I'll give one here. We'll read one simple tag and print out the value. All methods will return the Response class, which contains tag_name, value and status.

```
from pylogix import PLC
with comm as PLC()
comm.IPAddress = '192.168.1.9'
value = comm.Read('MyTagName')
print(value)
ret = comm.Read('MyTagName')
print(ret.tag_name, ret.value, ret.status)
```

NOTE: If your PLC is in a slot other than zero (like can be done with ControLogix), then you can specify the slot with the following:
Expand Down
3 changes: 3 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
09/17/19
-Rewrote all methods to return Response class, which includes tag_name, value and status

08/26/19
-Updated gitignore
-Lowered default connection size to support older hardware/firmware by default
Expand Down
2 changes: 1 addition & 1 deletion pylogix/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .lgxDevice import LGXDevice
from .eip import PLC
__version_info__ = (0, 3, 7)
__version_info__ = (0, 4, 0)
__version__ = '.'.join(str(x) for x in __version_info__)
Loading

0 comments on commit 5126281

Please sign in to comment.