multi axis synchronous jog?
- atrex77
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 46
- Thank you received: 24
11 Jul 2021 19:42 #214311
by atrex77
multi axis synchronous jog? was created by atrex77
Hi all,
please help me, i want to make cnc spinning machine with linuxcnc, my python code to track the contours is nearly finished but i need to
jog axes in synchronous and i dont know can i make.
please help me, i want to make cnc spinning machine with linuxcnc, my python code to track the contours is nearly finished but i need to
jog axes in synchronous and i dont know can i make.
Please Log in or Create an account to join the conversation.
- Aciera
-
- Away
- Administrator
-
Less
More
- Posts: 4457
- Thank you received: 1997
11 Jul 2021 19:57 #214313
by Aciera
Replied by Aciera on topic multi axis synchronous jog?
Could you explain more what you mean with "synchronous jog"?
Please Log in or Create an account to join the conversation.
- atrex77
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 46
- Thank you received: 24
11 Jul 2021 20:02 - 11 Jul 2021 20:07 #214314
by atrex77
Replied by atrex77 on topic multi axis synchronous jog?
start 2 axis jog in realtime, when you call command.jog() in two axes not start same time.
like this:comm.jog(linuxcnc.JOG_CONTINUOUS, False, 0, xv * jfeed)
comm.jog(linuxcnc.JOG_CONTINUOUS, False, 2, zv * jfeed)
like this:comm.jog(linuxcnc.JOG_CONTINUOUS, False, 0, xv * jfeed)
comm.jog(linuxcnc.JOG_CONTINUOUS, False, 2, zv * jfeed)
Last edit: 11 Jul 2021 20:07 by atrex77.
Please Log in or Create an account to join the conversation.
- Grotius
-
- Offline
- Platinum Member
-
Less
More
- Posts: 2416
- Thank you received: 2339
11 Jul 2021 22:29 #214333
by Grotius
Replied by Grotius on topic multi axis synchronous jog?
I don't understand your problem but it looks like one axis is starting sooner then the second axis in time.
Your python command's are done from a gui updating thread let's say 100ms interval. This is i think your problem.
If you want to have more freedom, try to use the stepgen component.
Then you can sent position value's with halcmd. Then in python you can code the motion profile's for your spinning machine.
Your python command's are done from a gui updating thread let's say 100ms interval. This is i think your problem.
If you want to have more freedom, try to use the stepgen component.
Then you can sent position value's with halcmd. Then in python you can code the motion profile's for your spinning machine.
The following user(s) said Thank You: atrex77
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23451
- Thank you received: 4988
13 Jul 2021 00:12 #214459
by andypugh
This looks like Python code, so _isn't_ realtime.
Is there any way to move this to a realtime component, controlled by the Python code via HAL pins?
Replied by andypugh on topic multi axis synchronous jog?
start 2 axis jog in realtime, when you call command.jog() in two axes not start same time.
like this:comm.jog(linuxcnc.JOG_CONTINUOUS, False, 0, xv * jfeed)
comm.jog(linuxcnc.JOG_CONTINUOUS, False, 2, zv * jfeed)
This looks like Python code, so _isn't_ realtime.
Is there any way to move this to a realtime component, controlled by the Python code via HAL pins?
The following user(s) said Thank You: atrex77
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7952
- Thank you received: 2160
13 Jul 2021 05:16 #214483
by cmorley
Replied by cmorley on topic multi axis synchronous jog?
There is no way to actually synchronize jogs of multiple axes (currently anyways)
You could probably get something very close by starting two independent jogs in realtime (as Andy, I thinking is leading to)
I guess it depends on how synchronized you need.
it would be nice to have a true multi axes jog - for chamfering on a lathe for instance.
You could probably get something very close by starting two independent jogs in realtime (as Andy, I thinking is leading to)
I guess it depends on how synchronized you need.
it would be nice to have a true multi axes jog - for chamfering on a lathe for instance.
The following user(s) said Thank You: atrex77
Please Log in or Create an account to join the conversation.
- atrex77
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 46
- Thank you received: 24
13 Jul 2021 05:16 - 13 Jul 2021 05:43 #214484
by atrex77
Replied by atrex77 on topic multi axis synchronous jog?
Good idea, but how to pass multiple values realtime to hal?
I explain the full problem, i need to teach the movements by hand with joystick and cannot cross the bounding curves and move seamlessly.
tried to switch between jog (free moves) and mdi(bounding curves) mode but not working because of lag in switching modes.
I switched to full jog mode teaching, but because of axes not start synchronized a small gap between the bounding curve and the moves.
Later I upload the code with instructions to use, but I need to go to working.
I explain the full problem, i need to teach the movements by hand with joystick and cannot cross the bounding curves and move seamlessly.
tried to switch between jog (free moves) and mdi(bounding curves) mode but not working because of lag in switching modes.
I switched to full jog mode teaching, but because of axes not start synchronized a small gap between the bounding curve and the moves.
Later I upload the code with instructions to use, but I need to go to working.

Last edit: 13 Jul 2021 05:43 by atrex77.
Please Log in or Create an account to join the conversation.
- atrex77
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 46
- Thank you received: 24
13 Jul 2021 21:03 #214644
by atrex77
Replied by atrex77 on topic multi axis synchronous jog?
ok i solve my sync jog problem. 
i made a hal component that get input of an angle then make 2 analog out from it.
component syncjog;
pin in float angle;
pin out float analog0;
pin out float analog1;
function _;
license "GPL";
;;
#include <rtapi_math.h>
const float k = 3.1415926535 / 180;
//main function
FUNCTION(_) {
analog0 = sin(angle * k);
analog1 = cos(angle * k);
}

i made a hal component that get input of an angle then make 2 analog out from it.
component syncjog;
pin in float angle;
pin out float analog0;
pin out float analog1;
function _;
license "GPL";
;;
#include <rtapi_math.h>
const float k = 3.1415926535 / 180;
//main function
FUNCTION(_) {
analog0 = sin(angle * k);
analog1 = cos(angle * k);
}
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Time to create page: 0.071 seconds