I'm working on a recovery program that begins at Main by checking a series of outputs, then calls a certain routine depending on which output=1.
To start, I made a world zone around a tool changing station, hereafter referred to as External Magazine. Then I mapped digital output doExternalMag_R1 to a device in the Profinet.
The plan is to use WZDOSet to set doExternalMag_R1=1 if the TCP is inside this zone. However, the output=0 regardless, even when I jog the robot inside the zone.
Here is my world zone module:
MODULE WZone
VAR wzstationary wzR1_ExternalMagazine;
LOCAL PERS num nRad_ExternalMag:=300;
LOCAL VAR shapedata shp_ExternalMag;
!
PROC StatWZones()
! Set World Zone for External Magazine position
WZSphDef\Inside,shp_ExternalMag,pR1ExternalMagazineGP.trans,nRad_ExternalMag;
WZDOSet\Stat,wzR1_ExternalMagazine\Inside,shp_ExternalMag,doExternalMag_R1,1;
!
ENDPROC
ENDMODULE