Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 624 of 909
Command
PID / Trajectory
Update Rate
Period
(µsec)
SAMP
Report
RSP
Report
PID1 16 kHz 62.5 16000 06250/5...
PID2 8 kHz (default) 125 8000 12500/5...
PID4 4 kHz 250 4000 25000/5...
PID8 2 kHz 500 2000 50000/5...
EXAMPLE: (comparison of the different PIDvalues)
'For a 4000 count encoder SmartMotor:
'Using three fixed values under each of the PID settings
v=655360 'use to Set commanded Velocity (4000 count encoder)
a=256 'use to Set commanded Acceleration
w=1000 'use to set Wait time
PID1 'Default PID updates every servo sample
WAIT=w 'Wait time = 1 second
VT=v 'Velocity = 2400 RPM
ADT=a 'Accel/Decel = 250 RPS^2
PID2 'PID updates every 2 servo samples
WAIT=w 'Wait time = 1 second
VT=v 'Velocity = 1200 RPM
ADT=a 'Accel/Decel = 62.5 RPS^2
PID4 'PID updates every 4 servo samples
WAIT=w 'Wait time = 1 second
VT=v 'Velocity = 600 RPM
ADT=a 'Accel/Decel = 15.625 RPS^2
PID8 'PID updates every 8 servo samples
WAIT=w 'Wait time = 1 second
VT=v 'Velocity = 300 RPM
ADT=a 'Accel/Decel = 3.9063 RPS^2
PID2 'Return to Default PID
WAIT=w 'Wait time = 1 second
END
In the previous example, although the values used for Velocity, Acceleration/Deceleration,
and Wait times remained the same, their effect was changed by the PID setting. As a result,
much care should be taken if changes are made in the middle of a program.
While the motor is motionless, the PID parameter can be changed from PID1 to PID8, to
increase I/O scanning efficiency or other code execution, and then returned to PID1 just
before the next move. This is a technique used to increase response time for input triggers or
mathematical calculations when there is no trajectory in progress.
Part 2: Commands: PID#