FGRun Method
Description
Executes a Force Guide sequence.
Syntax
Sub FGRun (Sequence As String)
Parameters
- Sequence
Force guide sequence name or string variable indicating the Force Guide sequence name
Remarks
Executes a specified Force Guide sequence. The Force Guide sequence starts from the position where the FGRun statement was executed. Execute after moving to the assumed start position by the Go statement, Move statement, or other motion commands.
When the specified Force Guide sequence ends, the program proceeds to the next statement.
To acquire the results of sequences executed by FGRun, use FGGet.
When path motion is enabled by the CP parameter or CP statement, the program waits until the robot stops and then executes a Force Guide sequence.
When any of the following conditions is fulfilled at the time of execution start, an error occurs.
The robot specified in the program differs from the robot specified by the RobotNumber property.
Specify the correct robot by the Robot statement.
The robot type specified in the program differs from the robot type specified by the RobotType property.
Specify the correct robot by the Robot statement.
The tool number specified in the program differs from the tool number specified by the RobotTool property.
Specify the correct tool number by the Tool statement.
Motor is in OFF state.
Switch to ON state by the Motor statement.
Force control function is currently being executed.
Stop force control by the FCEnd statement.
Conveyor tracking is currently being executed.
Stop conveyor tracking by the Cnv_AbortTrack statement.
Currently in the torque control mode.
Disable the torque control mode by the TC statement.
FGRun, when executed, automatically overwrites the following properties; therefore, it cannot be used together with the following properties:
FM object
AvgForceClear property
PeakForceClear property
This method cannot be executed while the program is running.
See Also
FGGet Method
FGRun Example
VB Example:
Dim errCode As Integer
m_spel.MotorsOn = True
m_spel.FGRun("Sequence1")
errCode = m_spel.FGGet("Sequence1", SpelForceProps.EndStatus, val)
C# Example:
int errCode;
m_spel.MotorsOn = true;
m_spel.FGRun("Sequence1");
errCode = m_spel.FGGet("Sequence1", SpelForceProps.EndStatus, val);