How to configure for spindle motor - DC brushed servo w/encoder step/dir

More
7 years 7 months ago #129645 by Mike_Eitel

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

More
7 years 7 months ago - 7 years 7 months ago #129647 by Vinito

How fast is your base thread?

Honestly I don't know yet. Can you point me to a spot (or just tell me the formula here) how I determine that?

"The excruciating docs ought to set forth a single summary mathematical formula stating how all the factors yield a final frequency, instead of just a prosaic description of what each factor represents with no summary formula."

I couldn't agree more, though I would argue that my impression of the documentation isn't as much prose as an exercise in connect the dots. Seems like I have to look things up on four pages minimum to find what a single line means, and even then I feel no more than 30% certain that I understand it in the end. Conversely, I don't mind doing basic math.

Similar vein - the section containing the lines you referred to was simply generated and I have no idea what any of that part means yet. Well maybe 5%. I did notice that two lines have rpm and two rps, and they are nets so I know they are connecting one side I have no understanding of with the other side which I understand even less. Then it ends with what looks like maybe a check that it's maintaining speed but there is no feedback from the drive or motor to evaluate anyway. But again, I don't know what it is so it's likely I'm incorrect there too.
Code:
net spindle-cmd-rpm <= motion.spindle-speed-out net spindle-cmd-rpm-abs <= motion.spindle-speed-out-abs net spindle-cmd-rps <= motion.spindle-speed-out-rps net spindle-cmd-rps-abs <= motion.spindle-speed-out-rps-abs net spindle-at-speed => motion.spindle-at-speed

But moving on to the scaling... I simply ended up with a value of 2 because that multiplied by the maxvel value determines the max requested velocity. I juggled those values to either trigger the error or not and the code I attached was just where I landed last, but the max possible value of 5004 pps remained fixed.

It seems to me that if I was able to accomplish 1200rpm in position mode yesterday then the dang system should indeed be capable of generating similar pulse speed in velocity mode, short of some synthetic programmer authoritarianism. This appears to be the root of my problem. What factor in velocity mode would limit the pps to such a low value as 5004 while that seems to be a cakewalk in position mode?
:huh:
Last edit: 7 years 7 months ago by Vinito.

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

More
7 years 7 months ago #129648 by Mike_Eitel
From the documentation of INI. See BASE_PERIOD =

2.5. [EMCMOT] Section
This section is a custom section and is not used by LinuxCNC directly. Most configurations use values from this section to load the motion controller. For more information on the motion controller see the Motion Section.

EMCMOT = motmod - the motion controller name is typically used here.

BASE_PERIOD = 50000 - the Base task period in nanoseconds.

SERVO_PERIOD = 1000000 - This is the "Servo" task period in nanoseconds.

TRAJ_PERIOD = 100000 - This is the Trajectory Planner task period in nanoseconds.

COMM_TIMEOUT = 1.0 - Number of seconds to wait for Motion (the realtime part of the motion controller) to acknowledge receipt of messages from Task (the non-realtime part of the motion controller).

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

More
7 years 7 months ago - 7 years 7 months ago #129649 by Vinito
Sorry I guess that might come easier from the latency test.
According to that:
base thread is around 14000
servo thread is around 34000

but the values in the ini are
base 100000
servo 1000000

Maybe I can edit those values a bit to speed up steps in any case?
Last edit: 7 years 7 months ago by Vinito.

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

More
7 years 7 months ago - 7 years 7 months ago #129650 by Vinito
You know, I'm paddling upstream here. To Richard's earlier point, I'm likely kludging hardware together that won't be satisfying in the end. Basically I was thinking if I could get 3000rpm out of this motor, that matches the rpm of the single-speed motor that the mill came with but I could have UI (g-code) control of it, which for me is very desirable.

If 3000rpm is ultimately impossible going this route, then I can think of three options.
1) deal with the klunky AC motor & step pulley spindle arrangement it has as-is.
2) replace the encoder with something which has 10ppr or something, or even hack a 1ppr or whatever I guess, but that's a whole 'nuther project.
3) skip the encoder altogether and just run the servo as a DC brushed motor and buy a controller to suit.
I guess 4) would be to punt the whole thing and buy a motor/controller pair and replace the whole smash.

I'm just trying not to spend a bunch of money on this thing and would rather spend it on a more capable future system instead. My hidden agenda is to simply dip my toe in and become somewhat familiar on some basic level with LinuxCNC, so I guess I'm hacking my way through that one. With that in mind, I'd like to at least figure out how to make this motor run as best it can in velocity mode in a pure effort to learn something. So I guess I'm not quite throwing the towel in yet.
Last edit: 7 years 7 months ago by Vinito.

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

More
7 years 7 months ago #129651 by Mike_Eitel
Long time ago I fidled with lpt but I'd try lower Base thread. Maybe 30000.

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

Time to create page: 0.081 seconds
Powered by Kunena Forum