Select from the tabs below to view programming examples for that category.
You are encouraged to review the ideas presented and modify the code for your particular application.
- MDrive / MForce
- MicroLYNX
- CANopen
- Visual Basic
Motion and I/O Management
> Basic motion sample
Demonstrates how to control a move from inside a program.
> Move on BCD input
Moves the motor to a variety of positions based upon a binary input to I/O 1–4.
> Homing to a hard stop
Demonstrates how to home a drive without using a home sensor.
> Use of I/O sample
Demonstrates how to configure a digital input and use the input to control program flow.
> IF THEN sample
Configures Input 1 as a general purpose input which can then be used as a control bit in the program.
> Position teach
This program remembers a manual positioning of MDrivePlus for future moves.
> Binary mask
Demonstrates the ability to call eight subroutines using three digital inputs.
> Move on an input
Demonstrates moving on an input.
Analog
> Move on analog input
Demonstrates moving the motor based upon the voltage seen on the analog input.
> Speed Control with analog input
Demonstrates an application using the MDrive analog input.
Trips / Functions
> Limit switch test program
Demonstrates the predefined limit switch input function.
> Position trip redefine
This program demonstrates how to redefine a position trip while a move is in progress.
> High speed input trip capture
Demonstrates how to set up a high-speed trip capture function.
> Electronic gearing
Shows how to configure an MDrivePlus2 unit.
> On Error handler
The OE or On Error instruction is a subroutine call that is invoked whenever an error occurs during the execution of a program.
Other
> Binary counter
Demonstrates using and manipulating numeric data and performing operations based upon that data.
> MCode Boolean logic
Uses the Boolean logic operators available in MCode software. The first section calls subroutines based on the logical interpretation of general purpose inputs, and calls respective subroutines.
> Integer math only (no decimals)
Demonstrates how MDrivePlus software handles math functions.
> Avoiding encoder overflow
In MDrive applications that require continuous slew, such as pumps or fans, and encoder mode is enabled, a stall error will occur when the encoder counter.
Motion and I/O Management
> Read and feed
This program reads the state of two inputs to determine a move distance, and then makes the move.
> Feed and cut
This program feeds a web to a length and switches an output to operate a tool such as a cutter.
> Using encoder motor to
detect stall
This program shows how to detect a stalled condition by using an encoder motor.
> Sequential axis
Demonstrates how the MicroLYNX controls multiple axes sequentially.
> And / Or
This program shows how to read the state of two inputs and perform logical AND and OR on them.
> On the fly
This program illustrates how to change speeds and toggle outputs while moving.
> Register
This program feeds a web at a constant velocity, and executes a registration move of a user-defined distance after a registration sensor becomes active.
> Traverse
This program runs a traverse. The traverse axis follows quadrature encoder inputs from a take up roll.
Functions
> User-defined acceleration profile
For loads requiring an acceleration profile other than the 4 pre-set standards, a user-defined option is available via the ACLTBL command.
> Following an external pulse
This program generates motion in the MicroLYNX by following an external pulse source. The code checks the value of an IO and updates whether they want the following to be fine or coarse.
Other
> Sequence control without motion
This program illustrates using a MicroLYNX as a sequence controller for an industrial test machine without any motion control. It is is typical of an I/O intensive sequence that requires operator push button input, feedback from switches, relay controls, and LEDs to manage the pass/fail test of a quality control requirement.
> Profile Position Mode
This program sample demonstrates the different move types supported for position control executed
via SDOs.
> Profile Velocity Mode
This program sample demonstrates the ability to move at constant velocity using SDOs.
> Homing Mode
This program sample demonstrates home method 18 decimal using SDOs.
> Embedded Projects
Sample project for developing code using Visual Basic programming language to communicate with MDrive and MicroLYNX motion control products.
