1) С какой периодичностью планивровщик расчитывает траекторию и обновляет axis.n.motor-pos-cmd, servo-thread?
2) С какой периодичностью обновляется pid.n.output, тоже servo-thread?
Если я правильно понимаю, то и то и другое обновляется с servo-thread.
Как их задать жестко и чтоб не плавали?
base-thread (the high-speed thread): this thread handles items that need a fast response, like making step pulses, and reading
and writing the parallel port.
servo-thread (the slow-speed thread): this thread handles items that can tolerate a slower response, like the motion controller,
ClassicLadder, and the motion command handler.
motion - Accepts NML motion commands, interacts with HAL in realtime.
axis - Accepts NML motion commands, interacts with HAL in realtime.
classicladder - Realtime software PLC based on ladder logic. See Classic Ladder manual for more information.
threads - Creates hard realtime HAL threads.
Поехали.[EMCMOT]Base period =50000- the Base task period in nanoseconds.
[EMCMOT]SERVO_PERIOD = 1000000 - This is the "Servo" task period in nanoseconds.
[EMCMOT]TRAJ_PERIOD = 100000 - This is the Trajectory Planner task period in nanoseconds.
[TASK]CYCLE_TIME = 0.010 - The period, in seconds, at which TASK will run. This parameter affects the polling interval when waiting for motion to complete, when executing a pause instruction, and when accepting a command from a user interface. There is usually no need to change this number.
[EMCMOT]SERVO_PERIOD = 1 мкс - По идее разработчика, это период обновления PID регулятора, так?
[EMCMOT]TRAJ_PERIOD =0.1 мкс - Период расчета нового положения для оси.
[TASK]CYCLE_TIME - не понятно, о каких ожиданиях завершения движения идет речь.
Т.е. каждую 0.1 мкс планировщик расчитывает новое положение для осей, а каждую 1 мкс должен обновляться PID?
Теперь, если принять, что
То получается, что [EMCMOT]TRAJ_PERIOD = 100000 +-25% или же TRAJ_PERIOD жесткий?Nick писал(а):Ну при каждом вызове servo-thread (в компе) он не ровно 1 000 000 а +- 25 000, а то и более.
Если он жесткий, тогда в помойку [EMCMOT]SERVO_PERIOD и использовать каждый 10-й импульс от TRAJ_PERIOD.
Или я перепутал всё?

