Sets the incremental changes in position and orientation for the Real-time Trajectory Modification mode.
Move.SetRealTimeMod ( changes_array )
Prerequisites
- High power to the robot must be enabled.
- The robot must be Selected or Attached by the thread.
- The robot must have the Real-time Trajectory Modification method enabled.
Parameters
changes_array
A required array of Doubles that contains 6 incremental change values corresponding to the 3 position and 3 orientation degrees-of-freedom (Dx, Dy, Dz, Rx, Ry, Rz). If Move.StartRealTimeMod has specified single steps, these parameters are in units of mm and degrees. If a continuous change mode has been specified, these parameters are in units of mm/sec and deg/sec.
Remarks
After the Real-time Trajectory Modification mode has been enabled, this method must be executed to specify the incremental coordinate modifications. If the changes are defined as single steps, this method must be executed once for each step. If the changes are interpreted as continuous changes, this method must be execute each time an incremental speed is to be altered.
This method can be executed at any time and as many times as desired. It simply posts the desired changes to the trajectory generator. Each time that the trajectory generator executes, it checks for any new posted values. If this method is executed multiple times before the trajectory generator executes again, only the last values posted will have an effect.
Please see the documentation for the Move.StartRealTimeMod method for a description of how the incremental changes are interpreted.
Examples
Public Sub MAIN
Dim rtmod As New Thread("rtmod")
rtmod.Start ' Start RT change service thread
Robot.Attached = 1
Move.StartRealTimeMod(1,2) ' Turn on RT correction function
Move.Loc(p0, pf0)
Move.Loc(p1, pf0)
Move.WaitForEOM
rtmod.Abort
Move.StopSpecialModes ' Turn off RT correction function
Robot.Attached = 0
End Sub
Public Sub rtmod
Dim rtm_spd(6) As Double
While True
Controller.SleepTick(2) ' Adjust every other traj tick
If (Signal.DIO(20001)) Then
rtm_spd(2) = 10 ' +10 mm/sec in Z
ElseIf (Signal.DIO(20002)) Then
rtm_spd(2) = -10 ' -10 mm/sec in Z
Else
rtm_spd(2) = 0 ' Don't move
End If
Move.SetRealTimeMod(rtm_spd) ' Set new speed
End While
End Sub
See Also
Move Class | Move.StartRealTimeMod | Move.StopSpecialModes | Robot.CartMode| Robot.RealTimeModAcm | Thread.Schedule