Boxford Toolchanger WITH Index -need help-

More
27 Oct 2022 22:21 #255253 by hitchhiker
ok.. now i can home the a axis when the boxford toolchanger is comment complete out.

after homing.. closing linuxcnc.. i activate the uncomment boxford toolchanger... start linuxcnc.. works complete perfect.

now i must bring this together....

some idea?

Please Log in or Create an account to join the conversation.

More
27 Oct 2022 23:59 #255262 by andypugh
Have you added the HAL that I suggested? If so then you should be able to home the A axis _and_ use the component.

Please Log in or Create an account to join the conversation.

More
28 Oct 2022 15:35 - 28 Oct 2022 15:38 #255304 by hitchhiker
andypugh post=255299 userid=723

ANDY SAYS :

To set the tool number to 1 (probably using M61) you would want to trigger on joint.2.is-homed (ie, once the A axis homing is complete)

One possible way to do this is with an MDI_COMMAND:
linuxcnc.org/docs/stable/html/config/ini....html#_halui_section

In the INI
[HAL]
HALUI = halui

[HALUI]
MDI_COMMAND = M61 Q1 G43

In a HAL file:
net changer-homed joint.2.is-homed => halui.mdi-command-00
Last edit: 28 Oct 2022 15:38 by hitchhiker.

Please Log in or Create an account to join the conversation.

More
28 Oct 2022 15:53 #255307 by hitchhiker

Do you have the boxford.comp working?

If so, try to merge this into your HAL.

loadrt sum2
addf sum2.0 servo-thread
net A-cmd joint.2.motor-pos-cmd joint.2.motor-pos-fb sum2.0.in0
net T-cmd toolchanger.position_cmd sum2.0.in1
net S-cmd sum2.0.out stepgen.2.position-cmd


That should leave the A-axis homing normally as part of the home sequence and still allow the component to control it for tool changes.


 

can you please explain what this do?! i want to understand please

Please Log in or Create an account to join the conversation.

More
28 Oct 2022 16:47 #255311 by hitchhiker
#################
#  ATC
#################
#### SUM2 #####
#loadrt sum2
#addf sum2.0 servo-thread
#net A-cmd joint.2.motor-pos-cmd joint.2.motor-pos-fb sum2.0.in0
#net T-cmd toolchanger.position_cmd sum2.0.in1
#net S-cmd sum2.0.out stepgen.2.position-cmd
####A-Axis Setup####
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 5000
setp stepgen.2.dirsetup 5000
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net astep <= stepgen.2.step
net adir <= stepgen.2.dir
net aenable joint.2.amp-enable-out => stepgen.2.enable
net apos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
net apos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
net home-a => joint.2.home-sw-in
####Set Toolnumber to 1 after Homing####
net ahomed joint.2.homed halui.mdi-command-00






####Toolchanger Component####





##########################################################
#  example Hal linkages required:-
##########################################################

setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 16000
setp stepgen.2.dirsetup 31000
        ## make sure accel and velocity are sensibly low or it will take off!
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
        ### must unlink these 2 to access stepgen.3.position-cmd
        ### and prevent continual following errors if motor-pos-fb left linked
#net apos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
#net apos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
net astep <= stepgen.2.step
net adir <= stepgen.2.dir
net aenable joint.2.amp-enable-out => stepgen.2.enable

###########################################################
# loading the toolchange component in .hal file
###########################################################

loadrt toolchanger
addf toolchanger servo-thread

net tool-change iocontrol.0.tool-change => toolchanger.toolchange
net tool-changed iocontrol.0.tool-changed <= toolchanger.toolchanged
net tool-number iocontrol.0.tool-prep-number => toolchanger.toolnumber
net tool-oldnumber iocontrol.0.tool-number => toolchanger.currenttoolnumber
net apos-cmd toolchanger.position-cmd => stepgen.2.position-cmd
net ahomed joint.2.homed => toolchanger.ishomed
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

################################################################################






can someone bring me this together... i dont understand what is A-CMD T-CMD and S-CMD..... please help....

Please Log in or Create an account to join the conversation.

More
28 Oct 2022 17:22 #255314 by andypugh
The signal names can be anything you want, I just chose A-cmd, T-Cmd and S-Cmd as that made sense to me.

A-Cmd is the signal from the motion controller, used for homing (and jogging, potentially, but it's probably best not to)
T-cmd is the commanded position from the boxford component.
S-cmd is the sum of the two commands, which is passed on to the step generator so that both the A axis and the comonent can rotate the motor.

Please Log in or Create an account to join the conversation.

More
28 Oct 2022 17:33 #255317 by hitchhiker
ok that is whst i was thinking ok... but i get every try errors when i start linuxcnc :((( could you throw a look at my posted hal above please...

Please Log in or Create an account to join the conversation.

More
28 Oct 2022 17:55 #255320 by andypugh
Try replacing that section above with this
#################
#  ATC
#################
####Toolchanger Component####
loadrt toolchanger
addf toolchanger servo-thread

#### SUM2 #####
loadrt sum2
addf sum2.0 servo-thread

####A-Axis Setup####
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 5000
setp stepgen.2.dirsetup 5000
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net astep <= stepgen.2.step
net adir <= stepgen.2.dir
net aenable joint.2.amp-enable-out => stepgen.2.enable
net home-a => joint.2.home-sw-in

####Set Toolnumber to 1 after Homing####
net ahomed joint.2.homed halui.mdi-command-00 toolchanger.ishomed


net tool-change iocontrol.0.tool-change => toolchanger.toolchange
net tool-changed iocontrol.0.tool-changed <= toolchanger.toolchanged
net tool-number iocontrol.0.tool-prep-number => toolchanger.toolnumber
net tool-oldnumber iocontrol.0.tool-number => toolchanger.currenttoolnumber
net A-cmd joint.2.motor-pos-cmd joint.2.motor-pos-fb sum2.0.in0
net T-cmd toolchanger.position_cmd sum2.0.in1
net S-cmd sum2.0.out stepgen.2.position-cmd

net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

################################################################################

Please Log in or Create an account to join the conversation.

More
28 Oct 2022 22:55 #255348 by hitchhiker
yes it works!!!!

but the toolchange doesnt work correct.. foward and backward must be switched...

but now i can home the turret,lock it and set tool 1 active.

now i had to learn understand the commands inside the comp.....
in some days it should work :) great!


thanks!

Please Log in or Create an account to join the conversation.

More
28 Oct 2022 23:20 #255354 by andypugh

but the toolchange doesnt work correct.. foward and backward must be switched...


Just change the stepgen scale to be negative.

But! If you do that you also need to change the sign of the homing velocities.

Please Log in or Create an account to join the conversation.

Time to create page: 0.375 seconds
Powered by Kunena Forum