Re: New DMM Servo install
Posted: Thu Oct 01, 2020 1:34 pm
Ok i think I can easily rewire this and add a contactor. Im using DMM drives.. can I just do the power estop to turn off power to just L1 and L2?
I have a two pole e-stop. One pole switches the e-stop input to acorn. The other is in the coil circuit of the e-stop contractor. The e-stop contactor switches the DYN4 drive motor power. When e-stop switch is pressed both things happen at the same time: motor power is cut and Acorn receives an e-stop input.
IN1 = X axis home/limit
Code: Select all
N100 ;Check for an open home switch
;First axis minus and plus
IF #21301 == 0 THEN #111 = 9 ELSE #111 = #21301
IF #21401 == 0 THEN #112 = 9 ELSE #112 = #21401
IF [#20101 != 78] && [#21301 != 0] && !#[50000 + [#111]] THEN M225 #100 "X Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing";
IF [#20101 != 78] && [#21401 != 0] && !#[50000 + [#112]] THEN M225 #100 "X Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20101 != 78] && [#21301 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1
IF [#20101 != 78] && [#21401 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1
;Second axis minus and plus
IF #21302 == 0 THEN #111 = 9 ELSE #111 = #21302
IF #21402 == 0 THEN #112 = 9 ELSE #112 = #21402
IF [#20102 != 78] && [#21302 != 0] && !#[50000 + [#111]] THEN M225 #100 "Y Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20102 != 78] && [#21402 != 0] && !#[50000 + [#112]] THEN M225 #100 "Y Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20102 != 78] && [#21302 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1
IF [#20102 != 78] && [#21402 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1
;Third axis minus and plus
IF #21303 == 0 THEN #111 = 9 ELSE #111 = #21303
IF #21403 == 0 THEN #112 = 9 ELSE #112 = #21403
IF [#20103 != 78] && [#21303 != 0] && !#[50000 + [#111]] THEN M225 #100 "Z Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20103 != 78] && [#21403 != 0] && !#[50000 + [#112]] THEN M225 #100 "Z Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20103 != 78] && [#21303 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1
IF [#20103 != 78] && [#21403 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1
;Fourth axis minus and plus
;IF #21304 == 0 THEN #111 = 9 ELSE #111 = #21304
;IF #21404 == 0 THEN #112 = 9 ELSE #112 = #21404
;IF [#20104 != 78] && [#21304 != 0] && !#[50000 + [#111]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
;IF [#20104 != 78] && [#21404 != 0] && !#[50000 + [#112]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
;IF [#20104 != 78] && [#21304 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1
;IF [#20104 != 78] && [#21404 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1
;IF #101 != 0 THEN GOTO 100
M106 /Z P3 F10 ;Move Z plus at 10 in/m until input 3 opens
M105 /Z P-3 F.5 ;Back Z off Switch
M105 /Z P-4 F.1 ;Move Z minus at 1 in/m until input 4 closes
G4P1
M26 /Z ;Set Z home here
M105 /Z P4 F1 ;Back off ZRI for the next axis
M105 /Y P2 F10
M106 /Y P-2 F.5
M106 /Y P-4 F.1
G4P1
M26 /Y
M106 /Y P4 F1 ;Back off ZRI for the next axis
M105 /X P1 F10
M106 /X P-1 F.5
M106 /X P-4 F.1
G4P1
M26 /X
M106 /X P4 F1 ;Back off ZRI for the next axis
;g53 x1 y1
;g53 x15 y10.5 f50
N1000 ;END
It appears that you have to use the estopOK as an input in centroid. The utility wizard will not save without it being setup. Am I missing something? I rewired the drives to a separate contactor and went to change acorn and then found out about this.slodat wrote: ↑Thu Oct 01, 2020 1:54 pmI have a two pole e-stop. One pole switches the e-stop input to acorn. The other is in the coil circuit of the e-stop contractor. The e-stop contactor switches the DYN4 drive motor power. When e-stop switch is pressed both things happen at the same time: motor power is cut and Acorn receives an e-stop input.
Can I just use the end of your homing code with the zri to open up a few inputs and wire the ZRI inputs in parallel? I would need to look over the code and compare it with mine to make sure the travels are going in the right direction. Also i have my z homing setup to drop my head down. 25" to keep the driver from faulting out. I am using one of the inputs as homeall instead of each individual home call outs. Does this change anything?slodat wrote: ↑Thu Oct 01, 2020 2:44 pmIN1 = X axis home/limit
IN2 = Y axis home/limit
IN3 = Z axis home/limit
IN4 = ZRI input. All axis in parallel
Code: Select all
N100 ;Check for an open home switch ;First axis minus and plus IF #21301 == 0 THEN #111 = 9 ELSE #111 = #21301 IF #21401 == 0 THEN #112 = 9 ELSE #112 = #21401 IF [#20101 != 78] && [#21301 != 0] && !#[50000 + [#111]] THEN M225 #100 "X Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"; IF [#20101 != 78] && [#21401 != 0] && !#[50000 + [#112]] THEN M225 #100 "X Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing" IF [#20101 != 78] && [#21301 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1 IF [#20101 != 78] && [#21401 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1 ;Second axis minus and plus IF #21302 == 0 THEN #111 = 9 ELSE #111 = #21302 IF #21402 == 0 THEN #112 = 9 ELSE #112 = #21402 IF [#20102 != 78] && [#21302 != 0] && !#[50000 + [#111]] THEN M225 #100 "Y Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing" IF [#20102 != 78] && [#21402 != 0] && !#[50000 + [#112]] THEN M225 #100 "Y Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing" IF [#20102 != 78] && [#21302 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1 IF [#20102 != 78] && [#21402 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1 ;Third axis minus and plus IF #21303 == 0 THEN #111 = 9 ELSE #111 = #21303 IF #21403 == 0 THEN #112 = 9 ELSE #112 = #21403 IF [#20103 != 78] && [#21303 != 0] && !#[50000 + [#111]] THEN M225 #100 "Z Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing" IF [#20103 != 78] && [#21403 != 0] && !#[50000 + [#112]] THEN M225 #100 "Z Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing" IF [#20103 != 78] && [#21303 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1 IF [#20103 != 78] && [#21403 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1 ;Fourth axis minus and plus ;IF #21304 == 0 THEN #111 = 9 ELSE #111 = #21304 ;IF #21404 == 0 THEN #112 = 9 ELSE #112 = #21404 ;IF [#20104 != 78] && [#21304 != 0] && !#[50000 + [#111]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing" ;IF [#20104 != 78] && [#21404 != 0] && !#[50000 + [#112]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing" ;IF [#20104 != 78] && [#21304 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1 ;IF [#20104 != 78] && [#21404 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1 ;IF #101 != 0 THEN GOTO 100 M106 /Z P3 F10 ;Move Z plus at 10 in/m until input 3 opens M105 /Z P-3 F.5 ;Back Z off Switch M105 /Z P-4 F.1 ;Move Z minus at 1 in/m until input 4 closes G4P1 M26 /Z ;Set Z home here M105 /Z P4 F1 ;Back off ZRI for the next axis M105 /Y P2 F10 M106 /Y P-2 F.5 M106 /Y P-4 F.1 G4P1 M26 /Y M106 /Y P4 F1 ;Back off ZRI for the next axis M105 /X P1 F10 M106 /X P-1 F.5 M106 /X P-4 F.1 G4P1 M26 /X M106 /X P4 F1 ;Back off ZRI for the next axis ;g53 x1 y1 ;g53 x15 y10.5 f50 N1000 ;END