|
Many Slaves (drives) come with preprogrammed procedures that
the Slave is able to execute without assistance from the Master.
Each of these procedures is assigned a Data Block. The Master
controls a procedure by reading and writing to Element 7 of
the procedure's Data Block. The Master can initiate, interrupt,
or cancel a procedure at any time by setting or clearing bits
in Element 7 of the procedure's Data Block.
Bits 0 and 1 are responsible for respectively setting and
enabling the procedure command. Once set and enabled, the
Slave will begin execution of the procedure. To indicate that
the procedure is executing, the Slave sets bit 2 of the procedure
status word. When the procedure has finished executing, the
Slave clears bit 2 of the procedure status word and sets the
Procedure Command Change Bit in the Drive Status Word S-0-134.
If an error has occurred when executing the procedure, the
Slave will set bit 3 of the procedure status word and will
also set the Procedure Command Change Bit in the Drive Status
Word S-0-135. In either case (successful execution or failure),
the Master must cancel the procedure by clearing bits 0 and
1 of the procedure.
In SERCOS, in order for a Master to execute a procedure,
- The Master writes 0x3 to Element 7 of the desired
IDN procedure, which sets and enables the procedure.
- The Master reads the procedure status word and checks
bits 2 & 3 to see if the procedure has finished executing
or if there is an error.
- After reading that the procedure has executed, the
Master writes 0x0 to Element 7 of the particular procedure,
which cancels the procedure.
|