Problem with recognizing first object after reboot controller [conveyor tracking]

Geoffrey_BornyGeoffrey_Borny Roeselare
edited June 17 in RAPID Programming
I have a quite strange problem.
We are running the same code on 5 IRB360 robots and only 1 has this problem.
After reboot we start the program and an init routine is called. In this init routine we clear the Q so no objects are tracked anymore. When an object now passes the sensor the robot keeps waiting on the WaitWobj instruction. Even if the conveyor has a position. So in my opinion an object must have been recognized otherwise the conveyor position would be 0 (c1position). Once we stop the robot and just do a pp to main, so this routine is called again, the program is working like it should. The robot connects to the workobject en does it's job. 
So to be clear the problem only happens after running the code the first time after a reboot and only on 1 robot of the 5.

Can somebody explain what a possible reason is for this problem.

Init routine used in the 5 robots:

PROC Init()  
        TriggIO tVacuum_On, Vacuum_ON_distance\DOp:=do_Rob1_Vacuum1, 1;
        TriggIO tVacuum_Off, Vacuum_OFF_distance\DOp:=do_Rob1_Vacuum1, 0;
        TriggIO tBlow_On, Blow_ON_distance\DOp:=do_Rob1_Blow1,1;
        TriggIO tBlow_Off, Blow_OFF_distance\Start\DOp:=do_Rob1_Blow1,0;
        ! Reset memory values
        Mem_Job_ID:= 0;
        connected:=FALSE;
        ! Activate the conveyor
        IF IsMechUnitActive(CNV1)=FALSE THEN
            ActUnit CNV1;
        ENDIF
        ! Remove all objects in the qeue
        DropWObj obPlace;
        pulsedo \PLength:=0.3, c1RemAllPObj;
        ! Get base coordinates of conveyor
        ReadCfgData "/MOC/SINGLE/CNV1","base_frame_pos_x",CNV1_baseframex;
        ReadCfgData "/MOC/SINGLE/CNV1","base_frame_pos_y",CNV1_baseframey;
        ! Specify wich mode needs to be used in singularity points
        SingArea \Wrist;
        ! Set acceleration values
        AccSet accvalue,acctime;
ENDPROC

Comments

  • dnilssondnilsson Gothenburg admin
    It's kind of hard to tell from this piece of code what actually happens. But here's a guess, one thing I notice is you use of 
    $ pulsedo \PLength:=0.3, c1RemAllPObj;
    This is a non blockin command so the program pointer will continue directly on rising edge. Which in this case might block c1remAllObj; during the 0.3 seconds it is triggered. So the command might excecute first at falling edge which would result in no values written for 0.3seconds until the pulse is done. By then the program pointer might have done the excecution call. 
    Then if init runs again after PP to main you are probably excecuting the values from previous run which I gues you could easily test out.
  • Geoffrey_BornyGeoffrey_Borny Roeselare
    Maybe I did mention the pp to main procedure a little bit wrong. 
    So if we do pp to main the object is lost and the conveyor position (c1position) turns back 0 again, because of the init routine. 
    If an new object passes the sensor the robot is executing the code like it should. So it is not performing the actions based on the previous run.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!