Skip to content

Commit f30dd60

Browse files
Update to new version : 4.7.0.0
1 parent 5771159 commit f30dd60

File tree

3 files changed

+10
-51
lines changed

3 files changed

+10
-51
lines changed
0 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.6.0.0
1+
4.7.0.0

whatsNew.md

Lines changed: 9 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,19 @@
1-
## New Feature: Current Task Status Reading via SNPX
1+
## Bug Fixes and Improvements
22

3-
The SDK now provides the ability to read the current task status from the robot controller via the SNPX protocol. This allows you to monitor the execution state of programs running on different tasks.
3+
This version contains a bug fix to make program startup via Telnet more robust.
44

5-
### Property Added
6-
7-
- **`CurrentTaskStatus`**: Provides access to the status of running tasks on the robot controller (now public, previously private)
8-
9-
### What You Can Read
10-
11-
For each task, you can access:
12-
13-
- **`ProgramName`**: Name of the currently executing program
14-
- **`LineNumber`**: Current line number being executed
15-
- **`State`**: Execution state (Stopped, Paused, or Running)
16-
- **`Caller`**: Name of the calling program
17-
18-
### Quick Example
5+
### C# Usage Example
196

207
```csharp
21-
using UnderAutomation.Fanuc;
22-
using UnderAutomation.Fanuc.Common;
23-
using UnderAutomation.Fanuc.Snpx.Internal;
8+
// Run a program on the robot
9+
var result = robot.Telnet.Run("MYPROGRAM");
2410

25-
// Create and connect to robot
26-
FanucRobot robot = new FanucRobot();
27-
ConnectionParameters parameters = new ConnectionParameters("192.168.0.1");
28-
parameters.Snpx.Enable = true;
29-
robot.Connect(parameters);
30-
31-
// Read task status for task 1 (index starts from 1)
32-
RobotTaskStatus task1Status = robot.Snpx.CurrentTaskStatus.Read(1);
33-
34-
// Display task information
35-
Console.WriteLine($"Program: {task1Status.ProgramName}");
36-
Console.WriteLine($"Line: {task1Status.LineNumber}");
37-
Console.WriteLine($"State: {task1Status.State}");
38-
Console.WriteLine($"Caller: {task1Status.Caller}");
39-
40-
// Check task state
41-
switch (task1Status.State)
11+
if (result.Succeed)
4212
{
43-
case RobotTaskState.Running:
44-
Console.WriteLine($"Task 1 is running {task1Status.ProgramName} at line {task1Status.LineNumber}");
45-
break;
46-
case RobotTaskState.Paused:
47-
Console.WriteLine("Task 1 is paused");
48-
break;
49-
case RobotTaskState.Stopped:
50-
Console.WriteLine("Task 1 is stopped");
51-
break;
13+
Console.WriteLine("Program started successfully");
5214
}
53-
54-
// Monitor multiple tasks
55-
for (int i = 1; i <= 4; i++)
15+
else
5616
{
57-
var taskStatus = robot.Snpx.CurrentTaskStatus.Read(i);
58-
Console.WriteLine($"Task {i}: {taskStatus}");
17+
Console.WriteLine($"Error: {result.ErrorText}");
5918
}
6019
```

0 commit comments

Comments
 (0)