fanuc-driver icon indicating copy to clipboard operation
fanuc-driver copied to clipboard

Share single CNC connection across multiple output types.

Open MRIIOT opened this issue 3 years ago • 6 comments

Allow output to SHDR and MQTT, for example, from a single CNC connection to avoid multiple Focas connections to CNC.

MRIIOT avatar Nov 02 '22 20:11 MRIIOT

@MRIIOT, am I right to assume that this issue is about using a single FOCAS connection to a machine for every type of data gathered from that machine?

I would be awesome and a huge performance gain if we currently use a connection per feature (or something along the lines).

tukusejssirs avatar Nov 02 '22 20:11 tukusejssirs

It is actually the other way around. We observed performance degradation when using multiple Focas connections. One to mqtt, one to Influx.

So the suggestion is to output to mqtt and Influx from a single Focas connection.

Even though the driver is async, I would imagine that the Focas connection blocks another somewhere. But this should be Wiresharked.

MRIIOT avatar Nov 02 '22 21:11 MRIIOT

@tukusejssirs, I don't think multiple connections to the same CNC will improve performance... From Focas docs:

Multi-thread Win32 supports multi-thread. Each function in this library can be called from the multiple threads at a time. The access to the single system resource, such as CNC/PMC's internal memory, at a time is exclusively controlled by this library.

MRIIOT avatar Nov 03 '22 12:11 MRIIOT

It is also worth noting that using Fast Ethernet instead of Embedded Ethernet improves performance.

MRIIOT avatar Jan 28 '23 01:01 MRIIOT

It is also worth noting that using Fast Ethernet instead of Embedded Ethernet improves performance.

Is that a config on the machine or something you need to implement in fanuc-driver. If the former, how can you configure the machine to use fast eth?

tukusejssirs avatar Jan 28 '23 06:01 tukusejssirs

It is a physically separate network interface on the machine (if available).

MRIIOT avatar Jan 28 '23 16:01 MRIIOT