forked from dmroeder/pylogix
-
Notifications
You must be signed in to change notification settings - Fork 0
Read/Write data from Allen Bradley Compact/Control Logix PLC's
License
garrosh/pylogix
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
**************************************** USAGE **************************************** 1) from eip import PLC 2) test = PLC() 3) Set the IP Address: test.IPAddress = "192.168.1.0" 4) If your processor is in a slot other than 0, set that: test.ProcessorSlot = 1 5) Do one of the following: Read a value: value = test.Read("tagname") ex: value = test.Read("MyTimer.ACC") print value Read an array: value = test.Read("tagname", length) ex: value = test.Read("MyDINT", 10) print value(3) Read multiple tags at once: test.MultiRead("tag1", "tag2", "tag3") ex: values = test.MultiRead("MyDINT", "MyTimer.ACC", "AnotherDINT") print values Write a value: test.Write("tagname", value) ex: test.Write("MyDINT", 1337) Get all Ethernet I/P devices on the network test.Discover() ex: stuff = test.Discover() print stuff(1).Address # prints the first devices IP Address So a complete script to read a tag would look like this: from eip import PLC test = PLC() test.IPAddress = "192.168.1.64" value = test.Read("MyTimer.ACC") print value
About
Read/Write data from Allen Bradley Compact/Control Logix PLC's
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Python 100.0%