Add more threads to EMCMOT

More
08 May 2013 01:50 #33745 by PCW
Replied by PCW on topic Add more threads to EMCMOT
If this is all just to read a jogwheel, why do you need any more threads?

The encoder component uses the base thread for counting and already works with jogwheels

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

More
08 May 2013 13:57 #33756 by casetero
Replied by casetero on topic Add more threads to EMCMOT
Hello,

Okey John, that´s why i can´t net the component to the base-thread. Thank you.

PCW the problem is the jogwheel is special and doesn´t work as a rotary encoder. China jogwheel, it needs a special component to read counts.

So, having two fast threads will be annoying to linuxcnc?? Will slow down something?? Any lost of pulses??

Thank you and regards!

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

More
08 May 2013 21:19 #33783 by PCW
Replied by PCW on topic Add more threads to EMCMOT
What interface does the jogwheel use?

If a fast thread is needed, why not use the existing base thread?
(as the encoder component does)

adding another thread is a pretty heavyweight solution to a lightweight problem

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

More
08 May 2013 23:32 #33794 by casetero
Replied by casetero on topic Add more threads to EMCMOT
I cant net the component to the base-thread because it has operations in floating points, just as BigJhonT said in this post.

So adding a new fast thread will be a heavy load for linuxcnc?? Im worried about that, but indeed it works fine with two fast threads.

My knowledge about electronics is very low, but as i understand there is only one thread, the faster one. The other ones are just multiples of it. I mean if your fast thread is for example 20.000 ns, it means that the clock of linuxcnc is going to be set at this period time. And every thread you make will be a multiple of this fast thread. So at the end is just .a question of how much information do you send/read in each pulse. But you have only one clock, and its period will be the period of your faster thread.

So at the end, it just matter the period of your faster thread and how much information do you send/read in each pulse. As i understand for example if you have

base-thread 20.000 ns

servo-thread 1.000.000 ns

It means that the clock of linuxcnc is set at 20.000 ns and the base-thread read/send pulses every click of the clock and the servo-thread read/send every 50 clicks of the clock.

Don´t know if you understand what i want to say because my knowledge of english is low too.

Is all this stuff right?? or am i completly wrong??

Thank you and regards.

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

Time to create page: 0.168 seconds
Powered by Kunena Forum