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.
- 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.
- tommylight
- Online
- Moderator
- Posts: 19107
- Thank you received: 6401
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- tommylight
- Online
- Moderator
- Posts: 19107
- Thank you received: 6401
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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.
Please Log in or Create an account to join the conversation.
- tommylight
- Online
- Moderator
- Posts: 19107
- Thank you received: 6401
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.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.
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.
Here, the servo (PID) loop is 0.5ms and the trajectory planner is 5ms#+ 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
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
Please Log in or Create an account to join the conversation.
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.
Please Log in or Create an account to join the conversation.