Home > Resources > Example Programs > Closed loop with homing

Closed loop with homing

Description

This program demonstrates the use of the home to home switch instruction (HM) in closed loop, also there is a move on input routine. The Homing method used is HM1, which will slew at VM (Max Velocity) in the negative direction, when input 1 is activated, the axis will creep in the plus direction at VI (Initial Velocity).

See the MCode Home to home switch command and change the homing method to experiment with different methods of homing. Output 1 is set to activate when the axis is moving. Stalling the motor will generate an error, activating output 2.

The code shown on the right may be copied and pasted into the program editor window of the Motion Control Programmer application, or a zip file containing the program files may be downloaded below.

Requirements

Example program

Liberty* MCodeMDrive MCode

 

When it comes to your form, fit and function requirements, don’t settle. Get precisely what you need working with us. We know motion.

Contact us with any questions about how we can help you with your motion application or for assistance with your IMS products.

Browse our resource section and find the most useful tools and documents for all our products.