Ladder Program for Homing
Step | Action |
---|---|
1 | Open and create a new program in XG5000. |
2 |
Insert a Function bock in the right side of the ladder program using the icon or pressing F10.
|
3 |
Assign XPM_ORG as the FB type and add the required input and output arguments. When this FB gets executed the homing sequence that was defined in XG-PM is executed. The axis defined in the input argument will use all the homing parameters and digital inputs defined in the corresponding axis column in XG-PM.
Ladder Diagram looks like:
|
4 |
Use a function block XPM_FLT to create a home position origin at the current position of the motor. This can be used as an alternative to XPM_ORG if desired. Or if the application requires the coordinate system to change the origin position.
|
5 |
The current position will be redefined with the position value in Home Position under the Homing Parameters in XG-PM. Home Compensation under the Homing Parameters in XG-PM has no affect on position when using XPM_FLT.
Ladder Diagram looks like:
|
6 |
XPM_PRS can be used as a pseudo method for homing but is not defined as a homing function block. Use a function block XPM_PRS to create a new position at the current position of the motor. Any number can be entered to establish a new position value.
Neither Home Position nor Home Compensation under the Homing Parameters in XG-PM have any effect when using XPM_PRD. Ladder Diagram looks like:
|
7 |
It is always a good idea to include a way to stop the motion of each axis in the ladder program. XPM_STP will immediately stop the motor using the defined deceleration value in the function block assigned to DEC_TIME. Ladder Diagram looks like:
|
8 |
Add a way to reset any resettable error related to positioning using the XPM_RST instruction. Ladder Diagram looks like:
|
Error Codes
There are several places to find error codes:
-
LS Electric XEM PLC User Manual
-
The Help menu in the XG5000 software:
LP514-2