Program control via Telnet
Run, pause, hold, continue, and abort TP and Karel programs remotely using Telnet KCL commands.
Run, pause, hold, continue, and abort TP and Karel programs remotely using Telnet KCL commands.
Run, pause, hold, continue
parameters.Telnet.TelnetKclPassword = "TELNET_PASS";robot.Connect(parameters);// Run the default programrobot.Telnet.Run();// Run a specific programrobot.Telnet.Run("MyProgram");// Pause a running program (stops at the next fine point)robot.Telnet.Pause("MyProgram");// Force pause immediatelyrobot.Telnet.Pause("MyProgram", force: true);// Hold a program (stops at the current position)robot.Telnet.Hold("MyProgram");// Resume a paused or held programrobot.Telnet.Continue("MyProgram");}}
Click to see the full code
Pause stops at the next motion fine point. Hold decelerates the robot to stop at the current position.
Abort, clear, and reset
parameters.Telnet.TelnetKclPassword = "TELNET_PASS";robot.Connect(parameters);// Abort a specific programrobot.Telnet.Abort("MyProgram", force: true);// Abort all running programsrobot.Telnet.AbortAll(force: true);// Clear all programs from memoryrobot.Telnet.ClearAll();// Clear a specific programrobot.Telnet.ClearProgram("MyProgram");// Clear variables of a specific programrobot.Telnet.ClearVars("MyProgram");// Reset alarms and re-enable servo powerrobot.Telnet.Reset();}}
Click to see the full code
The Reset() command has the same effect as the FAULT RESET button on the operator panel. The error message remains displayed if the error condition still exists.
Complete example
using UnderAutomation.Fanuc;using UnderAutomation.Fanuc.Telnet;public class TelnetProgramControl{static void Main(){FanucRobot robot = new FanucRobot();ConnectionParameters parameters = new ConnectionParameters("192.168.0.1");parameters.Telnet.Enable = true;parameters.Telnet.TelnetKclPassword = "TELNET_PASS";robot.Connect(parameters);// Run a programrobot.Telnet.Run("MyProgram");// Pause (stops at next fine point)robot.Telnet.Pause("MyProgram");// Hold (decelerates and stops at current position)robot.Telnet.Hold("MyProgram");// Resume a paused or held programrobot.Telnet.Continue("MyProgram");// Abort a programrobot.Telnet.Abort("MyProgram", force: true);// Abort all running programsrobot.Telnet.AbortAll(force: true);// Reset alarms (same as FAULT RESET button)robot.Telnet.Reset();// Clear program variablesrobot.Telnet.ClearVars("MyProgram");}}
API reference
Result of a run command.
| Member | Type | Description |
|---|---|---|
RunResult() Constructor | ||
FromResult(string) Method | bool | During implementation, return true if it is assumed that the frame has finished being received. |
Result of a program command (abort, continue, hold, pause, run, etc.).
| Member | Type | Description |
|---|---|---|
ProgramCommandResult() Constructor | ||
EndReceive() Method | void | Indicates that responses have been completed and received |
FromResult(string) Method | bool | During implementation, return true if it is assumed that the frame has finished being received. |