Setting up a tool changer
09 Apr 2012 21:09 - 09 Apr 2012 21:11 #19060
by fferraz
Replied by fferraz on topic Re:Setting up a tool changer
Also, is it right to think my new logic (with the counter) would be this:
if tool change is true turn on parallel pin 16
if tool change is true preset counter 1 with tool-prep-number
if tool change is true start timer 1 (preset 50ms)
if timer 1 is on turn on parallel pin 17
if timer 1 is done
and counter is done
and parallel pin 10 is on return tool change done
if timer 1 is done and counter is not done reset timer 1
Last edit: 09 Apr 2012 21:11 by fferraz.
Please Log in or Create an account to join the conversation.
09 Apr 2012 23:31 #19072
by BigJohnT
Replied by BigJohnT on topic Re:Setting up a tool changer
You will have to write the value into the preset with an assignment block.
linuxcnc.org/docview/html/ladder/classic..._variable_assignment
linuxcnc.org/docview/html/ladder/classic_ladder.html#_counters
John
linuxcnc.org/docview/html/ladder/classic..._variable_assignment
linuxcnc.org/docview/html/ladder/classic_ladder.html#_counters
John
Please Log in or Create an account to join the conversation.
10 Apr 2012 13:35 - 10 Apr 2012 13:36 #19092
by fferraz
Replied by fferraz on topic Re:Setting up a tool changer
Nice... BigJohn, I've completed my first attempt at making this work, but, of course, it's still not working! ![:P :P](/media/kunena/emoticons/tongue.png)
What I'd like you to do, if it's not asking much, is take a look at my .clp file to see if my logic is correct, or what I need to change. Remember that I'm a total virgin when speaking of ladder so I may have committed some ridiculous mistakes hehehe.
I'm attaching the file here . Also I think you should know my custom.hal file now has this:
Tell me if you need any more info.
Thanks again!
![:P :P](/media/kunena/emoticons/tongue.png)
What I'd like you to do, if it's not asking much, is take a look at my .clp file to see if my logic is correct, or what I need to change. Remember that I'm a total virgin when speaking of ladder so I may have committed some ridiculous mistakes hehehe.
I'm attaching the file here . Also I think you should know my custom.hal file now has this:
net tool-cng-req iocontrol.0.tool-change => classicladder.0.in-01
net tool-prep-number iocontrol.0.tool-prep-number => classicladder.0.s32in-01
net tool-cn-done iocontrol.0.tool-changed <= classicladder.0.out-01
net enable-tool-change classicladder.0.out-02 => parport.0.pin-16-out
net pulse-bit classicladder.0.out-03 => parport.0.pin-17-out
net tool-changed-bit classicladder.0.in-02 <= parport.0.pin-10-in
Tell me if you need any more info.
Thanks again!
Last edit: 10 Apr 2012 13:36 by fferraz.
Please Log in or Create an account to join the conversation.
10 Apr 2012 13:57 #19094
by BigJohnT
Replied by BigJohnT on topic Re:Setting up a tool changer
I don't see anything that jumps out at me except when I try and run it I see tool prepare bit come on but I don't see tool change come on. If I get a chance today I'll open my ladder up and see. Also if you go to the Symbol names and click on the middle column and you can put a short name in there so it shows up instead of the %I1 stuff. Also open up the ladder editor and set a watch window in show hal config for the pins to see what they do when you try and do a tool change. Of course I can't run your config without the inputs...
John
John
Please Log in or Create an account to join the conversation.
10 Apr 2012 15:01 #19098
by BigJohnT
Replied by BigJohnT on topic Re:Setting up a tool changer
Because I have no need for tool prep I just pass it through with this line. Otherwise it just waits for tool prepared to go true.
John
net tool-prep-loop iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
John
Please Log in or Create an account to join the conversation.
29 May 2012 16:33 #20484
by fferraz
Replied by fferraz on topic Re:Setting up a tool changer
FINALLY DONE!! ![B) B)](/media/kunena/emoticons/cool.png)
I'd like to thanks andypugh and BigJohnT for the HUUUGE help on this topic.
After so much time, the ladder and HAL logic are finally all perfect for what I need. I'm now just finishing the last tweeks on my machine so that I can finally start using it at full power, but I can now say that LinuxCNC is doing everything I need.
I'll attach my clp file to be available to anyone who may need them, to actual use or just as examples.
Also my custom.hal file is the following now:
p.s.: One last question: every time I have to change something in stepconf, it creates 2 lines in my hal file:And since I'm using those signals in my custom.hal, I have to always go and comment those lines. Is there anyway that those lines are not created?
Thanks again!!
FELIPE
![B) B)](/media/kunena/emoticons/cool.png)
I'd like to thanks andypugh and BigJohnT for the HUUUGE help on this topic.
After so much time, the ladder and HAL logic are finally all perfect for what I need. I'm now just finishing the last tweeks on my machine so that I can finally start using it at full power, but I can now say that LinuxCNC is doing everything I need.
I'll attach my clp file to be available to anyone who may need them, to actual use or just as examples.
Also my custom.hal file is the following now:
net tool-change iocontrol.0.tool-change => classicladder.0.in-01
net tool-number iocontrol.0.tool-prep-number => classicladder.0.s32in-01
net enable-tool-change classicladder.0.out-01 => parport.0.pin-16-out
net pulse-bit classicladder.0.out-02 => parport.0.pin-17-out
net tool-changed-bit classicladder.0.in-02 <= parport.0.pin-15-in
net tool-cn-done classicladder.0.out-03 => iocontrol.0.tool-changed
p.s.: One last question: every time I have to change something in stepconf, it creates 2 lines in my hal file:
net tool-number <= iocontrol.0.tool-prep-number
net tool-change-loopback iocontrol.0.tool-change => iocontrol.0.tool-changed
Thanks again!!
FELIPE
Please Log in or Create an account to join the conversation.
29 May 2012 19:32 #20492
by BigJohnT
Replied by BigJohnT on topic Re:Setting up a tool changer
fferraz wrote:
Yes, quit using stepconf as you have progressed past that by now if your hand editing your configuration files. Stepconf is only meant to give new users a jump start.
John
p.s.: One last question: every time I have to change something in stepconf, it creates 2 lines in my hal file:
And since I'm using those signals in my custom.hal, I have to always go and comment those lines. Is there anyway that those lines are not created?net tool-number <= iocontrol.0.tool-prep-number net tool-change-loopback iocontrol.0.tool-change => iocontrol.0.tool-changed
Thanks again!!
FELIPE
Yes, quit using stepconf as you have progressed past that by now if your hand editing your configuration files. Stepconf is only meant to give new users a jump start.
John
Please Log in or Create an account to join the conversation.
29 May 2012 19:39 #20493
by andypugh
Replied by andypugh on topic Re:Setting up a tool changer
fferraz wrote:
[quotep.s.: One last question: every time I have to change something in stepconf, it creates 2 lines in my hal file:And since I'm using those signals in my custom.hal, I have to always go and comment those lines. Is there anyway that those lines are not created?
[/quote]Whilst I largely agree with John that you should now stop using Stepconf, if you putat the beginning of your custom.hal then you can redefine and reconnect everything.
[quotep.s.: One last question: every time I have to change something in stepconf, it creates 2 lines in my hal file:
net tool-number <= iocontrol.0.tool-prep-number
net tool-change-loopback iocontrol.0.tool-change => iocontrol.0.tool-changed
[/quote]Whilst I largely agree with John that you should now stop using Stepconf, if you put
delsig rool-number
delsig tool-change-loopback
Please Log in or Create an account to join the conversation.
Time to create page: 0.157 seconds