Skip to content
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

Connection Issue When Processor Is Deep In Rack ex.. Slot16 #443

Open
oOICEMANOo opened this issue Dec 11, 2023 · 1 comment
Open

Connection Issue When Processor Is Deep In Rack ex.. Slot16 #443

oOICEMANOo opened this issue Dec 11, 2023 · 1 comment

Comments

@oOICEMANOo
Copy link

Having issues with setting the CIP path when the processor is at the end of the rack (slot 16 *not common I know..) setting the path 1,16 don't seem to work? any suggestions on how to format the CIP to work....

Capture2

Capture

@kyle-github
Copy link
Member

This is an interesting one. Slots up to 15 (0-15) are handled with a single byte in the constructed path byte string. A value of 16 and up (not sure to what actual value) indicates a port. So for instance, when bridging through a network module the leading byte before the IP address would be either 18 or 19 (decimal) indicating that the address is a port, and then the value above 16 is the actual port number. Port 2 (byte value 18) would be the first external Ethernet port on an ENBT for instance.

Hmm, I see that I am checking for out of bounds values...

/* was the numeric segment valid? */
if(val < 0 || val > 0x0F) {
    pdebug(DEBUG_WARN, "Numeric segment in path at position %d is out of bounds!", (int)(ssize_t)(*path_index));
    return PLCTAG_ERR_OUT_OF_BOUNDS;
}

That check may not be correct, but it will require some tricks to make sure that parsing the path string works correctly if that is not done.

I don't have a chassis with that many slots. Let me see what I can code up.

I am calling this a bug since real hardware apparently can have 17 slots!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants