node-ethernet-ip icon indicating copy to clipboard operation
node-ethernet-ip copied to clipboard

Add an option to configure the timeout of "Unconnected Send" messages

Open gfcittolin opened this issue 4 years ago • 1 comments

When building an "Unconnected Send" message, there's no way of controlling the value of the timeout parameter. The function defaults to 2000ms, but the call doesn't allow us to customize it

Current Behavior

Currently, all connected messages are send with the fixed timeout of 2000 ms

Expected Behavior

The library user should be able to set other values to it

Possible Solution (Optional)

We could add a new constructor option that would control the timeout value, and defaulting it to the current 2000ms value

Context

We'd like to make node-red-contrib-cip-ethernet-ip (and therefore this library too) compatible with Omron controllers. There's even an issue there about it.

Last week, a very nice guy at Omron have done some tests and have identified that Omron controllers need this value to be at least 5024ms. So, if we can make this value configurable, we could add support to Omron controllers as well.

gfcittolin avatar Mar 26 '20 13:03 gfcittolin

I'm preparing a simple PR adding this support for this with the above proposed solution, but we can still further discuss it if needed

gfcittolin avatar Mar 26 '20 13:03 gfcittolin