MC1151A PMD, MC1151A Datasheet - Page 28

no-image

MC1151A

Manufacturer Part Number
MC1151A
Description
(MC1x51A) Advanced Step Motor Control Chipset
Manufacturer
PMD
Datasheet
Host Interrupts
In many situations, during axis motion or at other times, it is useful to
have the chip set signal the host that a special condition has occurred.
This is generally more convenient and efficient than having the host poll
the chip set for various possible conditions. This chip set-initiated signal
is known as a host interrupt.
Several chip set conditions may occur that can result in the generation
of a host interrupt. Whether these conditions in fact interrupt the host is
controllable for each condition and for each axis. The mechanism used
to control each condition is a mask register.
The interrupt conditions correspond to bits 0-7 and 11 of the
status register (the axis event flags), described in the previous
section. These conditions are summarized below:
Motion Complete
Wrap-around condition
Break Point Reached
Position Capture
Received
Motion Error
Negative Limit Switch
Positive Limit Switch
Command Error
When one of these interrupt conditions occur for a particular axis, the
host interrupt line is made active. At this point the host can respond to
the interrupt (although the current I/O operation should be completed),
but it is not required to do so
When the host has completed processing the interrupt, it sends a
command that clears the interrupt conditions for a particular axis, the
RST_INTRPT command.
This command includes a "clearing mask" as an argument, which
allows one interrupt to be cleared at a time.
Bits cleared by the RST_INTRPT command are the exact same bits
as those cleared by non-interrupt commands such as
RST_STATUS and CLR_STATUS. In each case the bits affected are
the status word bits 0-7.
Interrupts occur for a particular axis. If the user is currently
programming parameters on axis #1 and an interrupt occurs on axis #2,
it is the host's responsibility to change axis number to 2 if this is the
appropriate response to an interrupt on that axis. If more than one axis
interrupt condition becomes active at exactly the same time, then the
axis with the lowest number will generate the interrupt first.
Occurs when the profile is complete
Occurs when the axis position wraps.
Occurs when a breakpoint condition has
been satisfied.
Occurs when the encoder index pulse or
home pulse has been captured
Occurs when the maximum position
error set for a particular axis has been
exceeded
Occurs when the negative over-travel
limit switch is active
Occurs when the positive over travel
limit switch is active
Occurs when a host communication
sequence causes a command error
condition
28
The following host commands are used in managing interrupts:
(See Host Command reference for complete information)
SET_INTRPT_MASK
GET_INTRPT
SET_I
RST_INTRPT
To facilitate determining the nature of the interrupt, the status register
holds the axis #, allowing the interrupting axis # to be determined.
The following represents a typical sequence of interrupt conditions and
host responses. Assume for the purposes of this example that an axis
(not the current axis) has hit a "hard stop" causing an essentially
instantaneous motion error, as well as a positive limit switch trip. Also
assume that the interrupt mask for this axis was set so that either
motion errors or limit switch trips will cause an interrupt
motion Error & limit switch trip
generates interrupt
interrupting axis status
returned by chipset, current
axis set to interrupting axis.
chipset clears motion error bit
and disables host interrupt line
Because limit switch interrupt
is still active chipset
immediately generates
interrupt for limit switch
interrupting axis status
returned by chipset, current
axis set to interrupting axis.
chipset clears limit switch bit
and disables host interrupt line
At the end of this sequence, all status bits are clear, the interrupt line is
inactive, and no interrupts are pending.
Event
Sets the interrupt conditions mask
Returns the status of the interrupting axis
(including the interrupting axis #). The
current axis # is not altered by this
command
Changes the current axis # to the
interrupting axis. This is a 'time saver'
command which performs the dual
operations of getting the interrupting axis
# and switching to that axis in one
command.
Clears particular conditions for the
interrupting axis. The current axis # is not
altered by this command.
host sends SET_I command
host detects motion error & limit
switch flags are set, recovers from
motion error first.
host sends: RST_INTRPT 00EF,
clearing motion error bit
-
host sends SET_I command
host detects that neg. limit switch
trip flag is set, performs recovery
for limit switch trip.
host sends RST_INTRPT 00DF,
clearing pos. limit switch bit
-
Host action

Related parts for MC1151A