omron — Buffered Program Command

PMAC Product Guide Action on Trigger In the homing search move, as soon as the PMAC firmware recognizes that the hardware trigger has occurred, it takes several actions. It reads the position at the time of capture, usually the hardware capture register and uses it and the Ix26 home offset parameter to compute the new motor zero position. As soon as this is done, reported positions are referenced to this new zero position (plus or minus any axis offset in the axis definition statement -- if the axis definitions is #1->10000X+3000 , the home position will be reported as 3000 counts).

If software overtravel limits are used (Ix13, Ix14 not equal to zero), they are re-enabled at this time after having been automatically disabled during the search for the trigger. The trajectory to this new zero position is then calculated, including deceleration and reversal if necessary. Note that if a software limit is too close to zero, the motor may not be able to stop and reverse before it hits the limit. The motor will stop under position control with its commanded position equal to the home position. If there is a following error, the actual position will be different by the amount of the following error.

Home Command The homing search move can be executed either through an on-line command (which can be given from a PLC program using the COMMAND"" syntax) or a motion program statement. On-Line Command A homing search move can be initiated with the on-line motor-specific command HOME (short form HM ). This is simply a command to start the homing search; PMAC provides no automatic indication that the move is completed, unless setup to recognize the in-position (IPOS) interrupt.

Monitoring for Finish If monitoring the motor from the host or from a PLC program to see if it has finished the homing move, look at the home complete and desired velocity zero motor status word, accessed either with the ? command, or with M-Variables. The home complete bit is set to zero on power-up/reset; it is also set to zero at the beginning of a homing search move, even if a previous homing search move was completed successfully. It is set to 1 as soon as the trigger is found in a homing search move, before the motor has come to a stop. The home search in progress bit simply is the inverse of the home complete bit during the move:

it is 1 until the trigger is found, then 0 immediately after. Therefore the monitoring should look also for the desired velocity zero status bit to become one, which will indicate the end of the move. Monitoring for Errors A robust monitoring algorithm will also look for the possibility that the homing search move could end in an error condition. Often this is just part of the general error monitoring that is done at all times, looking for overtravel limits, fatal following errors, and amplifier faults. If an error does occur during the homing move, it is important to distinguish between one that occurs before the trigger has been found, and one that occurs after.

If the error occurs after, PMAC knows where the home position is, and the homing search does not need to be repeated. Once the error cause has been fixed, the motor can be moved to the home position with a command such as J=0 . Buffered Program Command The homing search move can be commanded also from within a motion program with the HOMEn command, where n is the motor number. Note that this command specifies a motor unlike other motion program commands that specify an axis move. In a motion program, PMAC’s automatic program sequencing routines monitor for the end of the move. When the move is successfully completed, program execution continues with the next command. 60 Programming PMAC