Monitor task execution
Supervise running programs, check task states, line numbers, and calling programs using SNPX, FTP, or Telnet.
Monitor running tasks, program names, line numbers, and execution state on your Fanuc robot.
SNPX
SNPX provides direct task monitoring with program name, line number, state, and caller:
FanucRobot robot = new FanucRobot();robot.Connect("192.168.0.1");// Read task 1 statusRobotTaskStatus task = robot.Snpx.CurrentTaskStatus.Read(1);Console.WriteLine($"Program: {task.ProgramName}");Console.WriteLine($"Line: {task.LineNumber}");Console.WriteLine($"State: {task.State}"); // Running, Paused, StoppedConsole.WriteLine($"Caller: {task.Caller}");}}
Click to see the full code
See also: SNPX Alarms & task status
FTP (offline parsing)
Download and parse the task information file:
FanucRobot robot = new FanucRobot();robot.Connect("192.168.0.1");ProgramStates programStates = robot.Ftp.GetProgramStates();}}
Click to see the full code
See also: FTP Diagnostics & variables
Telnet KCL
Query task information using KCL commands:
FanucRobot robot = new FanucRobot();robot.Connect("192.168.0.1");// Get task information for a program like line number, state, and moreTaskInformationResult result = robot.Telnet.GetTaskInformation("MY_PROGRAM");}}
Click to see the full code
See also: Telnet Debugging & breakpoints
Protocol comparison
| Feature | SNPX | FTP | Telnet |
|---|---|---|---|
| Speed | ~2 ms | ~100 ms | ~30 ms |
| Program name | Yes | Yes | Yes |
| Line number | Yes | Yes | Yes |
| Task state | Yes | Yes | Yes |
| Caller info | Yes | No | No |
| Multiple tasks | Yes (by index) | Yes (all) | Yes (all) |