How read from Micrologix using PCCC commands over serial? #106
Replies: 6 comments 2 replies
-
You can by using the SLCDriver. But, I consider the SLC driver legacy and only support it where I can. It's essentially the same as it was in the original pycomm library, but with minor changes to make the API similar to the LogixDriver. I don't have any docs for it right now, but the pycomm readme has some examples. I would like to support them more, but I don't have the hardware to test against. When I was at an integrator we only ever replaced SLCs and never used MLX, so all my testing was against a SLC. I'm no longer in controls, so access to hardware is the biggest issue preventing me from developing them more. If you run into issues though, feel free to make an issue and I can see if I can help out. My current position on supporting them is to make sure what was working keeps working, but if something needs fixing I have to rely on the community to test things for me. (Or, if someone has one I can test against I could do that too. Like though a VPN or internet accessible). Edit: Actually I found an 1100 on ebay for cheap, so I ordered it. Once I get it I will work to support the SLCDriver (or maybe rename it to MLXDriver?). A re-write of it is most likely coming, it's sort of a mess internally right now. |
Beta Was this translation helpful? Give feedback.
-
Thanks, I will give a try and let you know. Just curiosity, because the lib expect ip, but this Micrologix only has serial. It should work if we put a simple Ethernet/Serial adapter? (It is not Ethernet/IP)
If that works I will send to you picture and drawings.
Thanks
…Sent from my iPhone
On Feb 11, 2021, at 9:50 AM, ottowayi ***@***.***> wrote:
You can by using the SLCDriver. But, I consider the SLC driver legacy and only support it where I can. It's essentially the same as it was in the original pycomm library, but with minor changes to make the API similar to the LogixDriver. I don't have any docs for it right now, but the pycomm readme has some examples.
I would like to support them more, but I don't have the hardware to test against. When I was at an integrator we only ever replaced SLCs and never used MLX, so all my testing was against a SLC. I'm no longer in controls, so access to hardware is the biggest issue preventing me from developing them more.
If you run into issues though, feel free to make an issue and I can see if I can help out. My current position on supporting them is to make sure what was working keeps working, but if something needs fixing I have to rely on the community to test things for me. (Or, if someone has one I can test against I could do that too. Like though a VPN or internet accessible).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
Oh ok, thanks. I will keep checking. It is very hard find some lib just for serial, and the two I found doesn’t compile very well 🥵.
Thanks for your clarification
Reyan
…Sent from my iPhone
On Feb 11, 2021, at 3:22 PM, ottowayi ***@***.***> wrote:
Oh sorry I misread the 'over serial' part. No, this library doesn't support serial/DF1, it's Ethernet/IP only. But, it's possible that something like that could work. I have used DH+ to ethernet gateway successfully with it.
Alternatively, it may be possible to swap out some of the socket internals with serial stuff, but I think that would also then need to remove the EIP/CIP stuff. There may be DF1 libraries out there already that would cover this. If you want to make your own DF1 driver you're more than welcome to take any code from this library to do it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
Sorry bother you. I was checking code with the hope of adapt it to serial, but it is big challenge for me, I have to reinvent wheel. I was wondering if it is possible please if you could point me in the right direction what should I should change in general and what I can reuse. Other question is it possible for you help with it pls (It will be lot faster than myself), how much would you charge?
Thanks for any advise
Reyan
…Sent from my iPhone
On Feb 11, 2021, at 6:17 PM, Reyan Valdes ***@***.***> wrote:
Oh ok, thanks. I will keep checking. It is very hard find some lib just for serial, and the two I found doesn’t compile very well 🥵.
Thanks for your clarification
Reyan
Sent from my iPhone
>> On Feb 11, 2021, at 3:22 PM, ottowayi ***@***.***> wrote:
>>
>
> Oh sorry I misread the 'over serial' part. No, this library doesn't support serial/DF1, it's Ethernet/IP only. But, it's possible that something like that could work. I have used DH+ to ethernet gateway successfully with it.
>
> Alternatively, it may be possible to swap out some of the socket internals with serial stuff, but I think that would also then need to remove the EIP/CIP stuff. There may be DF1 libraries out there already that would cover this. If you want to make your own DF1 driver you're more than welcome to take any code from this library to do it.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
Ok, thank you so much. Any help with it, it is really appreciated.
Thanks 🙏
…Sent from my iPhone
On Feb 12, 2021, at 11:59 AM, ottowayi ***@***.***> wrote:
I haven't done anything over serial before, but I do have a CompactLogix with a serial port on it. I can't find my serial-usb adapter, but I ordered a new one. When I get it I will try and make a proof of concept or try and get an example working. I'm willing to help get something working for free, but I can't commit to it fully to it so charging for development is something I'm not willing do right now sorry.
If you want to try working on it before I can get to it:
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
Hi Ottowayi I am polling my hear here, after a very hard time, 10 hours working, I used df1 python (it is for python 2), grab the code and append different sys.path, I couldn't install it in python 3.6. I adapted it to serial, it was less complicated because the way it was structure, kind of more modular. Now it is not at all a completed work. In was able to read & parsing Integers, nothing else, and the structure is not nice as python comm3. I am wondering please if this preliminary works could help you take the serial part I developed (df1_serial_plc and df1_serial_client) and other parts can be reused, and join with your nice library in some way that uses the beautiful parsing you did, and can be part of Python Comm3 and shared for all community. Sorry, my python level is very basic. I believe one of the module can reuse beside the two I developed (df1_serial_plc, df1_serial_client), is the CRC16 in module crc16.py, that worked pretty good for the crc16. In the serial package is using it at the end applied to the data package only for non-repeated 0x10 0x10. Typically it is using crc16, although can use also bcc. I can implement bcc and send to you if you like. I think this preliminary work could make "easy" for you. I can test many times, no problem or collaborate with you in other ways. I think part of the configuration of serial should include the 'errorDetectionMode': CRC, BCC to be completed and add at the end the error detection mode.
Please could you help integrated this preliminary work with serial with your lib and create new SLCSerialDriver. Please feel free to modify or use as your convenience.
The code was adapted from df1 0.5 Python, author: Jerther
df1
|
|
|
| | |
|
|
|
| |
df1
A basic DF1 implementation in Python
|
|
|
Please let me know if I can help with something else.
Thank you so muchReyan On Friday, February 12, 2021, 11:59:51 AM EST, ottowayi <[email protected]> wrote:
I haven't done anything over serial before, but I do have a CompactLogix with a serial port on it. I can't find my serial-usb adapter, but I ordered a new one. When I get it I will try and make a proof of concept or try and get an example working. I'm willing to help get something working for free, but I can't commit to it fully to it so charging for development is something I'm not willing do right now sorry.
If you want to try working on it before I can get to it:
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
Please is it possible to read tags from Micrologix using PCCC commands over serial, maybe using some Ethernet/Serial converter or has to be EtherNet/IP adapter? Thanks
Beta Was this translation helpful? Give feedback.
All reactions