Using FTP for Increased Productivity

Filed under: Workflow FANUC

One of the easiest ways to save time while working on a FANUC robot is to become familiar with an FTP client. The addition of the USB port on the Teach Pendant helped bring most people out of the dark ages of lugging PCMCIA cards around (although many people still use them), but even USB sticks aren’t the fastest way to get files to and from your robots.

For those unfamiliar with the concept, FTP stands for File Transfer Protocol; it’s basically a method for getting files from one computer to another. One computer (like the robot controller) runs an FTP server and waits for FTP clients (like your laptop) to connect and issue commands. You have commands for getting a list of files, downloading files, uploading files, creating directories, etc. As long as your laptop is on the same network as your robot, you’re good to go.

There are many GUI-based FTP clients out there, but I find it easiest to just use the command line. For the example below, I’ll assume you’re running Windows.

  1. Open up a Command Prompt
  2. Type ‘ftp robot_ip_address’
  3. Wait for it to ask you to login
  4. Assuming you haven’t set a username/password, just hit enter.

Downloading Files

Voila! Your FTP client is connected to the robot’s FTP server. Now what? Well, let’s say you want to see the current error history.

  ftp> get

You just “got” the file from the robot which lists all the recent alarms. What if you wanted to backup all your TP programs?

  ftp> bin
  ftp> prompt
  ftp> mget *.tp
  ftp> quit

Whoah… bin? prompt? mget? What do those do? I’ll explain them briefly here, but in case you forget, you can always type ‘help’ or ‘help bin’ to see what your FTP client says about them.

The ‘bin’ command sets the transfer type to binary. TP files are a binary format. If you open them up in a text editor, you’re not going to be able to read them, but the robot reads them just fine. By setting the transfer type to binary, you’re going to be downloading the file in its original format. Google is your friend if you want more information on that.

The ‘prompt’ command saves you from having to answer ‘y’ to each file download. It toggles whether or not the FTP client should ask you to confirm downloads/uploads.

The ‘mget’ command stands for ‘multiple get.’ You can use an asterisk as a wildcard character and the client will attempt to download any files that match.

Uploading files

It’s very easy to upload files too. Just remember that all of these operations take place within the current working directory when you started the FTP client. You can always see your current directory by using the ‘lcd’ command.

Let’s say you have a modified version of your MAIN.TP file, and you want to upload it.

  > ftp robot_id
  ftp> (enter to login)
  ftp> bin
  ftp> put
  ftp> quit

Easy as pie. Lets say you wanted to update the robot with a whole directory’s worth of TP files:

  > ftp robot_id
  ftp> (enter to login)
  ftp> bin
  ftp> prompt
  ftp> mput *.tp
  ftp> quit

Magic. One thing to note is that you might see errors while uploading if the Teach Pendant is currently running or editing the file you’re trying to upload. Make sure to do a FCTN > Abort all and even SELECT another program before attempting to upload a newer version.

Use the ‘help’ command to find out more about all the commands. There aren’t very many. I promise you’ll thank me when you stop having to worry about losing your USB stick and using the cumbersome FILE menu.

There's more where that came from.

I email (almost) every Tuesday with the latest insights, tools and techniques for programming FANUC robots. Drop your email in the box below, and I'll send new articles straight to your inbox!

No spam, just robot programming. Unsubscribe any time. No hard feelings!