Speed variation with scanners

Hello!
In my application, I’m using a scanner that sends me which zones are active, thus, in Polyscope, I receive two digital signals for that. Depending on which zone is active (go, warning and stop zones), I want the robot to work at full speed, low speed or stop.
Considering this, I’m using a thread with several conditions and I’m trying to set the speed using the mc_set_speed_factor() but an error appears saying that it is not defined. If I use one of the recomended functions from the left lower button, no error appears (I tried with one). How can I solve this?
For reference, the Polyscope versions I have are 5.14 and 5.18.
Help is appreciated, thanks!

The UR already has reduced mode and safeguard stop as inputs. Most area scanners provide the signals from their zones as discrete outputs. Just configure the safety IO on the UR to take 2 of the configurable inputs as reduced mode, and wire the stop signals to SI0 and SI1 on the far left of the controller.

If you need more than that then you might have to post some code so we can see what you’ve got wrong.