Closed loop spindle speed and orientation

More
19 Dec 2014 03:33 #54143 by Niko
Hello
I am working on a traub TVC 200 mill and I have the X Y and Z performing well . Today I tried running the spindle orient component but had no success . The mill should be able to perform hard tapping operations so I guess I'll need closed loop spindle speed control and orientation for the tool changer . I have already looked at some examples but they all had problems which were solved on IRC so some of the solutions remain unknown . I am interested in a working example for this . The machine is equipped with a 5i20 7i33 7i37 and sserial 7i70 and 7i71 (if this is of any help) .


Thank you in advance .

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

More
29 Dec 2014 06:19 #54349 by andypugh

Today I tried running the spindle orient component but had no success . The mill should be able to perform hard tapping operations so I guess I'll need closed loop spindle speed control and orientation for the tool changer .


You don't need spindle orient for rigid tapping, LinuxCNC just needs to be able to control the spindle direction and know the spindle position.

Spindle orient is a little more complex.

All that the "orient" component does is provide a spindle position target. The actual movement is controlled by a PID component.

Do you have spindle position feedback? Is it set up correctly for 1 revolution = encoder.position = + 1?

Does LinuxCNC have control of spindle speed and direction?

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

More
05 Jan 2015 14:40 - 05 Jan 2015 15:02 #54565 by Niko
I need the orientation bit for the tolchanger . As far as speed control goes the hal and ini are almost the same as PNCconf makes them . The only thing I changed is the max speed to the maximum of that specific spindle . What I noticed is that the plus button in axis makes the speed jump to the maximum . It goes from 1 to 101 rps .

Do you have spindle position feedback? Is it set up correctly for 1 revolution = encoder.position = + 1?

The encoder is 1024 and that is how it is setup . What do you mean by =+1 ?

LinuxCNC just needs to be able to control the spindle direction and know the spindle position.

Does this mean that PNCConf produces a setup capable of rigid tapping?

Wish you all a happy new year !


File Attachment:

File Name: TRAUB.hal
File Size:17 KB


File Attachment:

File Name: TRAUB.ini
File Size:4 KB
Attachments:
Last edit: 05 Jan 2015 15:02 by Niko. Reason: I added the setup files

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

More
05 Jan 2015 21:03 #54574 by andypugh

What do you mean by =+1 ?

I mean, does the pin motion.spindle.revs increase by exactly 1.000 for exactly 1.000 rotations of the spindle?

Does this mean that PNCConf produces a setup capable of rigid tapping?

I don't know, I have never used it.
But your config looks like it should be capable of rigid tapping. Why not try it, but with no tap in the spindle?

By the way, the commented-out line in the orient-hal section with the #??? is an error because you have two signal names in the same net command.
net is always "net signal pin [pin, ...]" ie one net command, followed by one signal name followed by any number of pin names.
several net commands can share the same signal name, that means that all the pins in all those commands are connected together.
You have
#net spindle-pos spindle-revs orient.position orient-pid.feedback            #?????
For consistency with other signal names in the HAL file use
#net spindle-revs orient.position orient-pid.feedback
and you might even find that orient works when you uncomment the rest.
The following user(s) said Thank You: Niko

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

More
06 Jan 2015 05:22 #54619 by cmorley

I need the orientation bit for the tolchanger . As far as speed control goes the hal and ini are almost the same as PNCconf makes them . The only thing I changed is the max speed to the maximum of that specific spindle . What I noticed is that the plus button in axis makes the speed jump to the maximum . It goes from 1 to 101 rps .


AXIS sets spindle by RPM not RPS.
But yes it goes from 0 to 1 RPM to 101 RPM.
If your spindle runs faster then 101 then something is not set right.

somewhere around linuxcnc 2.6.3 you can set the starting RPM of the spindle +- button (in AXIS) as an INI setting.
The following user(s) said Thank You: Niko

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

More
08 Jan 2015 15:03 #54743 by Niko
I changed the max vel in the ini to 101 , but I think it is RPS which is what the spindle is capable of . With that done the smoothnes was gone . The default setpoint is 1 and jumps to 101 with one press . G33.1 does not work and orientation does not work . The pid gets .enable gets a .command but I think it doesn't get position feedback . I checked the index pulses with HALscope and they look fine .

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

More
08 Jan 2015 18:04 #54748 by andypugh

I changed the max vel in the ini to 101 , but I think it is RPS which is what the spindle is capable of .


The iNI setting is RPM (and might only affect GUI sliders).

Your problem is likely to be in HAL as there are several spindle command pins:

motion.spindle-speed-out OUT FLOAT
Desired spindle speed in rotations per minute
motion.spindle-speed-out-abs OUT FLOAT
Desired spindle speed in rotations per minute, always positive regardless of spindle direction.
motion.spindle-speed-out-rps OUT float
Desired spindle speed in rotations per second
motion.spindle-speed-out-rps-abs OUT float
Desired spindle speed in rotations per second, always positive regardless of spindle direction.

It sounds like your spindle HAL is set up to work correctly for an RPS command number, but is connected to one of the RPM outputs. Change the HAL pin used to supply the command value and you should be OK.
The following user(s) said Thank You: Niko

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

More
20 Jan 2015 16:25 #55203 by Niko
I got orient to work . Sort of .It sends the value to a sum 2 and the value goes to pwmgen.03 . What is not normal is that the spindle does not turn with orient . It has enable and the pwm actually sends an output (a few hundred millivolts) but the spindle does not turn . M3 and M4 work . The spindle does not have a brake .
Any thoughts on that?

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

More
20 Jan 2015 22:21 #55207 by Niko
Hello
in what units is encoder velocity measured? The hal manual says position units per second but i can't find how to calculate it .

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

More
20 Jan 2015 23:59 #55211 by PCW
Encoder velocity depends on scaling.

For linear axis with the encoder scaled to read in position units, the encoder velocity is in position units per second.
For spindles with the encoder scaling set to read 1.000 per revolution, the encoder velocity is revolutions per second.
The following user(s) said Thank You: Niko

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

Time to create page: 0.084 seconds
Powered by Kunena Forum