Controlling spindle speed on an old Mazak lathe

More
15 Jun 2018 14:08 #112405 by simonmn
Hello

I recently purchased an old Mazak cnc lathe, what was already converted somewhat to linuxcnc.
The old owner managed to connect motors, spindle cw and ccw, but was planning on running alot of the controlls though the old physical buttons on the operator controller. Which means he connected the spindel through a PLC system he had mounted in the electrical cabinet.

I wish to run the machine as automatic as I can get it. With everything through M and G codes.

My job is a machinist, so the "running a cnc machine" part is not a problem, but the linux environment is far from my strong side, so I might sound a little dumb when it comes to my questions :silly:

so my question(s)
When I run stepconfig. and get to the spindle part, what do I do?
When I enable a pin for PWM, and enter 0 PWN rate field to enable PDM mode, I don't really know what to do next.
I already have the analog scale value for my VFD from the formula given on the spindle control page. But I don't know where to insert the given code. Then I just insert it somewhere that seems appropriate, it just begins to spit out errors.
Might be a little vague i know, but just ask for what you need to know.

I have one of those eBay 5 axis cnc controllers, which has a couple of pins made for sending an analog signal. I have wired up some wires to them, but nothings really happens when I try run the spindle with ex. S500 m3. Measureing with a multimeter doesn’t show any real voltage, so I guess its HAL related?

I will link my hal file for you to check out.

I Really hope you guys can help me
Thank you
Simon
Attachments:

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

More
19 Jun 2018 14:29 #112580 by andypugh
That looks like quite a big machine to be running with step/dir and the parallel port.

I would have expected stepconf to do most of the work for you. Have you designated a spindle pwm pin on the correct parallel port pin to suit the BoB?

What you have added to the HAL already is a somewhat outmoded way of doing it, does not include the necessary PWM generator and attempts to output the PWM on the same pin as is being used for e-stop-out a few lines later (probably the error that you are seeing)

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

More
14 Oct 2018 09:17 #118763 by simonmn
Sorry for the very late reply.

Ended up buying a PWM to Analog converter instead, just to get the spindle up and running, which it did (With some scaling issues)
The machine originally had servos, but where properly salvaged and replaces by steppers, hence the reason I used the parallel port BoB

I have since purchased a Mesa 7i76e sted/dir card, but are having some issues with latency. But this is most likely the wrong thread for that.
The 7i76e handles spindle control much like the old NC unit, by acting like a potentiality with a supplied 10v source signal. Hope i'll have a little more success using that instead the eBay board.

Thank you for the answer, and sorry again for the late reply.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum