RobotStudio event

Help on Event Routine..

I am, in System Events,  trying to configure an Event Routine that runs once on Power ON.

My basic problem is that i am using 2 temporary world zones that i want to enable/disable a few times during a cycle. To first define the limitation of the zones i use WZLimsup. As the cycle runs i then use WZDisable and WZEnable. 

Since i cannot define a worldzone more than once I wanted to put WZLimsup in an Event Routine only to take place on Power On, and use onle WZEnable/Disable in my main program. Problem is that after configurating this it seems the Event Routine was never active since the error message i got was "WZ not in use".

my configuration looks like this:

Event :   POWER_ON        &nbs p;         !The ordered Event

Routine : wzPower_ON        &n bsp;       !My Routine to run

Task :      T_ROB1

All Tasks:     No

Seq no:      0

I temporarily solved this by by setting variables in Main Cycle when WZ is defined. What am I forgetting?

 

  

Comments

  • Are you sure the wzPower_ON routine is available when the controller boots? The program is loaded? Try to put the routine in a system module.
    Debug hint: set a signal to 1 in the wzPower_On to see if it runs during the power on. Next, check the error log after the power on. Finally, try to run wzPowerOn immediately after the power on. Double check the procedure name, and be sure it is defined without arguments:

    PROC wzPower_ON()
       Set doMyLamp;
    ENDPROC
     
    Bye

  • Thanks for the ideas.

    I know i put the routine in a system module, but i will try setting a flag to see wether or not the routine is carried out.

  • Is possible to set the temporary WZ in the System module and use the event routine for it? I am having some issues with this...


    Un saludokind regards,


    Daniel Aguilar

    Automation Engineering