Q1: In the ELSE statement of the main procedure, the INTERCH is not deactivated until after the Path20. This means both INTERCH, and STN2 will be activated at the same time in Path_20. This is probably not what you want. Is this an error?
PROC main()PROC main()
IF DI_01=1 THEN
ActUnit INTERCH;
MoveJ Target_230,v1000,z0,AW_GunWObj:=wobj0;
DeactUnit INTERCH;
Path_10;
ELSE
ActUnit INTERCH;
MoveJ Target_220,v1000,z0,AW_GunWObj:=wobj0; Path_20; < - Should the order be changed ? DeactUnit INTERCH; < - Should the order be changed ?
ENDIF
Q2: The last target of Path2 is Target_10 which has the value 9E9 for logical axis 6, which is assume is used for STN2. This will definitely be out of reach of the robot
Thank You for your suggestion.This has helped me alot in solving the issues.
1).The error coming because of the first question was mechanical unit error.
2). The position reach outside was coming because while creating the workobject i had given Programmed-False. The simulation started working when i changed it to TRUE.
I would like to know what is the difference happening when i’m doing the Programmed- TRUE & FALSE. While doing with the flexpendent we used to do it FALSE.
ufprog = FALSE
User frame is NOT programmed, i.e. the definition entered in the RAPID code is not used. Instead, the base frame of the external axis defined in the string ufmec is used. The baseframe is defined in the motion configuration database (MOC.CFG)
In this case typically ufmec=STN1 or STN2.
ufprog = TRUE
The coordinates of the workobject as defined in RAPID are used to locate the workobject. This is to be used for stationary workobjects.
BUT, the reason why you can’t get it to work for STN2 with ufprog = FALSE is probably because the baseframe definition of STN2 in the controller is incorrect. RobotStudio has probably written the values of STN1 and STN2 in the controller configuration database that they had when the INTERCH was in its default position. This is OK for STN1 but not for STN2. The problem is that the INTERCH is typically turned 180 degrees around when STN2 is in operation. There are two ways to solve this:
Alt 1: Open the System Configuration dialog. Select STN1, check the coordinates, then select STN2, choose Controller values and enter the values of STN1 and press OK. The controller will be restarted to update the baseframe values.
Alt 2. Turn the INTERCH around so that you have STN2 in operating position. Open the System Configuration dialog, select the STN2 and choose Use Current Station Values. Press OK to restart RobotStudio.