---
title: "Check the payload schedules"
description: "Read the payload schedules $PLST_GRP1 and the active schedule $PLST_PARNUM of every Fanuc robot, and find the schedules with no mass or no comment."
---

# Check the payload schedules

Does each Fanuc robot of the line run with the right payload? The payload schedules are the system variable `$PLST_GRP1` and the active one is `$PLST_PARNUM`. One read per robot is enough to list them all, and to find a schedule that was never filled in.

## The variables

| Variable | Type | Meaning | File |
| --- | --- | --- | --- |
| `$PLST_GRP1[n]` | PLST_GRP_T | Payload schedule n of group 1. The digit in the name is the motion group: `$PLST_GRP2` for group 2 | `symotn.va` |
| `$PLST_GRP1[n].$COMMENT` | STRING | Comment of the schedule | `symotn.va` |
| `$PLST_GRP1[n].$PAYLOAD` | REAL | Mass | `symotn.va` |
| `$PLST_GRP1[n].$PAYLOAD_X`, `_Y`, `_Z` | REAL | Centre of gravity | `symotn.va` |
| `$PLST_GRP1[n].$PAYLOAD_IX`, `_IY`, `_IZ` | REAL | Inertia | `symotn.va` |
| `$PLST_PARNUM[g]` | INTEGER | Active payload schedule of group g | `symotn.va` |

The SDK gives them with `GetSymotnFile()`: `PlstGrp1` to `PlstGrp5`, and `PlstParnum`. The units are not given here: compare one schedule with the PAYLOAD screen of the pendant before you write a rule on the values.

In the listings we checked, both variables are read only (`Access: RO`). A program selects a schedule with the `PAYLOAD[n]` instruction.

## List the schedules of a robot

**C# : PayloadSchedules**
```csharp
using System;
using UnderAutomation.Fanuc;
using UnderAutomation.Fanuc.Common.Files.Variables;

public class PayloadSchedules
{
    static void Main()
    {
        FanucRobot robot = new FanucRobot();
        var parameters = new ConnectionParameters("192.168.0.1");
        parameters.Ftp.Enable = true;
        robot.Connect(parameters);

        /**/
        // symotn.va holds the payload schedules: $PLST_GRP1[n] is PlstGrp1[n - 1]
        SymotnFile motion = robot.Ftp.KnownVariableFiles.GetSymotnFile();
        int active = motion.PlstParnum[0]; // $PLST_PARNUM[1]
        Console.WriteLine($"Active schedule of group 1: {active}");

        for (int n = 1; n <= motion.PlstGrp1.Length; n++)
        {
            PlstGrpVariableType s = motion.PlstGrp1[n - 1];
            if (s == null) continue;
            string warning = s.Payload <= 0 ? "  <- no mass" : "";
            Console.WriteLine($"{n} '{s.Comment}' PAYLOAD={s.Payload} X={s.PayloadX} Y={s.PayloadY} Z={s.PayloadZ}{warning}");
        }
        /**/
    }
}
```

**Python : PayloadSchedules**
```python
from underautomation.fanuc.fanuc_robot import FanucRobot
from underautomation.fanuc.connection_parameters import ConnectionParameters

robot = FanucRobot()
parameters = ConnectionParameters("192.168.0.1")
parameters.ftp.enable = True
robot.connect(parameters)

##
# symotn.va holds the payload schedules: $PLST_GRP1[n] is plst_grp1[n - 1]
motion = robot.ftp.known_variable_files.get_symotn_file()
active = motion.plst_parnum[0]  # $PLST_PARNUM[1]
print(f"Active schedule of group 1: {active}")

for n, s in enumerate(motion.plst_grp1, start=1):
    warning = "  <- no mass" if s.payload <= 0 else ""
    print(f"{n} '{s.comment}' PAYLOAD={s.payload} X={s.payload_x} Y={s.payload_y} Z={s.payload_z}{warning}")
##
```

The .NET and Python arrays start at 0: `$PLST_GRP1[1]` is `PlstGrp1[0]`, and `$PLST_PARNUM[1]` is `PlstParnum[0]`.

## Audit a fleet

Run the same read on every robot and keep a table: robot, schedule, comment, mass. Look for:

- a schedule with a mass of 0 while the robot carries a tool,
- a schedule without comment, that nobody can explain,
- all the schedules with the same values, which can mean that they were never set,
- a schedule that changed since the last audit.

## Write a payload

With the RMI option (R912), `SetPayloadValue` writes the mass, the centre of gravity and the inertia of a schedule, and `SetPayloadSchedule` makes it active. The parameters of these calls are in kg, m and kg·m².

**C# : RmiFramesIoPayload**
```csharp
using UnderAutomation.Fanuc;
using UnderAutomation.Fanuc.Rmi.Data;

public class RmiFramesIoPayload
{
    static void Main()
    {
        FanucRobot robot = new FanucRobot();
        ConnectionParameters parameters = new ConnectionParameters("192.168.0.1");
        parameters.Rmi.Enable = true;
        robot.Connect(parameters);

        /**/
        // Define payload for schedule 1: 5 kg, center of gravity offset 0.1 m in Z
        robot.Rmi.SetPayloadValue(
            scheduleNumber: 1,
            massKg: 5.0f,
            cgXm: 0f, cgYm: 0f, cgZm: 0.1f);

        // Include inertia values
        robot.Rmi.SetPayloadValue(
            scheduleNumber: 2,
            massKg: 3.0f,
            cgXm: 0.05f, cgYm: 0f, cgZm: 0.08f,
            inertiaXkgm2: 0.002f, inertiaYkgm2: 0.002f, inertiaZkgm2: 0.001f);

        // Define payload compensation
        robot.Rmi.SetPayloadCompensation(
            scheduleNumber: 1,
            massKg: 1.0f,
            cgXm: 0f, cgYm: 0f, cgZm: 0.05f,
            inertiaXkgm2: 0.001f, inertiaYkgm2: 0.001f, inertiaZkgm2: 0.0005f);

        // Activate schedule 1 immediately (command, not a TP instruction)
        robot.Rmi.SetPayloadSchedule(1);
        /**/

        robot.Disconnect();
    }
}
```

**Python : RmiFramesIoPayload**
```python
from underautomation.fanuc.fanuc_robot import FanucRobot
from underautomation.fanuc.connection_parameters import ConnectionParameters

robot = FanucRobot()
parameters = ConnectionParameters("192.168.0.1")
parameters.rmi.enable = True
robot.connect(parameters)

##
# Define payload for schedule 1: 5 kg, center of gravity offset 0.1 m in Z
robot.rmi.set_payload_value(
    schedule_number=1,
    mass_kg=5.0,
    cg_xm=0.0, cg_ym=0.0, cg_zm=0.1
)

# Include inertia values
robot.rmi.set_payload_value(
    schedule_number=2,
    mass_kg=3.0,
    cg_xm=0.05, cg_ym=0.0, cg_zm=0.08,
    inertia_xkgm2=0.002, inertia_ykgm2=0.002, inertia_zkgm2=0.001
)

# Define payload compensation
robot.rmi.set_payload_compensation(
    schedule_number=1,
    mass_kg=1.0,
    cg_xm=0.0, cg_ym=0.0, cg_zm=0.05,
    inertia_xkgm2=0.001, inertia_ykgm2=0.001, inertia_zkgm2=0.0005
)

# Activate schedule 1 immediately (command, not a TP instruction)
robot.rmi.set_payload_schedule(1)
##

robot.disconnect()
```

See [RMI frames, I/O & status](/fanuc/documentation/rmi-frames-io).

## Cautions

- Enter the values of the real tool, from its drawing or from the payload identification of the controller.
- A change of payload changes how the robot moves. Test the programs at low speed after a change.

## Without code

[TouchUp](/touchup), the robot workbench for VS Code, shows the payload schedules 1 to 10 of a connected Fanuc controller, with the number, the comment and the load, in its User Frames and Tools view. It reads them only. See [User frames and tools](/touchup/documentation/user-frames-and-tools).

## See also

- [Fanuc system variables list](/fanuc/documentation/fanuc-system-variables-list)
- [Tool frames: $MNUTOOL and $MNUTOOLNUM](/fanuc/documentation/fanuc-tool-frame-utool)
- [Diagnostics & variables (FTP)](/fanuc/documentation/ftp-diagnostics)