Japanese style spindle orient, how to?

More
04 Jan 2023 02:26 #260890 by JR1050
I am fascinated by your skill in hacking Yaskawa, you should share your info with Pete from Mesa, he maybe might could create some hard ware to interface to the digital drive signals on the newer drives. Well done!!

The orient position has to be pretty close, or it will grind away at the keys on the spindle and the key ways in the holders. As of now, other then using the original drive, which I just fixed, again....seems the best solution is using a combination of a sensor and an encoder. The new drive and Lcnc are gonna want encoder feedback and the motor has a resolver. Seems like it should go like this:
Command the spindle at 300 rpm
When it sees the sensor go hi, switch to 100 rpm( creep speed)
Set the encoder counter to 0
Count pulses until it hits the number of offset, which will be a trial and error guessing amount, . I’m thinking, turn spindle by hand till sensor goes hi, sets encoder to 0 , turn spindle again till sensor goes hi again, read pulse count. Make variable in INI for spindle_offset.
When pulse equals offset , turn spindle off. Slam braking on.

Machine has a 2 speed gear box, so there will have to be a piece of code to set the spindle output based on the location of the shift fork switch.

Trying to figure out how to read the analog voltage in and compensate for stop angle is beyond my patience, besides the resolver has to go with a new drive anyway.

Right now I have the original drive working, word to anyone who has a 626 Yaskawa spindle drive with OC , it blows the V channel of the firing board and wipes all the big darlington transistors in the H bridge. Replace EVERYTHING in the blown channel and all the big darlingtons, they can test good and still be NFG. If you do it exceptionally well and blow the dc buss fuse, it also kills the power supply on the firing board. There are a couple of videos on YouTube from a guy “ Pepaw McDonald” about these drives , this guy know his stuff.

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

More
06 Jan 2023 16:51 #261099 by blazini36
Everything you're trying to do is doable now in LinuxCNC. Looking at the "orient" hal component again it makes plenty of sense, it's just that it requires interfacing alot of other HAL components/logic.

Command the spindle at 300 rpm
 

Simple enough

When it sees the sensor go hi, switch to 100 rpm( creep speed) 

This is tricky, but if using the orient component you hijack the orient.N.command output pin to be selectable based on whether the sensor is high or low. I can't think of the correct component but it's a simlpe logic compnent and it's in there. Basically, sensor is low output is 300, high=100

Set the encoder counter to 0
Count pulses until it hits the number of offset, which will be a trial and error guessing amount, . I’m thinking, turn spindle by hand till sensor goes hi, sets encoder to 0 , turn spindle again till sensor goes hi again, read pulse count. Make variable in INI for spindle_offset.
When pulse equals offset , turn spindle off. Slam braking on.

This is all standard function of the mesa hm2 encoder module. Connect the "sensor" output hal pin to hm2.blah.index-enable. Basically  when the sensor is high, index-enable goes high. When the sensor goes low and drags index-enable low, the count is reset to 0. So basically all of your orient positioning is done once the spindle steps off of the sensor.

You just need to think about "counting pulses" a bit differently. LCNC isn't going to count pulses of a >16bit encoder that's gonna be on most servos, the masa card will but counts are.....not a great thing to work with. Instead the hm2 encoder will give you a position, you give that postion a scale so it is basically outputting degrees and now it makes sense and works with the orient component. So your toolchange position is 15.56 degrees from the sensor for example.

Machine has a 2 speed gear box, so there will have to be a piece of code to set the spindle output based on the location of the shift fork switc 

Not a big deal. I have no idea what other people around here do, I never see people mention it. I have this logic in my config as I said for my machine as it has a 2-speed belt drive. Both the speed and position are scaled based on what "gear" it's in. I wish I had some kind of sensor for my ratio but I just have a button on my GUI. the button or the sensor input work exacly the same.

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

Time to create page: 0.059 seconds
Powered by Kunena Forum