dmroeder / pylogix

Read/Write data from Allen Bradley Compact/Control Logix PLC's
Apache License 2.0
599 stars 182 forks source link

Using this library with Omron PLC #20

Closed Dhiaaeddinanabtawi closed 6 years ago

Dhiaaeddinanabtawi commented 6 years ago

Hi,

I am trying to use this library with an Omron PLC. I want to get the PLC time just to make sure the communication works. I am getting the following error: File "C:\Python26\pylogix-master\plcread.py", line 5, in <module> comm.GetPLCTime() File "C:\Python26\pylogix-master\eip.py", line 115, in GetPLCTime return _getPLCTime(self) File "C:\Python26\pylogix-master\eip.py", line 336, in _getPLCTime raise Exception('Failed to get PLC time, ' + err) Exception: Failed to get PLC time, Path destination unknown It seems like the PLC gets the request and replies, but it is not sending back any values. My thinking goes to the initial parameters in init function. I changed VendorID to match Omrons ID and I changed SerialNumber to Omron's serial number. What else I have to change to make the PLC give me back its time? Maybe I am mistaken and it is completely something else that causes the problem?

Thanks in advance Dhiaa Eddin Anabtawi

dmroeder commented 6 years ago

First of all, this library only works with Rockwell Automation PLC's, specifically CompactLogix, ControlLogix and Micro820/850 PLC's. It will not work with Omron.

Second, the VendorID is not really relevant this type of connection.

Third, the serial number is a randomly generated value used to identify the connection, it is not the serial number of a device.

Last, while Omron may make Ethernet I/P adapters/scanners, they are most likely intended for an I/O type connection, which this library does not do.

Dhiaaeddinanabtawi commented 6 years ago

Is there any way to make it work with Omron PLC's as well?

dmroeder commented 6 years ago

Not by me unfortunately. I have no experience with Omron and I don't have access to any of their hardware. I recommend you check out AdvancedHMI, it has a native communication drivers for Omron.

Dhiaaeddinanabtawi commented 6 years ago

Ok, Thank you for your answer and help. Have a nice day!

dmroeder commented 6 years ago

You do the same! Hopefully you'll find AdvancedHMI useful. They have a good forum too if you need pointers. I post over there occasionally.