It is also possible to have your program set $OV_PRO, but this is something to be approached with extreme caution, since the override is used for reduced-speed testing.
As SkyeFire said, you have to be extremely cautious with setting $OV_PRO inside your program as it will override the speed of the robot when its being run at a lower speed for any reason. Example, if $OV_PRO is set to 50, the robot is running at 50% speed. But if you change $OV_PRO to 100, the robot will suddenly change back to 100% speed.
If you want to change it just for the paint motions as you said before. You can run something like this.
paintVel = 0.03 ; Sets paint speed to 3mm/s
$VEL.CP = paintVel
;This calls a trigger when your robot starts the motion to run the command
TRIGGER WHEN DISTANCE = 0 ONSTART DELAY = 0 DO SpeedOverride() PRIO = -1
;This will run a trigger when your robot finishes the motion
TRIGGER WHEN DISTANCE = 0 DELAY = 0 DO SpeedReset() PRIO = -1
LIN XP1
Then you can write the following a programs in another file to run when the trigger occurs. Note that the global real's in the following code will have to be declared in a .dat file but for simplicity sake, I'm placing them in the same as the other programs
GLOBAL REAL PrevSpeed = 0
GLOBAL DEF SpeedOverride()
PrevSpeed = $OV_PRO
$OV_PRO = 100 ; Sets the overall speed of the robot to 100%
ENDDEF
GLOBAL DEF SpeedReset()
$OV_PRO = PrevSpeed ; Returns the speed back to previous set amount.
ENDDEF
With this setup, you can temporarily adjust the speed of the robot. But there is also the limiting factor that if you run the SpeedReset before the SpeedOverride, then you will tell the robot to run at 0%