Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
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.7K RobotStudio
- 402 UpFeed
- 21 Tutorials
- 16 RobotApps
- 307 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 251 ScreenMaker
- 2.9K Robot Controller
- 368 IRC5
- 92 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 859 RAPID Programming
- 43 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings
