UnderAutomation
Eine Frage?

[email protected]

Kontakt
UnderAutomation
⌘Q
Diese Seite ist nur auf Englisch verfügbar.

Transfer files and backups

Back up every job of a Yaskawa controller, send a job written on the PC and download the CMOS backup, from C# or Python.

  • Prerequisites
  • Which method to choose
  • Example
  • Version the jobs
  • Troubleshooting
  • What to read next

This article shows how to transfer files between a PC and a Yaskawa Motoman controller, in C# or Python. It gives a complete program that saves every job of the controller, sends a new job and downloads the CMOS backup.

Prerequisites

  • The SDK is connected to the controller: see Connect to your robot. The file transfers use the UDP port 10041.
  • To replace a file, RS029 and RS214 are 1. For the CMOS backup, the automatic backup uses the RAM disk. See Files and backup.

Which method to choose

NeedMethod
The list of the jobs or data filesGetFileList("*.JBI")
A copy of one fileGetFile(name)
A job written or changed on the PCLoadFile(name, content)
A complete backup of the controllerBatchDataBackup(), then GetFile("/SPDRV/CMOSBK.BIN")
Remove a fileDeleteFile(name)

Example

using UnderAutomation.Yaskawa;
using UnderAutomation.Yaskawa.HighSpeedEServer;
public class HowToTransferFiles
{
static void Main()
{
var robot = new YaskawaRobot();
robot.Connect("192.168.0.1");
string folder = Directory.CreateDirectory("JobsBackup").FullName;
// 1. Download every job of the controller
foreach (string name in robot.HighSpeedEServer.GetFileList("*.JBI").Files)
{
RobotFileContentData file = robot.HighSpeedEServer.GetFile(name);
File.WriteAllText(Path.Combine(folder, name), file.Content);
Console.WriteLine($"Saved {name}");
}
// 2. Send a job written on the PC. RS029 and RS214 must allow the overwrite
string job = File.ReadAllText("NEWJOB.JBI");
robot.HighSpeedEServer.LoadFile("NEWJOB.JBI", job);
// 3. Save the CMOS backup of the controller
robot.HighSpeedEServer.BatchDataBackup();
File.WriteAllBytes(Path.Combine(folder, "CMOSBK.BIN"), robot.HighSpeedEServer.GetFile("/SPDRV/CMOSBK.BIN").ContentRaw);
robot.Disconnect();
}
}

The program:

  1. downloads each job to the folder JobsBackup of the PC;
  2. sends the job NEWJOB.JBI of the PC to the controller;
  3. makes the CMOS backup on the controller and downloads it.

Version the jobs

The jobs are text files. Save them in a version control system (Git...) after each download: you see what changed on the controller between two backups, and you can send an older version back.

Troubleshooting

  • Cannot over write the target file: set RS029 and RS214 to 1.
  • The upload of a job is refused with a syntax error: the controller checks the job when it receives it. Open the job in MotoSim or on the pendant to find the line.
  • The CMOS download fails just after BatchDataBackup(): the backup is still running. Wait a few seconds and download again.
  • A large file fails on a slow network: increase FileTimeoutMilliseconds.

What to read next

  • Files and backup: the reference of the file methods.
  • Run a job.

Integrieren Sie Roboter von Universal Robots, Fanuc, Yaskawa, ABB oder Staubli ganz einfach in Ihre .NET-, Python-, LabVIEW- oder Matlab-Anwendungen

UnderAutomation
KontaktLegal

© All rights reserved.