Unable to Reverse the Spindle

More
09 Mar 2012 20:10 #18484 by thebuc
Hey guys.

The new tap head i just bought needs me to reverse the spindle to come back out of the hole and not destroy the threads in one single code. Up until now, I assumed that when I originally coded the spindle in the HAL that i was able to go in reverse. Unfortunately that is not that case. After looking around for a few hours myself, testing a few things, and consulting the internet I come to you all for help again haha.
My spindle can't be reversed using the M4 command. M3 works just fine to go forward but then just stops when I ask it to go backwards.
I noticed in my hal file that the 'spindle-cw' is netted to the 'parport-16-out' and the 'spindle-ccw' is not attached to any parport pins. Instead 'spindle-ccw' just dead-ends after the or2 function.
So I figured, as a good test, I'd just rename the 'spindle-cw' to 'spindle-ccw' so spindle-ccw was connected to the parport instead. Luckily, and logically, enough that made the spindle go backwards when I used M3, but still nothing with M4 (I figured that would happen).
What i think I need is some logic that creates a new signal to send to parport-16 depending on if i want to use ccw or cw. I just don't know how to do it.
What I have in mind is something like:

If spindle-cw is true then newsignal=spindle-cw
If spindle-ccw is true then newsignal=spindle-ccw

and then

newsignal => parport.0.pin-16-out

Well I think that makes logical sense i just don't have any idea how to use If statements in the Hal file. Any one have any suggestions?
I have my Hal File attached. I have a Tormach pcnc 770 and I think I use EMC 2.2.8.

thanks everyone :)

File Attachment:

File Name: pcnc_1100.hal
File Size:6 KB
Attachments:

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

More
09 Mar 2012 20:47 #18485 by BigJohnT
My first question is what does your spindle drive expect to go fwd and rev?

John

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

More
09 Mar 2012 21:20 #18490 by thebuc
I'm not sure what you mean. It can go both ways. It probably expects to go clockwise i guess.

If you mean what tool do I need to go fwd and rev for; it is a tormach tension compression taping head
www.tormach.com/store/index.php?app=ecom&ns=prodshow&ref=31806
with a collet too
www.tormach.com/store/index.php?app=ecom...how&ref=TCTH-COLLETS

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

More
09 Mar 2012 21:22 #18491 by BigJohnT
No, what I mean is does it (the drive) have a CW input and a CCW input and a Speed input or does it use +-10v to determine direction?

John

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

More
09 Mar 2012 21:22 #18492 by cncbasher
could you use a single pole changeover relay to switch between cw & ccw , if the parallel port pin is high then it will be ccw or low it would be cw
depend if your vfd starts depending on direction pin or only on signal , but a second relay could be incorporated to cure that

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

More
09 Mar 2012 21:36 #18496 by thebuc
Hmm i don't know much about my drive. I think it only uses one pin for everything spindle related. I'll look around in the information I have and post back here if I find anything.

@cnc basher. What you say sounds good but how can I make a relay? Or how do I write that into the Hal.

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

Time to create page: 0.169 seconds
Powered by Kunena Forum