
Use of WZSphDef
Hi everyone,
I wrote this Rapid code to control TCP position. I want the blue light(Lampe_Bleu) to be on when the TCP reach into the sphere. This code does'nt work.
I wrote this Rapid code to control TCP position. I want the blue light(Lampe_Bleu) to be on when the TCP reach into the sphere. This code does'nt work.
VAR shapedata Sphere;
CONST num Rayon_sphere :=150;
VAR pos Centre_Sphere;
!Zone où la lumière bleue est allumée
VAR wztemporary ZoneRetrait_interne:=[0];
!Zone où la lumière bleue est éteinte
VAR wztemporary ZoneRetrait_externe:=[0];
!Appel des alias entrées/sorties
Demonination_entrees_sorties;
!Affectation du centre de la sphère à surveiller
Centre_Sphere:=rRetrait.trans;
TPWrite "centre de sphère" \Pos:=Centre_Sphere;
! Activation de la lumière bleue à 150 mm de la position rRetrait
WZFree ZoneRetrait_Interne;
WZSphDef\Inside,Sphere,Centre_Sphere,Rayon_sphere;
WZdoset\temp,ZoneRetrait_Interne\Inside,Sphere,Lampe_Bleu,Allume;
! Desactivation de la lumière bleue à plus 150 mm de la position rRetrait
WZFree ZoneRetrait_Externe;
WZSphDef\Inside,Sphere,Centre_Sphere,Rayon_sphere;
WZdoset\temp, ZoneRetrait_Externe\inside,Sphere,Lampe_Bleu,Eteint;
WzEnable ZoneRetrait_interne;
0
Comments
-
At a glance, the enable code needs to be placed inside procedures and then those procedures need to be called when you want the zone active.
0 -
Thank Soup.
0
Categories
- All Categories
- 5.5K RobotStudio
- 398 UpFeed
- 19 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 324 IRC5
- 63 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 813 RAPID Programming
- 5 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings