Hello Everyone,
I'm monitoring the actual base with the $ACT_BASE variable while running a program and I noticed that the base value is not changing to base 1 as supposed but the variable monitor shows 0 (I've set the continuous update of the monitor with the shift+enter). Here is my code, I do not see what is wrong. Can you help me with this?
Very Best,
Marco
Code
DEF BCT_A()
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0)
$LOAD=LOAD_DATA[1]
$BASE=BASE_DATA[1]
$TOOL=TOOL_DATA[2]
HSD_LOGIC_SET=5
$OUT[13] = FALSE
HSD_SPEED_SET=0
$TIMER[10] = -10000
$TIMER_STOP[10] = FALSE
WHILE NOT $TIMER_FLAG[10]
ENDWHILE
$VEL_AXIS[1]=15
$VEL_AXIS[2]=15
$VEL_AXIS[3]=15
$VEL_AXIS[4]=15
$VEL_AXIS[5]=15
$VEL_AXIS[6]=15
$ACC_AXIS[1]=70
$ACC_AXIS[2]=70
$ACC_AXIS[3]=70
$ACC_AXIS[4]=70
$ACC_AXIS[5]=70
$ACC_AXIS[6]=70
$VEL.CP=0.167
$ACC.CP=2.3
$VEL.ORI1=200
$VEL.ORI2=200
$ACC.ORI1=100
$ACC.ORI2=100
$advance=5
$APO.CDIS=0.2
PTP $POS_ACT
$VEL.CP=0.167
PTP {A1 46.934, A2 -35.843, A3 121.072, A4 0.105, A5 -85.313, A6 -0.016, E1 0, E2 0, E3 0, E4 0, E5 0, E6 0}
LIN {X -0.188, Y 0.03, Z 100, A 133.204, B 0.086, C 179.933} C_DIS
$VEL.CP=0.008
LIN {X -0.038, Y 0.006, Z 20, A 133.204, B 0.086, C 179.933} C_DIS
LIN {X 1499.959, Y 0.871, Z 22.828, A 152.602, B 0.104, C 179.965} C_DIS
$VEL.CP=0.167
LIN {X 1499.809, Y 0.895, Z 102.827, A 152.602, B 0.104, C 179.965} C_DIS
HSD_SPEED_SET=0
$TIMER[10] = -10000
$TIMER_STOP[10] = FALSE
WHILE NOT $TIMER_FLAG[10]
ENDWHILE
PTP {A1 0.000, A2 -100.000, A3 120.000, A4 0.000, A5 -20.000, A6 0.000, E1 0, E2 0, E3 0, E4 0, E5 0, E6 0}
END
Display More
I'm running the program above through this program
Code
DEF alo_processing_cam_A( )
; --- DECLARATIONS ---
DECL INT s,a
s = 10
a = 70
; --- INITIALIZATION
$base = $world
$tool = TOOL_DATA[1]
$load = LOAD_DATA[1]
$vel_axis[1]=s
$vel_axis[2]=s
$vel_axis[3]=s
$vel_axis[4]=s
$vel_axis[5]=s
$vel_axis[6]=s
$acc_axis[1]=a
$acc_axis[2]=a
$acc_axis[3]=a
$acc_axis[4]=a
$acc_axis[5]=a
$acc_axis[6]=a
;$vel.cp = 2
;$vel.ori1 = 0.3
;$vel.ori2 = 0.3
;$acc.ori1 = 2
;$acc.ori2 = 2
;$advance = 2
$OUT[6] = TRUE
$OUT[7] = FALSE
; --- MAIN
$OUT[9] = TRUE ;com led on
WAIT FOR HSD_SPEED_IN < 50
PTP $POS_ACT
;LIN_REL {Z 100}
PTP XHOME
$OUT[9]=FALSE ;com led off
; specify interrupt level and program name to call
; when PAUSE button is pressed... (wired to $IN[7])
INTERRUPT DECL 10 WHEN $OUT[7] DO MoveAway()
;activate interrupt
INTERRUPT ON 10
;enable fieldbus reference values for HSD
$OUT[10] = TRUE
; pick tool
; PT0101()
; call CAM program to execute
BCT_A()
; release tool
; RT0101()
; after milling program is finished, deactivate interrupt...
INTERRUPT OFF 10
HSD_LOGIC_SET = 5
HSD_sPEED_SET = 0
HSD_LOGIC_SET = 0
$OUT[9] = TRUE
WAIT FOR HSD_SPEED_IN < 50
PTP XHOME
$OUT[9] = FALSE
$OUT[6] = FALSE
$OUT[10] = FALSE
END
DEF MoveAway()
BRAKE ; need to pause current robot motion
$OUT[10] = FALSE ;fieldbus reference values
$VEL.CP = 0.005
$ACC.CP = 0.01
LIN_REL {Z 50} ; move robot up
$TIMER[12] = -10000
$TIMER_STOP[12] = FALSE
WHILE NOT $TIMER_FLAG[12]
ENDWHILE
WAIT FOR NOT $OUT[7] ; wait until PAUSE is released
$OUT[10] = TRUE ;fieldbus reference values
$TIMER[13] = -10000
$TIMER_STOP[13] = FALSE
WHILE NOT $TIMER_FLAG[13]
ENDWHILE
LIN $POS_RET ; return to last position to resume work
END
Display More