GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

CNC data integration

How to collect Fanako CNC data from industrial intelligent gateways

This is a wiring-and-configuration walkthrough for controls engineers who need machine data in an MES or historian, not a brochure. It covers what Fanako controls actually expose, which gateway features matter, and how to map tags without stopping production. After reading, you should be able to size a gateway, pick a protocol, and run a pilot on one machine.

FOCAS / OPC UAEthernet + RS-232Edge bufferingTag mapping
5-axis CNC machining of engine parts, the machines whose data you collect through industrial intelligent gateways
Quick answer

Key takeaways

Start at the control, not the cloudFanako-class controls expose data through FOCAS over Ethernet or through an OPC UA server option. Confirm which one your machine actually has before buying hardware.
One gateway per 8-15 machinesPolling interval and tag count decide this, not the port count on the datasheet.
Buffer locally, forward laterA gateway that drops data during a network outage will ruin your OEE numbers for weeks.
Sample status at 1 s, counters at 60 sCycle counters change slowly. Polling them fast wastes bandwidth and loads the control.
Never poll during a tool changeReads that collide with high-priority control tasks can trip a communication alarm.
What you are dealing with

What data a Fanako control actually gives you

Fanako-class CNC controls do not hand out one tidy data stream. They expose a set of registers, and what you read depends on which ones the machine builder enabled. On a typical machining center you can get spindle speed and load, axis positions, feedrate override, program number, active tool number, run status, alarm codes, and part counters. Some builders also publish servo temperature and lubrication pressure.

The practical limit is the communication option. Older machines ship with RS-232 or a 10/100 Ethernet port and a FOCAS library. Newer ones may have an OPC UA server as a paid option. If your machine has neither, you are looking at a hardware signal tap on the I/O board, which is a different project with a different budget.

Before you write any code, get the parameter list from the machine builder or the control manual. Write down the address of every tag you want, its data type, and its unit. This one-page table saves days later, because the gateway configuration is only as good as that list.

  • 1
    Read-only firstCommand writes back to the control need a separate safety review. Get monitoring working before you attempt remote start.
  • 2
    Watch the unitsSpindle load may come back as a percentage, a raw count, or amps. Record which one.
  • 3
    Check the firmwareOlder FOCAS versions cap how many tags you can read in one call. The manual lists the limit.
Hardware selection

Gateway features that decide whether the pilot survives

An industrial intelligent gateway sits between the machine network and your plant network. Its job is to poll the controls, normalize the values, and push them upstream in a format your MES or historian understands. The feature list on a datasheet is long, but only a few items change the outcome of a project.

Protocol support comes first. The gateway must speak the control protocol natively on one side and something your IT team accepts on the other, usually OPC UA, MQTT, or a REST endpoint. A gateway that only supports Modbus TCP forces you to buy a protocol converter for every Fanako machine, which doubles the cabinet space and the failure points.

Second is local storage. Machines run through shift changes, network switches reboot, and the plant VLAN gets reconfigured. A gateway with a few gigabytes of flash can hold days of buffered samples and replay them when the link comes back. Without that buffer, a five-minute outage becomes a five-minute hole in your cycle-time data.

Third is the polling engine. You want per-tag scan rates, not one global rate. Status bits at 1 s, counters at 60 s, and alarm words at 500 ms is a normal split. A gateway that forces a single rate makes you choose between network load and missed events.

  • 1
    Native control protocolNo external converter in the cabinet.
  • 2
    Per-tag scan ratesFast for status, slow for counters.
  • 3
    Edge bufferingStore and forward across network drops.
  • 4
    Timestamp at sourceGateway time, not server time, or your sequence analysis breaks.
Network layout

Wiring and network layout for the shop floor

Keep the machine network separate from office traffic. A managed switch on the cell, a gateway with two Ethernet ports, and a single uplink to the plant backbone is enough for most shops. The gateway should sit on the machine side, not behind a firewall rule set that IT changes every quarter.

Use shielded Cat 5e or Cat 6 cable for runs inside the cabinet and keep it away from spindle drive cables. A 24 V servo cable running parallel to a network cable for three meters will inject noise that shows up as CRC errors and dropped polls. If you must cross a drive cable, cross at 90 degrees.

For RS-232 machines, keep the run under 15 m at 19,200 baud. Longer runs need a converter to RS-485 or fiber. Terminate the far end properly and check the ground reference between the control and the gateway. A floating ground is the most common cause of intermittent communication alarms.

Label every port. In a shop with 40 machines, a mislabeled patch cable costs an afternoon of debugging that nobody budgets for.

Data modeling

Tag mapping and naming that survives a machine swap

The gateway configuration is where most projects quietly fail. Every tag needs three things: a source address, a normalized name, and a unit. If you name tags after the machine, such as MC04_SPINDLE_LOAD, replacing that machine next year forces a rewrite of every dashboard.

Name tags after the function instead: CNC_SPINDLE_LOAD, CNC_CYCLE_COUNT, CNC_ALARM_CODE. Store the machine identity as a separate field. Then a new machine is a configuration change, not a software project.

Decide early whether you push raw values or computed ones. Raw values keep the gateway simple and let the historian do the math. Computed values reduce bandwidth but hide the inputs when someone questions a number six months later. For a first project, push raw.

Scale and deadband matter. A spindle load that jitters by ±0.5 percent every second will fill your database with noise. Set a deadband of 1-2 percent on analog values and publish only on change. Digital status bits should publish on every transition, not on a timer.

  • 1
    Function-based namesCNC_SPINDLE_LOAD, not MC04_SPINDLE_LOAD.
  • 2
    Machine ID as a fieldSwapping a machine becomes a config edit.
  • 3
    Publish on changeDeadband 1-2 percent on analog tags.
  • 4
    Keep raw valuesCompute downstream so the inputs stay auditable.
Pitfalls

Common failures and how to avoid them

The most frequent failure is polling too hard. A gateway configured to read 200 tags every 100 ms can saturate a control's communication task and trigger a communication alarm mid-cut. Start at 1 s for status and 60 s for counters. Watch the control for a week before you tighten anything.

The second is time. If the gateway stamps samples with its own drifting clock and the historian stamps them again on arrival, your event sequence becomes unreadable. Run NTP on the gateway and keep the source timestamp in the payload. Never let two systems both claim to be the time authority.

The third is scope creep in the tag list. Teams start with run status and part count, then add 80 more tags before the pilot is stable. Each added tag is another scaling decision and another chance to misread the manual. Lock the list for the pilot, get it right, then expand.

Finally, do not put the gateway on the office VLAN through a firewall rule that nobody owns. Machine data is operational traffic. Keep it on the machine network with one documented uplink, and document who can change that uplink.

Procedure

How to collect Fanako CNC data, step by step

  • 1
    Inventory the controlsWalk the floor and record the control model, firmware version, and available communication option for every machine. Note whether Ethernet, RS-232, or an OPC UA option is fitted. This list determines how many gateway models you need. Expect three or four variants in a shop of 30 machines.
  • 2
    Confirm the protocol and test one machinePick the newest machine with Ethernet. Connect a laptop, open the FOCAS test utility or the OPC UA client, and read three tags: program number, run status, and spindle speed. If those three values update correctly, your protocol path is proven. Do this before you buy anything.
  • 3
    Write the tag list with addresses and unitsFor each machine type, produce a table with tag name, control address, data type, unit, and expected range. Include the alarm word and the part counter. This table goes into the gateway configuration directly. Missing units cause scaling errors that are hard to spot later.
  • 4
    Install and address the gatewayMount the gateway in the cabinet on the machine side. Give it a static IP on the machine VLAN, for example 192.168.10.x with a /24 mask. Set the gateway clock to an NTP source. Do not use DHCP on the machine network; a lease change will silently break your polling.
  • 5
    Configure polling groupsCreate three groups: fast (alarm word and run status at 500 ms to 1 s), medium (spindle speed and load at 2 s), slow (counters and program number at 60 s). Stagger the groups so they do not all fire in the same millisecond. Start conservative and tighten only if the control stays healthy.
  • 6
    Map tags and set scalingEnter the source address, target name, data type, and scale factor for every tag. Apply a deadband of 1-2 percent on analog values. For counters, publish on change only. Verify each tag against the machine display before you move on.
  • 7
    Validate against the machine panelRun a known part program. Compare the gateway values with the control display at three points: mid-cut, tool change, and program end. Part count, cycle time, and spindle load should match. Any mismatch is a scaling or address error, not a network problem.
  • 8
    Enable buffering and upstream forwardingPoint the gateway at your MQTT broker or OPC UA server. Pull the network cable for two minutes and confirm the samples replay when it reconnects. If they do not, fix the buffer settings before you roll out to the next machine.
Selection table

Which connection path fits your machine

Match the path to the control option actually fitted on the machine. Do not plan around an upgrade you have not bought.

PathTypical control ageScan rateWhen it fits
FOCAS over EthernetBuilt after roughly 2005500 ms to 2 sBest default for mixed shops
OPC UA server optionRecent controls with option fitted100 ms to 1 sWhen IT requires OPC UA end to end
RS-232 serialOlder controls, no Ethernet2 s to 10 sLegacy machines, low tag counts
Digital I/O tapAny control, no data port10 ms to 100 msStatus and cycle counts only
MTConnect agentControls with vendor agent1 s to 5 sShops standardizing on MTConnect
Manual CSV exportAny machinePer shiftHistorical reporting, not live OEE

Start with one machine, one gateway, three tags

Prove the protocol path on a single machine before you buy hardware for the whole shop. Three tags that match the control display are worth more than a 200-tag plan that nobody has tested.

FAQs

Frequently asked questions

Can I collect data from a Fanako control without the Ethernet option?

Yes, but the tag set shrinks. Serial FOCAS over RS-232 works on many older controls and gives you program number, status, and counters at a few seconds per poll. If there is no data port at all, a digital I/O tap on the cycle-start and cycle-end signals gives you run status and part counts, nothing more.

Decide based on what you need. Live OEE needs fast status. Historical reporting tolerates a shift-level export.

How many machines can one gateway handle?

In practice, 8 to 15 machines per gateway when you poll status at 1 s and counters at 60 s. The limit is usually the control's communication task, not the gateway CPU. Add a second gateway when polling latency rises or when you see communication alarms on the controls.

Split by cell, not by convenience. A gateway that serves one production cell is easier to troubleshoot than one that spans the whole shop.

What sampling rate should I use for cycle time?

Poll the run-status bit at 1 s and the part counter at 60 s. Cycle times of 30 s or longer resolve fine at that rate. If your cycles are shorter than 10 s, drop the status poll to 500 ms and confirm the control stays healthy for a full shift.

Always validate calculated cycle time against the control's own display before you trust the number in a report.

Do I need OPC UA if I already have FOCAS?

Only if your IT or MES team requires OPC UA as the only accepted northbound protocol. FOCAS is a southbound protocol that talks to the control. The gateway translates between them. If your historian already accepts MQTT, you may not need OPC UA at all.

Pick the protocol your plant can support at 2 a.m., not the one that looks best in a slide.

How do I handle network outages without losing data?

Use a gateway with local flash storage and store-and-forward enabled. Size the buffer for at least 72 hours of expected traffic. Then test it: unplug the uplink for two minutes mid-shift and confirm every sample replays with its original timestamp.

If the buffer cannot hold a weekend, either add storage or reduce the tag list. Dropping data silently is worse than not collecting it.

Where does GreatLight fit into a data collection project?

We machine the parts, not the gateways. But when you machine enclosures, mounting brackets, or gateway housings, the tolerances matter: a warped panel or a hole pattern off by 0.2 mm makes an install miserable. We hold ±0.005 mm on critical features and inspect 100 percent before shipment.

If you are building the hardware side of a monitoring rollout, send the drawings and we will quote within 12 hours with a free DFM review.

Need the hardware side of your monitoring rollout?

Send us the drawings for brackets, enclosures, or gateway housings. Quotation and free DFM analysis within 12 hours, no minimum order quantity.

12-hour quote100% inspectionNDA on request

Follow

More from GreatLight

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC