period setting

More
09 Apr 2024 07:05 #297845 by diammo
period setting was created by diammo
  • Official online description: traj_period_nsec = 100000 - This is the Trajectory Planner task period in nanoseconds. This value will be rounded to an integer multiple of servo_period_nsec. Except for machines with unusual kinematics (e.g., hexapods) there is no reason to make this value larger than servo_period_nsec.
  • So it's a contradiction? It says traj_period is an integer multiple of servo_period, and then it says traj_period shouldn't be larger than servo_period.
  • Core Components (linuxcnc.org)

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

More
09 Apr 2024 11:06 #297851 by tommylight
Replied by tommylight on topic period setting
Both values can be set separately, so not a contradiction, if it is set to other values, it will be rounded to fit, usually there is no need to change it.
The following user(s) said Thank You: diammo

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

More
10 Apr 2024 02:26 #297886 by diammo
Replied by diammo on topic period setting
Thank you very much for your answer. I'm still a bit confused, I can understand what servo_period is, but I don't know what traj_period specifically refers to?
The following user(s) said Thank You: tommylight

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

More
10 Apr 2024 02:38 #297888 by tommylight
Replied by tommylight on topic period setting
Servo period runs only stuff that are added in the HAL file with addf, traj_period is Trajectory Planer period.

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

More
11 Apr 2024 08:04 #297992 by diammo
Replied by diammo on topic period setting
Sorry, just to double check, it says traj_period = n*servo_period before and then traj_period <= servo_period, so it's traj_period = servo_period?

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

More
11 Apr 2024 12:43 #297996 by Tinine
Replied by Tinine on topic period setting
PMJI, as a non-LinuxCNC-user-but-motion-control guy, I have to agree that the wording could be better.

Typically, a system might be running a 1ms servo-loop but the trajectory planner for the actual motion might be 2ms or more.

Not sure if this applies to LinuxCNC but there wouldn't be much point to generating position commands more frequently than the PID can handle them.
The following user(s) said Thank You: tommylight

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

More
11 Apr 2024 14:31 #298002 by tommylight
Replied by tommylight on topic period setting

Official online description: traj_period_nsec = 100000 - This is the Trajectory Planner task period in nanoseconds. This value will be rounded to an integer multiple of servo_period_nsec. Except for machines with unusual kinematics (e.g., hexapods) there is no reason to make this value larger than servo_period_nsec.

If the value above is correct (i never checked), then traj is running at 10 times the speed of servo period, and that is good and dandy, the part that is hard to get is that if you set the traj period to some value, say 123456ns, it will be rounded to probably 125000 or 100000 so it can be multiplied easily to 1000000 that is the usual servo period.
The above is just an example, i never mess with traj period settings, no need, but i do mess with servo period often.

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

More
11 Apr 2024 20:16 #298027 by Tinine
Replied by Tinine on topic period setting
Searched and found this which makes more sense:

#+ Base task period, in nanosecs - this is the fastest thread in the machine
BASE_PERIOD = 25000
#- Servo task period, in nanosecs - will be rounded to an int multiple of BASE_PERIOD
SERVO_PERIOD = 500000
#- Trajectory Planner task period, in nanosecs - will be rounded to an
# integer multiple of SERVO_PERIOD
TRAJ_PERIOD = 5000000

Here, the servo (PID) loop is 0.5ms and the trajectory planner is 5ms

Also:

Ok, so this explains why the output from teleop_tp is run through the interpolator: it allows to run inverse kinematics at a lower rate than the servo thread, during axis jogs, by specifying traj_period_nsec to be larger than servo_period_nsec
 

The following user(s) said Thank You: tommylight

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

More
14 Apr 2024 04:55 #298216 by diammo
Replied by diammo on topic period setting
hello, I wanna know where to find that:#+ Base task period, in nanosecs - this is the fastest thread in the machine
BASE_PERIOD = 25000
#- Servo task period, in nanosecs - will be rounded to an int multiple of BASE_PERIOD
SERVO_PERIOD = 500000
#- Trajectory Planner task period, in nanosecs - will be rounded to an
# integer multiple of SERVO_PERIOD
TRAJ_PERIOD = 5000000

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

More
14 Apr 2024 07:30 #298220 by Tinine
Replied by Tinine on topic period setting
Search?

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

Time to create page: 0.139 seconds
Powered by Kunena Forum