-
Notifications
You must be signed in to change notification settings - Fork 48
Create ABB Work Zones
Levi Armstrong edited this page Mar 9, 2017
·
2 revisions
Permanent work zones cannot be disable using RAPID code.
-
Create POWER_ON Event
-
Control Panel > Configuration
-
Topic > Controller > Event Routine
-
Select Add and fill out the information below:
Parameter Name Value Event POWER_ON Routine wzone_power_on Task T_ROB1 All Tasks No All Motion Tasks No
-
-
Add a module to T_ROB1 and the follow code to it:
MODULE WorldZones(SYSMODULE) VAR wzstationary work_zone; PROC wzone_power_on() VAR shapedata wz_volume; CONST pos table_c1:=[1220,610,-500]; CONST pos table_c2:=[-610,-610, 5000]; WZBoxDef \Outside, wz_volume, table_c1, table_c2; WZLimSup \Stat, work_zone, wz_volume; TPWrite "World Zones Setup"; RETURN; ENDPROC ENDMODULE
Temporary work zones can be disable and enabled using RAPID commands.
-
At the top of your module outside the program add the code below.
VAR wztemporary work_zone;
-
At the top of your program add the code below. Also see manual for addition shapes.
VAR shapedata wz_volume; CONST pos table_c1:=[1220,610,-500]; CONST pos table_c2:=[-610,-610, 5000]; WZBoxDef \Outside, wz_volume, table_c1, table_c2; WZLimSup \Temp, work_zone, wz_volume; WZEnable work_zone;
Note: To disable the work zone add the command
WZDisable work_zone
and to enable it again add the commandWZEnable work_zone
. -
Full Example
MODULE mGodel_DemoMain VAR wztemporary work_zone; PROC Godel_Main() !Active World Zone work_volume VAR shapedata wz_volume; CONST pos table_c1:=[1220,610,-500]; CONST pos table_c2:=[-610,-610, 5000]; WZBoxDef \Outside, wz_volume, table_c1, table_c2; WZLimSup \Temp, work_zone, wz_volume; WZEnable work_zone; !Delete Files if they exist IF IsFile("HOME:/PARTMODULES/mGodelBlend.mod") RemoveFile "HOME:/PARTMODULES/mGodelBlend.mod"; IF ModExist("mGodel_Blend") EraseModule("mGodel_Blend"); WHILE true DO !Wait for Blend File WaitUntil IsFile("HOME:/PARTMODULES/mGodelBlend.mod"); WaitTime 0.25; Load "HOME:/PartModules" \File:="mGodelBlend.MOD"; %"Godel_Blend"%; UnLoad "HOME:/PartModules" \File:="mGodelBlend.MOD"; RemoveFile "HOME:/PARTMODULES/mGodelBlend.mod"; ENDWHILE ENDPROC ENDMODULE