Base Thread speed

More
21 Apr 2015 09:46 #57958 by jbunch
Base Thread speed was created by jbunch
How slow can you run the base thread. I only use it for a couple of hand encoders and when you run full tilt it slows the interface down.
when I try to run it almost as slow as the servo thread it will not load. Right now I am twice the speed of the servo thread and it works but is a wast of cycles.
I have tried to run encoder on the servo thread but it will not run there. suggestions or comments.


Jim

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

More
21 Apr 2015 11:25 #57960 by PCW
Replied by PCW on topic Base Thread speed
Why not just run the encoder in the servo thread?
(unless the count rate is too high for the servo thread)

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

More
21 Apr 2015 13:22 #57963 by ArcEye
Replied by ArcEye on topic Base Thread speed

How slow can you run the base thread.


The base-thread is just a name, if you don't use it for anything else it can be much slower.

when I try to run it almost as slow as the servo thread it will not load.


You will need to experiment more probably.

The fastest thread must be declared first, but there is rounding off of numbers involved so putting 999999 and 1000000 say will not work.

Run the resulting config from a terminal and you should get an error message if it does not load.

regards

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

More
21 Apr 2015 14:51 #57965 by ArcEye
Replied by ArcEye on topic Base Thread speed
This touches on and links to another way to start and use threads, rather than using the hard coded base / servo mechanism in the ini file

www.linuxcnc.org/index.php/english/forum...-amp-frequency#52555

However if you need it faster than the servo thread, it may be easiest to stick with the default creations and play with the speeds in the ini file

regards

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

More
21 Apr 2015 21:15 #57971 by andypugh
Replied by andypugh on topic Base Thread speed

I have tried to run encoder on the servo thread but it will not run there


I have run the encoder in the servo thread and it works fine. You need to add both functions to the servo thread.

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

More
22 Apr 2015 03:03 #57982 by jbunch
Replied by jbunch on topic Base Thread speed
I tried to add both
encoder.capture-position
encoder.update-counters
to the servo thread

I would receive an error on start up. (Some type of floating point error)
So I added the base thread to the start up.
I am currently running the base thread at double the speed of the servo thread. Slower seems to give errors on start up.
But I would like to eliminate it completely as it is not really needed. The encoders are real slow.

Jim

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

More
22 Apr 2015 05:40 #57985 by PCW
Replied by PCW on topic Base Thread speed
Hmm the encoder comp works with servo thread for me... what version of linuxcnc are you running?

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

More
22 Apr 2015 07:22 #57986 by jbunch
Replied by jbunch on topic Base Thread speed
2.6.7

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

More
22 Apr 2015 09:06 #57989 by PCW
Replied by PCW on topic Base Thread speed
This works for me in 2.6.7:

loadrt encoder num_chan=3

# ################################################
# THREADS
# ################################################

addf encoder.update-counters              servo-thread
addf encoder.capture-position             servo-thread

I also verified that the software encoders count properly using
servo thread for both functions by setp'ing the A and B pins

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

Time to create page: 0.400 seconds
Powered by Kunena Forum