Tool Changer
All I did was cut and paste from the first page into gedit, but there must have been something there, because I just repeated the process and got a file exactly the same length, but this time it compiles!!!!!!!!!
I will check it loads and I can see the pins etc in a while, but have no reason to suspect that it won't.
The answer is often simple AFTER you have found it!
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Having got this working I was inspired to try to write my own component to suit my particular toolchanger. ( Boxford 240F)
It works well except for one thing, I cannot find find a way of connecting to stepgen.3.position-cmd
because it is already linked earlier in the .hal file (net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd).
The stepper rotating the ATC is notionally axis A which allows me to jog it and move it in gcode.
I can track the commanded and actual position through pins linkages to the component but can't find a way to set it
I also seem to recall that in M6 moves, all jogging and other axis movement at a higher level is suspended until M6 is complete, which presumably means the stepper can only be moved by directly accessing the stepgen.
Can you enlighten me as to how this is best achieved?
regards
PS
Think I have answered my own question
I unlinked stepgen.3.position-cmd and stepgen.3.position-fb from axis.3 and linked them to the relevant pins in my toolchanger component, which operated the ATC in simulation.
Looks like there can only be one source of position commands for an axis.
I could run a script which linked them back to axis.3 when manual control was required, or perhaps have 2 stepgens and switch between them, have to investigate further.
Please Log in or Create an account to join the conversation.
but now i got the set all the Inputs and outputs
someone know what is the best way to do it and can someone help me getting started with it
greetings Robin
Please Log in or Create an account to join the conversation.
Is your configuration from the StepConf Wizard?
Also read this short chapter on HAL.
www.linuxcnc.org/docview/html/hal_basic_hal.html
John
Please Log in or Create an account to join the conversation.
now i got to start to configure the toolchanger pins, but never did it before and quit hard for me but i'm going to try it with the help of the guide.
Robin
Please Log in or Create an account to join the conversation.
I would make one connection at a time then see if EMC loads to see if you have made a mistake.
John
Please Log in or Create an account to join the conversation.
loadrt toolchanger
addf toolchanger.0 servo-thread
net tool-change iocontrol.0.tool-change => toolchanger.0.toolchange-req
net tool-changed iocontrol.0.tool-changed <= toolchanger.0.toolchange-ack
net tool-number iocontrol.0.tool-prep-number => toolchanger.0.tool-number
net atc-index toolchanger.0.index <= parport.N.pin-N-in
net pos-cmd toolchanger.0.position-cmd => stepgen.N.position-cmd
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
You will need to specify which stepgen and which parport and pin the index signal is on
you also may need to change some of the default params on the fly to get the desired result
eg setp toolchanger.0.windback 4 if it doesn't go back enough
then you can put them in the comp when resolved
Read the manual on iocontrol and stepgen and the hal linkages should become clearer
regards
Please Log in or Create an account to join the conversation.
This would be a slightly odd way to do it. If the default value of a paramete ris not correct, then the normal solution is to have a setp command in the HAL file.you also may need to change some of the default params on the fly to get the desired result
eg setp toolchanger.0.windback 4 if it doesn't go back enough
then you can put them in the comp when resolved
If you want to be extra-neat then you could add a [TOOLCHANGER] section to your INI file, like this:
[TOOLCHANGER]
WINDBACK=4
And then have a setp command in the HAL file:
setp toolchanger.0.windback [TOOLCHANGER]WINDBACK
But I would probably just put setp toolchanger.0.windback = 4 in the HAL file after the loadrt toolchanger line.
Please Log in or Create an account to join the conversation.