UnderAutomation
有问题吗?

[email protected]

联系我们
UnderAutomation
⌘Q
本页面仅提供英文版本。

Save the mastering data ($DMR_GRP)

Read $DMR_GRP[1].$MASTER_COUN and the reference counts of every Fanuc robot from sysmast.va, and keep them with a date before a battery or a motor change.

  • The variables
  • Keep the mastering data of a robot
  • When the old counts are useful
  • Cautions
  • Without code
  • See also

Before a battery change or a motor change on a Fanuc robot, you want the master counts at hand. Integrators often record them on every robot they work on, as a first step. The SDK reads them from sysmast.va of every robot and keeps them with a date.

This page only reads the mastering data. Mastering a robot is done on the teach pendant, by a qualified person, with the method of the FANUC manual of your robot.

The variables

VariableTypeMeaningFile
$DMR_GRP[g].$MASTER_COUN[a]INTEGERMaster count of axis a of group gsysmast.va
$DMR_GRP[g].$MASTER_DONEBOOLEANMastering donesysmast.va
$DMR_GRP[g].$REF_POS[a], $REF_COUNT[a]REAL, INTEGERReference position and reference count of axis asysmast.va
$DMR_GRP[g].$REF_DONEBOOLEANReference position donesysmast.va

An axis without a motor reads 0. The SDK gives these values with GetSysmastFile().DmrGrp[g - 1]: MasterCoun, MasterDone, RefPos, RefCount, RefDone.

Keep the mastering data of a robot

The code keeps a dated copy of sysmast.va, as it is, then prints the counts of group 1. Run it on each robot of the plant, for example once a week, and keep the files.

parameters.Ftp.Enable = true;
robot.Connect(parameters);
// Keep the listing of the robot with the date, as it is
robot.Ftp.DirectFileHandling.DownloadFileFromController($"{ip}-{DateTime.Now:yyyy-MM-dd}-sysmast.va", "md:/sysmast.va");
// Read it: $DMR_GRP[1] is DmrGrp[0], axis 1 is index 0
SysmastFile mastering = robot.Ftp.KnownVariableFiles.GetSysmastFile();
DmrGrpVariableType group1 = mastering.DmrGrp[0];
Console.WriteLine($"MASTER_DONE={group1.MasterDone} REF_DONE={group1.RefDone}");
for (int a = 0; a < group1.MasterCoun.Length; a++)
Console.WriteLine($"J{a + 1}: MASTER_COUN={group1.MasterCoun[a]} REF_COUNT={group1.RefCount[a]}");
}
}
Click to see the full code

The .NET and Python arrays start at 0: $DMR_GRP[1] is DmrGrp[0] and axis J1 is index 0.

A copy taken before the intervention is the one that counts. Compare it with an older copy: when the counts differ, the robot was probably mastered again in between.

When the old counts are useful

  • The pulse coders lost their power (flat battery) and nothing moved mechanically: the technician can use the recorded counts, with the procedure of the manual.
  • A motor or a pulse coder was changed: the old counts are no longer valid. The robot must be mastered again.

Cautions

  • sysmast belongs to one robot. Never load the sysmast file of another robot: the axes of this robot would lose their calibration.
  • sysmast holds more than the counts. Keep the whole file, not only the numbers printed by the code.
  • The SDK reads the .va listing. A pendant backup with only .sv files cannot be read on the PC: download sysmast.va by FTP, as the code does.

Without code

TouchUp, the robot workbench for VS Code, keeps the mastering values of each Fanuc backup that holds a readable sysmast.va. The command TouchUp: Show Mastering (Fanuc) shows the master count, the reference position and the reference count of each axis from the last backup, with its date. TouchUp only reads them: it never writes the mastering of a robot. See Mastering of a Fanuc robot.

See also

  • Fanuc system variables list
  • Upload, download & backup files
  • Offline file parsing