RobotStudio event

explaine this routine ?

hello All 
I didn't understand how nPartside change( how he take value (1.2.3.4.5.6.7.8and9)because we didn't use instruction incr ?)or how this routine work ?

PROC rCalcTablePos(num nPartSide)
 TEST nPartSide
 CASE 1,2,3:
   pApproachSide1.extax.eax_a:=85;
   pSide1.extax.eax_a:=85;
   pApproachSide2.extax.eax_a:=85;
   pSide2.extax.eax_a:=85;
   pApproachSide3.extax.eax_a:=85;
   pSide3.extax.eax_a:=85;        
 CASE 4,5,6:
   pApproachSide1.extax.eax_a:=156;
   pSide1.extax.eax_a:=156;
   pApproachSide2.extax.eax_a:=156;
   pSide2.extax.eax_a:=156;
   pApproachSide3.extax.eax_a:=156;
   pSide3.extax.eax_a:=156;        
 CASE 7,8,9:
   pApproachSide1.extax.eax_a:=300;
   pSide1.extax.eax_a:=300;
   pApproachSide2.extax.eax_a:=300;
   pSide2.extax.eax_a:=300;
   pApproachSide3.extax.eax_a:=300;
   pSide3.extax.eax_a:=300;        
 DEFAULT:
   EXIT;
 ENDTEST 

Comments

  • Hi this is a routine that you call from somewhere else like this

    rCalcTablePos 5; ! Will call the routine and execute case statment 4,5,6
    Per Svensson
    Robotics and Vision Specialist
    Consat Engineering
  • thank you  PerSvensson