GetNextMechUnit ACTIVE is not working?
Joan
✭
in RobotStudio
Hello all,
If from my program I try to use GetNextMechUnit, I cannot get the desired result... I want to get the names only of ACTIVE units.
I've made this code snippet to test it:
************************************************************ ******
MODULE mainmodule
PROC Main ()
VAR num listno := 0;
VAR string name := "";
VAR bool b := FALSE;
TPWrite "List of mechanical units:";
WHILE GetNextMechUnit(listno, name Active := b)
DO
IF (b)
THEN
TPWrite "ACTIVE: " + name;
ELSE
TPWrite "INACTIVE: " + name;
ENDIF
! listno := listno + 1 is done by GetNextMechUnit
ENDWHILE
ENDPROC
ENDMODULE
************************************************************ ******
The problem here is that all the robots seem that are active even if I have deactivated them from the flex pendant... (you know, that first icon over the yellow gears on the right side of the flex pendant).
Any idea on why it is happening?
As always thank you in advance.
If from my program I try to use GetNextMechUnit, I cannot get the desired result... I want to get the names only of ACTIVE units.
I've made this code snippet to test it:
************************************************************ ******
MODULE mainmodule
PROC Main ()
VAR num listno := 0;
VAR string name := "";
VAR bool b := FALSE;
TPWrite "List of mechanical units:";
WHILE GetNextMechUnit(listno, name Active := b)
DO
IF (b)
THEN
TPWrite "ACTIVE: " + name;
ELSE
TPWrite "INACTIVE: " + name;
ENDIF
! listno := listno + 1 is done by GetNextMechUnit
ENDWHILE
ENDPROC
ENDMODULE
************************************************************ ******
The problem here is that all the robots seem that are active even if I have deactivated them from the flex pendant... (you know, that first icon over the yellow gears on the right side of the flex pendant).
Any idea on why it is happening?
As always thank you in advance.
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 786 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings