Calculating path length

More
6 years 11 months ago #151148 by PCW
Replied by PCW on topic Calculating path length
Not sure I understand, the _signal_ distance is the accumulated distance traveled
you can use it as you wish (but in general you could not connect it to a joint since joints
are output pins from motion) You could connect this to a step generator position command
for example.

I just realized, this can be done much simpler since motion provides a velocity (well really speed) pin

loadrt integ

addf integ.0 servo-thread

net speed motion.current-vel integ.0.in
net distance integ.0.out

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

More
6 years 11 months ago #151160 by tommylight
Replied by tommylight on topic Calculating path length
Since i am also not getting what exactly you want to achieve, maybe this will help:
In axis GUI, open a file, got to file>properties
there it always has the total distance travelled for the cutting path, not the rapid travel or Z axis travel.
It will also have the time it takes to finish that job at the given (in gcode) feed rate, again sans the rapid travel or probing or anything else.

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

More
6 years 11 months ago #151184 by An
Replied by An on topic Calculating path length
Ahh right sorry, il try be more specific. I would like to take the path length as output by linuxcnc and use this to control another axis, say an extruder. This could be done at the cam level, in the post processor or at the Linuxcnc level, the later being the most accurate as it deals with the real path length after all traj functions etc are applied.

So in my mind this is how i thought i could do it;

Put a line of code in the kins file that would pull the relevant pos-> information. Store this and on the next thread subtract the new value from the old. The difference can then be used to calculate the path length in cartesian space. This value would be applied to the extrude axis resulting in the interpolated motion of the extrude axis and the tool tip. This could also feed the wire for a welder if that was useful....

Sorry if im not doing a good job at explaining!

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

More
6 years 11 months ago - 6 years 11 months ago #151225 by PCW
Replied by PCW on topic Calculating path length
If you are using the path length for running an extruder, you probably don't need anything other than
what LinuxCNC's motion already provides, that is motion.current-vel could be used to drive a a step
generator setup in velocity mode and you would get an extrusion rate proportional to velocity,

Practically speaking you would probably want to delay the motion relative to the velocity signal because of the
time lag inherent in extruders, and perhaps provide some velocity signal processing to account for
extruders characteristics.
Last edit: 6 years 11 months ago by PCW.

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

More
6 years 11 months ago #151248 by An
Replied by An on topic Calculating path length
Thanks for the replies guys. Im still unclear as to whether i can do this the way i want to using the kins file. Forget about the extruder - that was a bad example. A fibre tape layer is a better example for this. Knowing the path length would let you spool out the correct amount of fibre (it might also have some practicality issues but if you could please let it slide in the mean time!). I would be happy to try the method suggested by PCW but I haven't tried anything in the HAL world, nor compiling source code etc (maybe its similar to kins modification I just dont know).

Thanks once again for your time and patience!

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

More
6 years 11 months ago #151256 by Badger
Replied by Badger on topic Calculating path length
I use the method suggested by PCW of using hypot to control a step generator to run a servo that operates the needle in my rugbot relative to the motion of the machine. This is somewhat similar to a sewing machine and it keeps perfect stitch length regardless of direction or speed. This may or may not be applicable to your needs but if you search the site for "rugbot" I think I have posted my .hal and .ini files somewhere.

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

Time to create page: 0.306 seconds
Powered by Kunena Forum