---
title: "Speed override: $MCR.$GENOVERRIDE"
description: "Read and set the general speed override $MCR.$GENOVERRIDE of a Fanuc robot from a PC, lock the override keys of the pendant with $GENOV_ENB, and watch it over a fleet."
---

# Speed override: $MCR.$GENOVERRIDE

`$MCR.$GENOVERRIDE` is the speed override of a Fanuc robot: the % that the operator sets with the +% and -% keys of the pendant. A PC or a line controller can read it, set it back to 100 % at the start of production, and lock the keys.

## The variables

| Variable | Type | Meaning | File |
| --- | --- | --- | --- |
| `$MCR.$GENOVERRIDE` | INTEGER | General override, the % shown on the pendant. Accepts 1 to 100 | `sycldint.va` |
| `$GENOV_ENB` | BOOLEAN | `FALSE` locks the +% and -% keys of the pendant. Set it back to `TRUE` to unlock them | `system.va` |

`$MCR.$GENOVERRIDE` is an integer. Read and write it as an integer, not as a real.

## Read, set and lock the override

SNPX reads and writes a system variable in about 2 ms, without any program on the robot.

**C# : SpeedOverride**
```csharp
using System;
using UnderAutomation.Fanuc;

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

        /**/
        // $MCR.$GENOVERRIDE is an INTEGER: the % shown on the pendant
        int percent = robot.Snpx.IntegerSystemVariables.Read("$MCR.$GENOVERRIDE");
        if (percent < 100)
        {
            Console.WriteLine($"Running at {percent} %, set back to 100 %");
            robot.Snpx.IntegerSystemVariables.Write("$MCR.$GENOVERRIDE", 100);
        }

        // Lock the +% and -% keys of the pendant, and unlock them later
        robot.Snpx.SetVariable("$GENOV_ENB", false);
        robot.Snpx.SetVariable("$GENOV_ENB", true);
        /**/
    }
}
```

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

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

##
# $MCR.$GENOVERRIDE is an INTEGER: the % shown on the pendant
percent = robot.snpx.integer_system_variables.read("$MCR.$GENOVERRIDE")
if percent < 100:
    print(f"Running at {percent} %, set back to 100 %")
    robot.snpx.integer_system_variables.write("$MCR.$GENOVERRIDE", 100)

# Lock the +% and -% keys of the pendant, and unlock them later
robot.snpx.set_variable("$GENOV_ENB", False)
robot.snpx.set_variable("$GENOV_ENB", True)
##
```

The same variables can be read and written with CGTP, Telnet KCL or KCL over CGTP, see [Read & write system variables](/fanuc/documentation/read-write-system-variables). With the RMI option, `GetStatus().SpeedOverride` gives the override too, see [RMI frames, I/O & status](/fanuc/documentation/rmi-frames-io).

## Watch it over a fleet

A line that runs at 80 % for weeks loses cycle time and nobody sees it. Read `$MCR.$GENOVERRIDE` of every robot once a minute and log it with the time. A robot that stays below 100 % in automatic production is a question for the shift leader, not always a fault: somebody may have slowed it down for a good reason.

For several values at each cycle, put them in one SNPX batch read, see [Optimize with batch operations](/fanuc/documentation/optimize-performance-batch-operations).

## Cautions

- The override is not a safety function. Do not use it to protect people: use the safety functions of the controller (DCS).
- A PC that writes 100 % while an operator is in the cell, teaching at low speed, is a risk. Write it only in automatic mode, with the agreement of the people who run the line.
- Unlock the keys (`$GENOV_ENB` back to `TRUE`) when your application stops. Otherwise the operator cannot slow down the robot from the pendant.
- Stream Motion needs `$MCR.$GENOVERRIDE` at 100, see [Stream Motion overview](/fanuc/documentation/stream-motion). Its own override is another thing, see [Send trajectories](/fanuc/documentation/stream-motion-trajectories).

## See also

- [Fanuc system variables list](/fanuc/documentation/fanuc-system-variables-list)
- [SNPX system variables](/fanuc/documentation/snpx-variables)
- [Telnet variables & I/O](/fanuc/documentation/telnet-variables-io)