Schaublin 125-CNC retrofit.

More
3 years 2 months ago #277369 by RotarySMP
Replied by RotarySMP on topic Schaublin 125-CNC retrofit.
This Maho is a Schaublin :) It is a little baby 3Ph motor. Very cute.

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

More
3 years 2 months ago #277395 by rodw
Replied by rodw on topic Schaublin 125-CNC retrofit.

I appreciate your offer thanks, I will see if I can acheive what I am thinking in ClassicLadder, but if that is beyond my ability (highly likely), I will take you up on that.
Since there is so much overlap in control authority between the variator and VFD, I should only need very rough speed control over the variator. So rough, that if I use open loop, timed dead reckoning between 4 "gear ratio's", that should be plenty adequate to cover the entire range without gaps. Basically the idea would be an "8 speed gearbox" (Variator plus backgear), and the VFD running closed loop over the top.
Adding a stepper would be a lot of work, and would seem a pretty big step down from the high quality Schaublin Variator drive.

Have not been following along but here is a rough component for  a gearbox that may help.  Its based on a 2 belt gearbox and I used a digital tacho to measure the ratios. There is a matching panel I wrote (with massive help from Chris) which is part of qtdragon examples as there is no way to sense which gear it is in. now.  linuxcnc.org/docs/2.9/html/gui/qtdragon....ed_custom_vcp_panels

 
Attachments:
The following user(s) said Thank You: RotarySMP

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

More
3 years 2 months ago - 3 years 2 months ago #277411 by RotarySMP
Replied by RotarySMP on topic Schaublin 125-CNC retrofit.
Thanks Rod. That is really helpful, as I have never seen a comp small and simple enough for me to able to (sort of) follow it.
Looking at these lines.

pin in float max_freq = 150 "Maximum Frequency in top gear";
pin in float max_rpm = 6300 "maximim RPM in top gear";
pin in bit belt1 " Belt 1";
pin in bit belt2 " Belt 2";
pin in bit belt3 " Belt 3";
pin in bit belt4 " Belt 4";
pin in bit belt5 " Belt 5";
pin in bit belt6 " Belt 6";
pin in bit belt7 " Belt 7";
pin in bit belt8 " Belt 8";
pin out float this_max_rpm "maximim RPM in top gear after adjustment";
pin out float multiplier "multiplier value";
pin in float speed_cmd_in "spindle speed command from motion";
pin out float speed_cmd_out "Scaled Spindle speed command to VFD";
pin in float speed_fb_in "Spindle speed fb from VFD";
pin out float speed_fb_out "Scaled Spindle speed fb to motion";
pin out unsigned l_gear "Low Gear";
pin out unsigned h_gear "high Gear";
pin out bit valid " Gear is valid" ;
//belt ratio array [front,back] Hardcoded from tacometer readings


So you compile the comp with a name like  "belts", then loadrt, and addf it, and then net into the comp created 19 input and output HAL pins,  called "belts.0.speed_cmd_in"  etc. Is that right?
Could you please post the HAL showing how you netted the belts.comp  HAL pins into the core spindle control components please? Its not clear to me what you would need all the belts.0.belt-[1-8] pins for. Could one not use a single pin to pass an integer?

My goal is to (if possible) implement this is in classic ladder. I am quite enjoying learning that system. Plan B will be to do it in a Comp.

This is my first attempt to flow chart my control loops.
The back gear can only be switched with the spindle stationary, and the variator only with a running spindle. Like  your COMP, I would define a look up table defining the speed ranges which correspond to each ratio, the back gear is set before spindle start, and then the variator set on the fly each time the speed crosses the range boundary.
 The VFD will be set up as closed loop around this. Since the VFD is faster to change speed than the variator, and having it's own wide speed control range, I will attempt that their is no connection between Variator and VFD. Just commanding variator shifts at appropriate speed points, and the VFD compensating automatically during the shift process.

 
It is possible for the the OUTPUT_SCALE value to the spindle be overwritten by Classic ladder based on current gear ratio? I hope this question will be answered when I see how Rod uses his belts.0.speed_cmd_out and belts.0.speed_fb_out in his hal.
Cheers,
Mark
 
Last edit: 3 years 2 months ago by RotarySMP.

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

More
3 years 2 months ago #277415 by rodw
Replied by rodw on topic Schaublin 125-CNC retrofit.
The hal file looks something like the attached.
I got a feeling I am missing a signal as this does not use the feedback pin which is required somewhere but I am not a work to check it out.
You'll see its the inverse of the scale. I think its required to scale the on screen spindle speed.
So in summary at full speed with the VFD cranked up to 150 Hz, in top gear it does 6300 RPM (scale = 1.0)
So this is the range we send to the VFD (via RS485). We need to scale the gearbox so the speed is displayed.
So belts 1-4 are the front belts and 5-8 are the back belts (think of a drill press)
Thats why I have a 2 dimensional array. You could use a single array.
So if the belts are set to 3 & 8 the output (from the data) is 0.497218 (eg top speed = 6300 *0.497218 = 3132 RPM)
 I did give some thought to making it a bit more user friendly by allowing the scaling values to be set by parameters but couldn't be  stuffed)

I've never used classic ladder. I just do things in custom components
The best bet would be to run up a qtdragon sim, install the panel and install my component and have a play. Assuming a Deb install its
sudo halcompile --install scalebelts.comp
You need to have the linuxcnc-uspace-dev package installed.
if its RIP config drop the sudo.
I did not go back through your thread but if I knew your back gear ratios and how the varister works I might have time to modify this.
Attachments:
The following user(s) said Thank You: RotarySMP

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

More
3 years 2 months ago - 3 years 2 months ago #277419 by RotarySMP
Replied by RotarySMP on topic Schaublin 125-CNC retrofit.
Thanks a lot Rod. So you set your belts manually, and this comp is the interface for you to tell LCNC what is set, with a single button. Is that correct?

My back gear (two ratios) and variator (I'll use as 5 ratios) are already under LCNC control for physical shifting. For now just netted to the Motion digital inputs for testing. So it will also need a two dimensional array. Edit - Since one ratio is 1:1, and the other 1:7, I can probably just use a single dimension array (a list), and an if statement to only divide by seven if  back gear engaged.

There is an  encoder diven 1:1 off the spindle, so actual speed display is already sorted. and needs no scaling.  Your component gives me a template for a portion of what I want. Once the gears are set, it shows how to feed the resulting ratio back into LCNC to be able o adjust the VFD command scaling.

You have another custom comp called by that HAL called "VFDMOD". What does it do?

I still need to think through, how to select the appropriate ratio, based on the commanded speed, biasing for lowest physical ratio posible in that ratio. I am not sure if that is even possible using comparitors in classic ladder. I dont know how to resolve an array in ladder logic. I like the graphical nature of the ladder, especially for testing out simple ideas.

The way I code, I will need a lot of complie iterations to debug any comp I write. Do you need to delete a faulty comp each time, or can you just compile the next bug fixed attempt to over write it?


 
Last edit: 3 years 2 months ago by RotarySMP.

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

More
3 years 2 months ago - 3 years 2 months ago #277425 by rodw
Replied by rodw on topic Schaublin 125-CNC retrofit.
Grrrrr I lost my post..

Yes, mine is a basic round column mill with 2 belts. belts cannot share the same level and buttons in the GUI are disabled to prevent invalid selection.
I used one of those laser tachometers to read spindle revs low and high on every belt position, then calculated the ratios from 6300

I found your video about the variator. I had watched it once before (on page 32)
What is actually the back gear ratio? 1:7 or 1:6.5?
At your high speed, what is the variator RPM range? eg something like 2200-3000 RPM = 800 RPM range?
What is the variator actuator travel distance? Is it linear?
I am wondering if you couldn't use one of these to sense variator position?
thesensorconnection.com/product/shock-ab...potentiometer?v=3003
We just need to work out how to sense the resistance value. A mesa THCAD could sense the voltage change with resistance very accurately if you have a spare encoder input.

vfdmod is the RS485 component I use to control the VFD  forum.linuxcnc.org/24-hal-components/387...trol-over-modbus-rtu

To debug components, I usually add temporary debug pins named like debug-rpm and remove the later.

I am thinking if you can sense the actuator position, you select the back gear, then assuming say a 50 Hz VFD frequency, get as close as you can get with the varistor, then trim it with the VFD. Let the encoder feedback act on the vfd. Makes my head hurt again!
 
Last edit: 3 years 2 months ago by rodw.
The following user(s) said Thank You: RotarySMP

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

Time to create page: 0.689 seconds
Powered by Kunena Forum