You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old November 17th, 2020, 11:51 AM   #46
theColonel26
Lifetime Supporting Member
United States

theColonel26 is offline
 
theColonel26's Avatar
 
Join Date: Feb 2014
Location: West Michigan
Posts: 501
I found a codesys Library Specifically do to this.


https://github.com/NothinRandom/CoDeSys_EIP


I haven't tried it yet.

the author says that he handles the EIP stack himself and uses Codesys TCP FBs for send and receive data.
__________________
SkyCad is by far the Best ECAD Schematic Software I have used.


Fact my "Fun Facts" are never fun
  Reply With Quote
Old November 17th, 2020, 07:43 PM   #47
AlfredoQuintero
Lifetime Supporting Member
Japan

AlfredoQuintero is offline
 
Join Date: Feb 2015
Location: Yokohama
Posts: 364
Quote:
Originally Posted by theColonel26 View Post
I found a codesys Library Specifically do to this.

https://github.com/NothinRandom/CoDeSys_EIP

I haven't tried it yet.

the author says that he handles the EIP stack himself and uses Codesys TCP FBs for send and receive data.
You have got me bitten by the bug of curiosity. I do want to give this library a try, but will do so in the weekend. I have tried unsuccessfully using the implicit messaging function and today will give it my last try. This library you have shown me looks promising. Hope to get back to you later this week.
  Reply With Quote
Old November 17th, 2020, 10:17 PM   #48
chelton
Member
Australia

chelton is offline
 
Join Date: Jan 2012
Location: melbourne
Posts: 157
Hi Alfredo,
In omron when you do a 4c command the request path length in words is the first byte of the request path. This is for CIP explicit message and so the request path from 0x91 needs to be an even number of bytes, or get padded with 00.
If you are using the generic_service function block with service code 16#4c this maybe needed.
Image attached.
1.png
  Reply With Quote
Old November 18th, 2020, 01:45 AM   #49
AlfredoQuintero
Lifetime Supporting Member
Japan

AlfredoQuintero is offline
 
Join Date: Feb 2015
Location: Yokohama
Posts: 364
Quote:
Originally Posted by chelton View Post
Hi Alfredo,
In omron when you do a 4c command the request path length in words is the first byte of the request path. This is for CIP explicit message and so the request path from 0x91 needs to be an even number of bytes, or get padded with 00.
If you are using the generic_service function block with service code 16#4c this maybe needed.
Attachment 56270
chelton: Thanks very much for your comments. I think you are right with regards to the syntax of service 4C. But, the Codesys standard library for explicit message only supports logic segments (Class,Instance Attribute) as Ken Roach explains in posts #2 and #7. So with the standard library it is not possible to implement this. However, the library mentioned by theColonel26 in post #46 seems to offer the flexibility to use symbolic segments, and I intend to give it a try in a few days.

By the way, I used the ODVA Molex tool and confirmed exactly what you explain. Please see screenshot below:
Attached Images
File Type: png 20201118_Logix_ODVATools.png (114.3 KB, 66 views)
  Reply With Quote
Old November 18th, 2020, 02:02 AM   #50
AlfredoQuintero
Lifetime Supporting Member
Japan

AlfredoQuintero is offline
 
Join Date: Feb 2015
Location: Yokohama
Posts: 364
Quote:
Originally Posted by AustralIan View Post
Alfredo, Produced Tags are, as the CODESYS scanner would see it, Target -> Scanner. In your screenshot you have 0 bytes in there and 40 in Scanner to Target.
AustralIan: Thanks so much for your follow-up and advice. Tried what you say but Logix is unhappy about the connection size, as you can see in screenshot below. By the way, if only "produced" tags can be used with connected, even if we get this working Codesys can get data from Logix, but could not send data to Logix. Is that your understanding too?
Attached Images
File Type: png 20201118Codesys_Logix_.png (318.4 KB, 56 views)

Last edited by AlfredoQuintero; November 18th, 2020 at 02:05 AM. Reason: Minor typo
  Reply With Quote
Old November 18th, 2020, 02:15 AM   #51
AustralIan
Member
Germany

AustralIan is offline
 
Join Date: Jan 2013
Location: Germany
Posts: 1,184
Quote:
Originally Posted by AlfredoQuintero View Post
AustralIan: Thanks so much for your follow-up and advice. Tried what you say but Logix is unhappy about the connection size, as you can see in screenshot below. By the way, if only "produced" tags can be used with connected, even if we get this working Codesys can get data from Logix, but could not send data to Logix. Is that your understanding too?
Really just using a dummy variable for the produce tag. The idea is this establishes a class1 connection which pushes the state machine from "connecting" to "running". Once running, the generic_service can work as my previous code example.

You could guess connection sizes, or wireshark a Rockwell to Rockwell produce consume connection.
  Reply With Quote
Old November 18th, 2020, 02:33 AM   #52
AlfredoQuintero
Lifetime Supporting Member
Japan

AlfredoQuintero is offline
 
Join Date: Feb 2015
Location: Yokohama
Posts: 364
Quote:
Originally Posted by AustralIan View Post
Really just using a dummy variable for the produce tag. The idea is this establishes a class1 connection which pushes the state machine from "connecting" to "running". Once running, the generic_service can work as my previous code example.

You could guess connection sizes, or wireshark a Rockwell to Rockwell produce consume connection.
OK, I see your point, thanks. Will try different sizes and/or parameters to see if I get the the state machine to "running". But the problem is, as I commented chelton, it is not possible to use the service 4C with the standard Codesys library. I am thinking about using the library that theColonel26 mentions, but before that I was wondering if I could used tags mapped to PCCC tags. But first things first. Will keep trying and will post if I succeed getting the state machine to "running"

Last edited by AlfredoQuintero; November 18th, 2020 at 02:33 AM. Reason: Minor typo
  Reply With Quote
Old November 18th, 2020, 02:54 AM   #53
AustralIan
Member
Germany

AustralIan is offline
 
Join Date: Jan 2013
Location: Germany
Posts: 1,184
See this post for getting around it with the message router.
http://www.plctalk.net/qanda/showpos...3&postcount=10

Yeah, that library looks like it will do it for you. Let us know if anyone gets a result
  Reply With Quote
Old November 18th, 2020, 03:38 AM   #54
AlfredoQuintero
Lifetime Supporting Member
Japan

AlfredoQuintero is offline
 
Join Date: Feb 2015
Location: Yokohama
Posts: 364
Lightbulb I cracked it!

Guys, I cracked it!!!!
I worked out communication parameters that allow the class 1 connection to go into "running". I am exhausted. I need a beer.
Attached Images
File Type: jpg 2020-11-18_Logix&Codesys.jpg (262.6 KB, 53 views)
  Reply With Quote
Old November 18th, 2020, 12:20 PM   #55
AustralIan
Member
Germany

AustralIan is offline
 
Join Date: Jan 2013
Location: Germany
Posts: 1,184
Alfredo, that's fantastic news! Those green arrows are always a treat.
I am curious to know what datatype dummy is in the Logix Processor.
  Reply With Quote
Old November 18th, 2020, 06:18 PM   #56
chelton
Member
Australia

chelton is offline
 
Join Date: Jan 2012
Location: melbourne
Posts: 157
Quote:
Originally Posted by AlfredoQuintero View Post
....

By the way, I used the ODVA Molex tool and confirmed exactly what you explain. Please see screenshot below:
Alfredo, I had not seen the Molex tool before, What a valuable tool to have in my box of tricks. Thankyou
  Reply With Quote
Old November 18th, 2020, 07:03 PM   #57
AlfredoQuintero
Lifetime Supporting Member
Japan

AlfredoQuintero is offline
 
Join Date: Feb 2015
Location: Yokohama
Posts: 364
Quote:
Originally Posted by chelton View Post
Alfredo, I had not seen the Molex tool before, What a valuable tool to have in my box of tricks. Thankyou
I am for-life indebted to the developer who wrote this program and to the manager who decided to donate it to the ODVA. I have used many, many times. And it is free of charge.
  Reply With Quote
Old November 18th, 2020, 07:06 PM   #58
AlfredoQuintero
Lifetime Supporting Member
Japan

AlfredoQuintero is offline
 
Join Date: Feb 2015
Location: Yokohama
Posts: 364
Quote:
Originally Posted by AustralIan View Post
Alfredo, that's fantastic news! Those green arrows are always a treat.
I am curious to know what datatype dummy is in the Logix Processor.
Fantastic indeed.

Sorry about that. I should have added this crucial info. Please see below. Next I want to try PCCC messaging, now that I have the adapter running. If I succeed I will post both the Logix and the Codesys program.
Attached Images
File Type: png 20201119_LogixProgram_tag.png (75.4 KB, 50 views)
  Reply With Quote
Old November 19th, 2020, 10:23 AM   #59
einnh
Lifetime Supporting Member
United States

einnh is offline
 
einnh's Avatar
 
Join Date: Mar 2014
Location: New England
Posts: 263
Passing the data through an OPC-UA server might be a good option depending on your needs. What is the application?
  Reply With Quote
Old November 19th, 2020, 07:19 PM   #60
AlfredoQuintero
Lifetime Supporting Member
Japan

AlfredoQuintero is offline
 
Join Date: Feb 2015
Location: Yokohama
Posts: 364
Hello einnh:
This thread was initiated by theColonel26 and as per the post's title the requirement is Read Tag from Rockwell PLC from Codesys? I have interest in Codesys, Logix and EtherNet/IP so I got involved to try to help and I even suggested what you mention in your post above, which woull require an eternal device which can exchange data from the Codesys OPCUA server and the Logix tags. I do not even know whether theColonel26 is following the thread, so I do not know if he has succeeded by means of other venues. But I am curious and did manage to establish a connection between Codesys and Logix. I am doing this in my spare time. Now that we figured out how to establish a connection, the next step is how to access the tags in Logix from Codesys. The explicit message function in Codesys only support logic segments so it is not possible to use symbolic path with the 3S libraries. It seems there is an open source library that allows this mentioned in an earlier post of this thread. I want to try to use PCCC, which is represented as a CIP class, so it should possible to use the 3S libraries. If I succeed I will post my programs and an explanation.

But for the record, by far the easiest way to connect Logix and Codesys is by means of the Codesys ErtherNet/IP adapter library which requires a license in addition to the soft PLC license and which does not work in evaluation mode. I bought one license and got this working very easily.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Cheap PLC that can read Data from its SD card or USB Flash Drive? theColonel26 LIVE PLC Questions And Answers 10 May 25th, 2019 11:38 AM
FactoryTalk 8.0: how to display choosen tag value from PLC Suseh LIVE PLC Questions And Answers 4 June 18th, 2015 02:59 PM
Any idea how to access the Omron simulator? strantor LIVE PLC Questions And Answers 9 March 13th, 2015 07:01 PM
RSLogix 5000 Multiple Aliases to Same Tag davidc100 LIVE PLC Questions And Answers 10 May 27th, 2014 09:04 PM
Read and write data from pc to plc via rs232 cable MANISH VORA LIVE PLC Questions And Answers 4 August 23rd, 2011 02:47 PM


All times are GMT -5. The time now is 08:09 AM.


.