Help picking mesa board redcaps/bldc component

More
02 Sep 2015 19:38 - 02 Sep 2015 19:39 #62054 by gmouer

I realize the question is intended for Pete but it prompted a question from me. I was not aware that more than one servo thread could be used, can you explain that a bit? All the HAL's I have seen (used) had a single base and servo thread.


Typically motmod starts two threads as you describe
www.linuxcnc.org/docs/html/man/man9/motion.9.html

It is quite common to not define the base thread for a Pico / Mesa / General Mechatronics setup, as it is not needed.

If you look at the manpage there, you can see that there is an option "base_thread_fp=1" to enable floating-point calculations in the base thread (which you would then set to 5kHz rather than the normal 50kHz)

There is no point running bldc at 5kHz unless the inputs and outputs are also updated at that rate, so the hm2 read and write functions also need to be in the fast thread.


Of course that prompted another question. The more I learn the more I realize what I don;t know.

Wouldn't setting it to 5khz from the normal 50khz also slow the motion planning part down also? There is only one base thread, we can set it to floating point and define its speed but there still is only a single base thread, correct? I must be missing something here.
Last edit: 02 Sep 2015 19:39 by gmouer.

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

More
02 Sep 2015 19:40 #62055 by andypugh

Wouldn't setting it to 5khz from the normal 50khz also slow the motion control part down also? There is only one base thread, we can set it to floating point and define its speed but there still is only a single base thread, correct? I must be missing something here.


A typical Mesa config has absolutely nothing running in the base thread.

Motion runs in the servo thread.

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

More
02 Sep 2015 19:49 - 02 Sep 2015 19:50 #62056 by gmouer
I am going to have to digest this for a while and do some more reading. We can still get the hardware decided and ordered, the software comes later anyways.
Last edit: 02 Sep 2015 19:50 by gmouer.

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

More
04 Sep 2015 21:25 #62123 by gmouer
Ok, so I have been pondering this stuff a bit and have some questions.

My assumption is the default base thread is run at 50khz, and is not normally used with a mesa board setup, and the idea is to lower that base thread to 5khz and use that base thread to handle the mesa read/write cycles. Correct?

I go back to Petes statement that a Atom computer stresses out at anything over 2khz and wouldn't be up to the job of the required 5khz thread speed. Is Pete talking about the thread running in the servo thread in that case? I am confused why something like the atom, if it can handle software step generation at the default base thread speed of 50khz then why couldn't it run at a much reduced base thread of 5khz and handle the commutation tasks in that base thread?

I am thinking Petes statements of the processor horsepower needed to run a 5khz thread is talking about the servo thread, not the base thread. Andy's comments were talking about using the unused base thread for the commutation task. Have I got this right?

I am thinking the processor horsepower requirements vary widely depending on which thread the commutation tasks are handled in.

No doubt you guys can slap my thinking back onto the correct road.

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

More
04 Sep 2015 21:36 - 04 Sep 2015 21:36 #62124 by PCW
Normally I would run everything in a single servo thread at its just just simpler and less chance for
order problems that way, also unless you are running drives with tachometer feedback
you are in torque mode which will need a high servo thread rate for best performance
Last edit: 04 Sep 2015 21:36 by PCW.

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

More
04 Sep 2015 21:38 - 04 Sep 2015 21:39 #62125 by gmouer

Normally I would run everything in a single servo thread at its just just simpler and less chance for
order problems that way, also unless you are running drives with tachometer feedback
you are in torque mode which will need a high servo thread rate for best performance


Going to use AMC brushless drives, in velocity mode, using encoder feedback to the drives (BE25a20 drives have encoder feedback inputs or tach). The positioning PID loop will be in Linuxcnc. (encoder also feeds into 7i77 encoder input)
Last edit: 04 Sep 2015 21:39 by gmouer.

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

More
04 Sep 2015 21:44 #62126 by PCW
OK that helps but I still think using multiple threads for this is inadvisable

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

More
04 Sep 2015 21:48 #62127 by gmouer

OK that helps but I still think using multiple threads for this is inadvisable


I understand. Splitting the I/O between the 2 threads opens up the potential for timing issues. We certainly don't need to look for that kind of trouble. Troubleshooting it would get very nasty.

A quick question.... for a initial bench test, with one motor, the commutation in and out signals would be 5V, what do you think of using the 5i25's spare db25 connector as GPIO for this? Its only for a bench test to prove the motor/drive/bldc commutation functionality.

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

More
04 Sep 2015 22:07 #62129 by andypugh

, if it can handle software step generation at the default base thread speed of 50khz then why couldn't it run at a much reduced base thread of 5khz and handle the commutation tasks


A normal base-thread runs a very few very simple tasks with no floating-point calculations. Everything that runs in the stepgen / pwmgen base thread functions is pared down to take the minimum CPU time.

If you are commutating in the fast thread then you have to enable floating-point calculations in that thread, and there is some trigonometry involved which takes a bit of CPU power.

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

Moderators: PCWjmelson
Time to create page: 0.210 seconds
Powered by Kunena Forum