Single-Axis Motion
06/2005
Danaher Motion
86 Rev
E
M-SS-005-03l
If no other task is attached to the axis, the axis is immediately attached. If
another task has already attached the axis, an error is generated. A
TRY
CATCH
can be used to wait for an axis to be unattached.
As long as the task has the axis attached, no other task can control the axis.
When a task is finished with an axis, it should detach the axis:
Detach A1
If you issue
DETACH
while profile motion for that axis is in progress,
DETACH
delays execution until that motion is complete. If a task ends with
some axes still attached, all axes are automatically detached.
One exception for the requirement that an axis be attached is if the motion
command is issued from the terminal window. In this case, assuming the axis
is not attached by any other task, the axis is automatically attached to the
terminal window for the duration of the motion command.
Enable the drive
by typing the following commands in the terminal window:
System.Enable = ON
A1.Enable = ON
Enable
is also necessary for asimulated axis although there is no drive
connected.
There are two other signals that are required to enable the drive:
DRIVEON
and
HALTRESTART
.
These signals are normally ON. These signals are
provided to comply with SERCOS. They are seldom used in MC programs. If
you do turn either of these off, you will need to turn them back on before
motion is allowed.
The last step in preparing a system for motion is turning on the
motion
flags
. There are two motion flags which must be on: the system motion flag
and the axis motion flag. For example:
System.Motion = ON
A1.Motion = ON
These lines of code are included in the BASIC Moves auto setup program.
In many applications, a
hardware switch
is tied to the motion flag. The
SERVO
STAR
MC does not have a hardware motion input. However, you
can use MC events to create this function. The following example shows a
task that uses input external data input 1 to control the system motion flag:
Program
OnEvent MOTION_ON System.DIn.1 = ON
System.Motion = ON
End OnEvent
OnEvent MOTION_OFF System.DIn.1 = OFF
System.Motion = OFF
End OnEvent
End Program
The purpose of the motion generators is to convert motion commands (
JOG
or
MOVE
)
into a regularly updated series of position and velocity commands.
That series is called a
motion profile
. The position and velocity commands
are sent via SERCOS to the controlled SERVO
STAR
drive. All the servo
loops (position, velocity, and current) are closed in the drives. The next figure
shows the profile for the velocity portion of a
JOG
command.