eccentric turning

More
4 years 9 months ago #231111 by jpg
Replied by jpg on topic eccentric turning
Ahoo, you're good, I haven't tried again since the other day, because I've had the flu since then... what did you modify as files? If you could share your complete configuration, it would be a great help to me, thank you and congratulations again! 

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

More
4 years 9 months ago #231231 by hitchhiker
Replied by hitchhiker on topic eccentric turning
yes i share it.
today i am back home in some hours.

i would make a small video and shate my files here ;)
The following user(s) said Thank You: jpg

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

More
4 years 9 months ago #231232 by jpg
Replied by jpg on topic eccentric turning
Hello, and thank you, I look forward to seeing your video

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

More
4 years 9 months ago #231233 by hitchhiker
Replied by hitchhiker on topic eccentric turning
for me... i got a last problem...

i want to see the correct angle.
when i go over 360 degree it shows 361 degrees not 1. when i go under 0 degree it shows 1 degree not 359.

i wrote a thread but i think noone could understand me?? bad english
.. thanks

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

More
4 years 9 months ago #231234 by andypugh
Replied by andypugh on topic eccentric turning

output degrees in pyvcp...i have it but...
when 360° reached i want to get 1° not 361°.
I think that it is probably best _not_ to do that except, possibly, at the point of display. Resetting the angle to zero every rev feels like a way to introduce glitches into the motion. 

If you simply want to display the angle 0-359.999 then put a modulo function in HAL between the angle value and the pyvcp input pin. 

However, somewhat oddly, LinuxCNC does not appear to have a modulus block (or even a divide block) so the neatest answer is probably a simple custom component. 

And, that might as well _replace_ whatever you are using to convert encoder position to degrees. 

linuxcnc.org/docs/2.8/html/hal/comp.html
Code:
component pos2angle "Convert spindle turns to degrees"; pin in float position "Position output of spindle encoder"; pin out float degrees "Spindle position in degrees"; pin out float deg-lim "Spindle position in degrees wrapped at 360"; function _; license "GPL"; include "rtapi_math.h"; ;; degrees = position * 360.0; deg_lim = fmod(degrees, 360);

Save the code above to a file called "pos2angle.comp" and then add it to your LinuxCNC installation with "sudo halcompile --install pos2angle.comp" then you can use it like any other HAL component. 
 

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

More
4 years 9 months ago #231236 by hitchhiker
Replied by hitchhiker on topic eccentric turning
andy is my personal hero.

i dont want to reset the count and work with them.. i want only to display the angle.

thats was not give any regulation to the motion.

only in my vcp bot inside the process of motion.

understand?!

thanks. i will give it a try

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

Time to create page: 0.464 seconds
Powered by Kunena Forum