-
Notifications
You must be signed in to change notification settings - Fork 131
Connect two FEN20s at the same time #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
same issue here when trying to connect two TS-SH controllers, is there any idea to solve? |
I am having a similar issue as well. I need to connect to multiple devices and send/receive implicit messages. If I change OriginatorUDPPort to anything other than 2222, T_O_IOData is all zeroes. Is there an example showing how to manage multiple device connections? |
Some additional info: |
Originally posted by @ralftar in #16 (comment):
I have a feeling that this repository is stalled..? Being MIT licensed, some one can of course create a fork, and continue the work. But it requires long time commitment and resources. Also, I think it would be best if @rossmann-engineering, the original author, is still connected to the maintenance in some form. |
Did any solution to this ever come to light or is the issue still present? I am having the same problem with two AZ-KEP drives |
I am having the same problem with two Keyence Camra IV2 and CVX. They are able to communicate simultaneously in explicit mode. But, not in Implicit mode. When I change any .OriginatorUDPPort property from 2222 default, communication stops. |
Based on the source code, I suspect the target is not aware that it needs to communicate to a port other than the default. |
bool O_T_OwnerRedundant Only for Implicit Messaging True if Multiple Implicit connections are allowed (Standard: TRUE) Both properties are True but do not work ... |
I had the same issue and it looks like the answer is here: https://github.com/campbell-git/EEIP.NET/tree/testing Since UDP only allows one port per connection, the above repository is a fork from the original, but has an I managed to talk to 3 VFDs using Ethernet/IP using that library. |
Well, I used @campbell-git's fork too for communication with several EtherNet/IP devices and it works. But I must notice the following. As I mainly work in LabVIEW, parallel branches (threads) of code are common thing there. So first I tried to run all the communication sessions simultaneously and got odd behaviour. In short, ForwardOpen call was returning the same connectionID_T_O for all the devices and I was getting mixed packets for the first device and no packets at all for the second and third device. I worked around it by setting a clear order of execution of the threads in the initialization and inserting a small delay when moving from one code section to another one (1 second was enough for me). In such a way it all works good. I don't know the reason behind that bug though. Just out of curiosity I tried to apply the commit for concurrent read/write of T_O_IOData/O_T_IOData, but seems like it didn't do any good or I did something wrong. Would be nice, if @campbell-git could take a look, if possible. |
I asked Gemini. It turned out that he also did not have access to the ODVA Ethernet/IP standard documentation. I instructed him to start a research, to determine whether the Ethernet/IP objects offer a standard setting to change the UDP port 2222. The result of the research: |
I don't know if we can completely trust AI in this matter, but here Marc Bommert writes:
No idea, what that "CPF Socket address item" means. So now we have only Ryan Campbell's solution, which looks more of a workaround (it's a message router, operating on a connection ID's list), but it's smart enough to work normally (except for initialization, maybe). Of course, if you have many free NIC's around, you could assign them individual IP's and use the original library, if this is acceptable for your project. upd. I think, this is what was meant. /* Translate function to Common packet format values */
static const value_string cpf_type_vals[] = {
{ CPF_ITEM_NULL, "Null Address Item" },
{ CPF_ITEM_CIP_IDENTITY, "CIP Identity" },
{ CPF_ITEM_CIP_SECURITY, "CIP Security Information" },
{ CPF_ITEM_ENIP_CAPABILITY, "EtherNet/IP Capability" },
{ CPF_ITEM_ENIP_USAGE, "EtherNet/IP Usage" },
{ CPF_ITEM_CONNECTED_ADDRESS, "Connected Address Item" },
{ CPF_ITEM_CONNECTED_DATA, "Connected Data Item" },
{ CPF_ITEM_UNCONNECTED_DATA, "Unconnected Data Item" },
{ CPF_ITEM_LIST_SERVICES_RESP, "List Services Response" },
{ CPF_ITEM_SOCK_ADR_INFO_OT, "Socket Address Info O->T" }, // <--
{ CPF_ITEM_SOCK_ADR_INFO_TO, "Socket Address Info T->O" }, // <--
{ CPF_ITEM_SEQUENCED_ADDRESS, "Sequenced Address Item" },
{ CPF_ITEM_UNCONNECTED_MSG_DTLS, "Unconnected Message over UDP" },
{ 0, NULL }
}; Looking at the sources of EEIP.NET I see that commonPacketFormat.DataItem = 0xB2; No marks of using any other Data Items in the code. So the task is to make a proper packet with
|
First of all, congratulations on this library, it is very good!
The thing is, I can't connect to two devices
FEN20s at the same time from a PC.
Error:
Only one usage of each socket address (protocol / network address / port) is normally permitted.
Is there any solution for this?
Regards!
The text was updated successfully, but these errors were encountered: