FTP on CNC machines
How FTP sends, receives and backs up NC programs, which controls have it, and how a control like Brother's CNC-C00 is monitored over it.
What FTP is
FTP (File Transfer Protocol) is one of the oldest and simplest ways to move files between devices on a network. A device runs an FTP server; another connects as a client, logs in, and downloads or uploads files.
On CNC machines, FTP's everyday job is moving NC programs: sending them from a PC or CAM system to the machine, pulling them back, and backing them up, without a USB stick or an RS-232 cable.
Sending programs
- In practice
- Upload a program (for example PART001.NC) from the programming PC to the machine
Receiving programs
- In practice
- Download a program edited at the machine back to the PC
Backing up
- In practice
- Copy every program off the control before a repair or a control swap
Sharing between machines
- In practice
- Move the same program to several machines from one place
DNC software
- In practice
- Many DNC packages use FTP to reach network-capable controls
| Used for | In practice |
|---|---|
| Sending programs | Upload a program (for example PART001.NC) from the programming PC to the machine |
| Receiving programs | Download a program edited at the machine back to the PC |
| Backing up | Copy every program off the control before a repair or a control swap |
| Sharing between machines | Move the same program to several machines from one place |
| DNC software | Many DNC packages use FTP to reach network-capable controls |
How FTP works on a CNC
FTP client
PC or CAM
FTP client
ThingConnect gateway
↓ port 21 · login + commands ↓
FTP server · CNC control
- NC programs · send, receive, back up
- Live status files · some controls, such as Brother CNC-C00
- 1The CNC control and the PC are connected to the same network, each with its own IP address.
- 2The FTP client on the PC connects to the control on port 21 and logs in with the user name and password set on the control.
- 3The client lists the control's folders and picks a file.
- 4The file is uploaded to the machine or downloaded to the PC over a separate data connection.
FTP ports and settings
Transport
- Typical value
- TCP
- What it means
- Every FTP connection runs over standard TCP/IP Ethernet
Control connection
- Typical value
- Port 21
- What it means
- Login and commands (list, get, put)
Data connection, active mode
- Typical value
- Port 20
- What it means
- The server opens the connection back to the client for each file
Data connection, passive mode
- Typical value
- A port the server offers
- What it means
- The client opens the data connection; easier through firewalls
Login
- Typical value
- User name and password
- What it means
- Set on the control; some controls also allow anonymous login
Address
- Typical value
- ftp://<machine-ip>
- What it means
- For example ftp://192.168.1.100
File types
- Typical value
- .NC, .TXT, .EIA, .MPF, .SPF
- What it means
- Depends on the control's program format
| Setting | Typical value | What it means |
|---|---|---|
| Transport | TCP | Every FTP connection runs over standard TCP/IP Ethernet |
| Control connection | Port 21 | Login and commands (list, get, put) |
| Data connection, active mode | Port 20 | The server opens the connection back to the client for each file |
| Data connection, passive mode | A port the server offers | The client opens the data connection; easier through firewalls |
| Login | User name and password | Set on the control; some controls also allow anonymous login |
| Address | ftp://<machine-ip> | For example ftp://192.168.1.100 |
| File types | .NC, .TXT, .EIA, .MPF, .SPF | Depends on the control's program format |
Which CNC controls have FTP
FTP depends on the control model, its software version and the options installed. Some brands use a different route for programs instead.
- Network program transfer
- FTP with the Data Server or Fast Ethernet option. The standard embedded Ethernet port uses FANUC's own program transfer software instead.
- Network program transfer
- FTP server built into the CNC-C00 and CNC-D00 controls
- Network program transfer
- Net Share, a Windows network share, plus USB. Haas doesn't document an FTP server on the control.
- Network program transfer
- LSV-2 (Heidenhain's TNCremo software) and network drives
- Network program transfer
- Network drives; FTP depends on version and options
Mitsubishi, Mazak, Okuma, Fagor, Syntec, NUM
- Network program transfer
- Model-dependent. Checked per control in the site survey.
| Control | Network program transfer |
|---|---|
| FANUC | FTP with the Data Server or Fast Ethernet option. The standard embedded Ethernet port uses FANUC's own program transfer software instead. |
| Brother | FTP server built into the CNC-C00 and CNC-D00 controls |
| Haas (NGC) | Net Share, a Windows network share, plus USB. Haas doesn't document an FTP server on the control. |
| Heidenhain TNC | LSV-2 (Heidenhain's TNCremo software) and network drives |
| Siemens SINUMERIK | Network drives; FTP depends on version and options |
| Mitsubishi, Mazak, Okuma, Fagor, Syntec, NUM | Model-dependent. Checked per control in the site survey. |
FTP compared with FTPS, SFTP, DNC and RS-232
FTP
- What it is
- Plain file transfer over TCP; no encryption
- On a CNC
- The common network route for programs
FTPS
- What it is
- FTP with TLS encryption
- On a CNC
- Rare on controls; more common on file servers
SFTP
- What it is
- Secure file transfer over SSH (a different protocol from FTP)
- On a CNC
- Some newer, PC-based controls
DNC
- What it is
- Software that sends or streams programs to machines
- On a CNC
- Can drip-feed a program larger than the control's memory; uses Ethernet or serial
RS-232
- What it is
- Serial cable, one machine at a time
- On a CNC
- Older controls; slow, but still common for drip-feeding
Network share (SMB)
- What it is
- A Windows shared folder
- On a CNC
- Haas Net Share and some PC-based controls
| What it is | On a CNC | |
|---|---|---|
| FTP | Plain file transfer over TCP; no encryption | The common network route for programs |
| FTPS | FTP with TLS encryption | Rare on controls; more common on file servers |
| SFTP | Secure file transfer over SSH (a different protocol from FTP) | Some newer, PC-based controls |
| DNC | Software that sends or streams programs to machines | Can drip-feed a program larger than the control's memory; uses Ethernet or serial |
| RS-232 | Serial cable, one machine at a time | Older controls; slow, but still common for drip-feeding |
| Network share (SMB) | A Windows shared folder | Haas Net Share and some PC-based controls |
Other protocols used on CNC machines
FTP moves files. Most machine data, such as status, alarms and production counts, travels over other protocols.
- Main purpose
- FANUC's own interface for machine data and programs
- Main purpose
- Open, read-only standard for machine-tool monitoring data
- Main purpose
- Open industrial standard for machine data, with security built in
- Main purpose
- Lightweight messaging for sensors and IoT devices
HTTP / HTTPS
- Main purpose
- Web pages and web services some controls serve
LSV-2
- Main purpose
- Heidenhain's protocol for programs and data
EtherNet/IP
- Main purpose
- Industrial automation and PLC communication
SMB
- Main purpose
- Windows network folder sharing
- Main purpose
- Electrical signals for machines with no network connection
| Protocol | Main purpose |
|---|---|
| FOCAS | FANUC's own interface for machine data and programs |
| MTConnect | Open, read-only standard for machine-tool monitoring data |
| OPC UA | Open industrial standard for machine data, with security built in |
| MQTT | Lightweight messaging for sensors and IoT devices |
| HTTP / HTTPS | Web pages and web services some controls serve |
| LSV-2 | Heidenhain's protocol for programs and data |
| EtherNet/IP | Industrial automation and PLC communication |
| SMB | Windows network folder sharing |
| Digital I/O | Electrical signals for machines with no network connection |
FTP for machine monitoring
Most controls use FTP only for programs, and a program file tells you nothing about whether the machine is running. Some controls go further: they keep their live status, part counter, alarms and logs as files on the same FTP server and update them as the machine runs. On those controls, FTP is a full monitoring connection.
Brother CNC-C00We run this
The C00 has no OPC UA server, but it keeps its status, part counter, alarms and logs as files on its FTP server. We monitor C00 machines this way in production today. See the Brother page.
Brother CNC-D00OPC UA first
The newer D00 publishes the same data over OPC UA, which we use for live data. Its FTP server is still there for programs and the control's own log files.
How data is shared
- FTP
- Files the control writes
- OPC UA
- Named items the control publishes
History between reads
- FTP
- Yes, from the control's own log files
- OPC UA
- Depends on the control
Security
- FTP
- Login only; keep on the plant network
- OPC UA
- Signing, encryption, certificates
Where you meet it
- FTP
- Brother C00 for status; most controls for programs only
- OPC UA
- Newer controls: Brother D00, Siemens, Heidenhain and more
| FTP | OPC UA | |
|---|---|---|
| How data is shared | Files the control writes | Named items the control publishes |
| History between reads | Yes, from the control's own log files | Depends on the control |
| Security | Login only; keep on the plant network | Signing, encryption, certificates |
| Where you meet it | Brother C00 for status; most controls for programs only | Newer controls: Brother D00, Siemens, Heidenhain and more |
When a control offers both, we use OPC UA for live data and FTP for the files only FTP has. When it offers only FTP, FTP alone gives a complete picture.
Check a control's FTP with FileZilla
Before installation, your maintenance engineer can confirm FTP works with a free FTP client such as FileZilla:
- 1Connect a laptop to the same network as the machine (for example laptop 192.168.1.50, machine 192.168.1.100).
- 2In FileZilla, enter the machine's IP address as the host, the FTP user name and password set on the control, and port 21.
- 3Connect. If the control's folders appear, FTP is on and the login is right.
- 4Download a program file to be sure files transfer. Don't upload or delete anything on a production machine.
FTP security and safety on a production machine
Changing the machine
- How it's handled
- Monitoring only reads. Monitoring doesn't change programs, settings or how the machine runs.
Slowing the control
- How it's handled
- Status files are small, and reading them doesn't affect machining.
Your program transfers
- How it's handled
- They carry on as before, alongside monitoring.
No encryption
- How it's handled
- FTP stays inside the plant network. Only the gateway talks to the cloud, over one encrypted outbound connection.
| Concern | How it's handled |
|---|---|
| Changing the machine | Monitoring only reads. Monitoring doesn't change programs, settings or how the machine runs. |
| Slowing the control | Status files are small, and reading them doesn't affect machining. |
| Your program transfers | They carry on as before, alongside monitoring. |
| No encryption | FTP stays inside the plant network. Only the gateway talks to the cloud, over one encrypted outbound connection. |
Setup on the control
- 1Connect the control to the plant network and give it a fixed IP address.
- 2Set an FTP user name and password on the control.
- 3Allow the gateway to reach the control on port 21.
- 4Our team connects the gateway and checks the live data against the control's own screen.
Common FTP problems on a CNC
FileZilla can't connect at all
- What's happening
- FTP is switched off on the control, the IP address is wrong, or port 21 is blocked.
- What to do
- Check the control's network settings and that the laptop is on the same network.
Login fails
- What's happening
- The FTP user or password on the control is different, or was changed during maintenance.
- What to do
- Use the login set on the control; update it on the gateway if it changed.
Connects, but the file list never appears
- What's happening
- Active mode is blocked by a firewall.
- What to do
- Switch the client to passive mode.
The control stops answering FTP while the machine keeps running
- What's happening
- The control's FTP server has stopped accepting new connections.
- What to do
- We reconnect automatically when the control answers again. If it doesn't recover, restarting the control clears it.
OPC UA stops on a Brother D00 after an FTP password is set
- What's happening
- The control now asks OPC UA clients to log in too.
- What to do
- We use the same user name and password for OPC UA.
| What you see | What's happening | What to do |
|---|---|---|
| FileZilla can't connect at all | FTP is switched off on the control, the IP address is wrong, or port 21 is blocked. | Check the control's network settings and that the laptop is on the same network. |
| Login fails | The FTP user or password on the control is different, or was changed during maintenance. | Use the login set on the control; update it on the gateway if it changed. |
| Connects, but the file list never appears | Active mode is blocked by a firewall. | Switch the client to passive mode. |
| The control stops answering FTP while the machine keeps running | The control's FTP server has stopped accepting new connections. | We reconnect automatically when the control answers again. If it doesn't recover, restarting the control clears it. |
| OPC UA stops on a Brother D00 after an FTP password is set | The control now asks OPC UA clients to log in too. | We use the same user name and password for OPC UA. |
A mixed fleet is normal. FTP machines sit next to OPC UA machines, FANUC on FOCAS, and older machines on digital I/O. All of them land on the same dashboard.
Frequently asked questions
Mainly for moving NC programs over the network: sending programs from a PC or CAM system to the machine, downloading programs from the machine, and backing them up, without a USB stick or an RS-232 cable.
Only when the control keeps its live status as files on its FTP server, as Brother's CNC-C00 does. Then the files show running or stopped, program, part count and alarms. A control that uses FTP only for programs doesn't give machine status this way.
Brother Speedio machines with the CNC-C00 control, which have no OPC UA server. Other controls connect over OPC UA, FOCAS, MTConnect or digital I/O, whichever gives the most data on that machine.
Yes. Monitoring only reads, so your program transfers carry on as before. Monitoring doesn't change programs, settings or how the machine runs.
Plain FTP doesn't encrypt the login or the files, so it should stay on the plant network. That is how we use it: the gateway sits inside your plant, talks to the machines locally, and sends data out over one encrypted connection. The machines never connect to the internet.
Port 21 for the control connection (login and commands). Files travel on a separate data connection: port 20 in active mode, or a port the server offers in passive mode.
See it live
