Getting Started Video:
Before you begin:
To use the EMotion controller, you will need the following software and hardware components:
- Hardware
- EMotion controller
- 24V EMotion power supply
- Ethernet cable
- Your stepper or servo motor drive
- 16 AWG to 28 AWG jumper wires
- Flat-head screwdriver
- Digital multimeter (optional, for debugging)
- Pulse generator (optional, for debugging)
- Software
- Windows 7/8/10 environment
- LabVIEW 2015 or above
- Any LabVIEW edition (base, full, professional, community, or evaluation) will work with EMotion.
- LabVIEW 32-bit is preferred.
- WPC Device Manager (referred to as WDM)
- LabVIEW 2015 Run-Time Engine SP1 (needed for WDM)
- WPC Device Driver (referred to as WDD)
This tool allows the user to manage multiple WPC devices. Users can configure, self-test, update firmware, change IP addresses, and perform various maintenance functions.
WPC Device Driver (WDD):
WDD is a collection of LabVIEW drivers for all WPC devices. It is provided as a VI Package file, which can be installed using the LabVIEW VI Package Manager. After installation, the WPC LabVIEW driver VIs will be available in the LabVIEW palette.
LabVIEW 2015 Run-Time Engine SP1:
This is the software package required to run applications built with LabVIEW. As WDM is built with LabVIEW 2015 SP1, this Run-Time Engine must be installed before WDM can run.
Hardware installation:
To set up the EMotion controller, follow these steps:
- Connect the control signals (STEP/DIR or CW/CCW) from the EMotion controller to the corresponding inputs of your stepper or servo motor drive for each axis.
- If your motor drive has encoder feedback, connect the A, B, and Z signals to the EMotion controller for each axis.
- Connect the EMotion controller to your host PC using an ethernet cable.
- Connect the 24V power supply to the EMotion controller.
Wiring diagram:
Connecting to the EMotion controller:
The EMotion controller uses the default static IP address of “192.168.1.110.”
If you are using an Ethernet cable to connect directly from your PC to the EMotion controller, you must set the IP address of your PC to a static address on the same subnet. For example, use “192.168.1.x”, where x is a number from 1 to 255, excluding 110.
To check the EMotion network connection, you can perform a ping check with the following steps:
- Press the "Windows" key on your keyboard and type "cmd" to open the Command Prompt.
- In the Command Prompt, type "ping" and hit the space bar.
- Type the IP address you want to ping, for example, 192.168.1.110.
- Review the displayed ping results.
WPC Device Manager (WDM) installation and usage:
You can configure, self-test, update firmware, change the IP address, and perform various maintenance functions for your EMotion controller within WDM.
- Download and run WPC Device Manager.
- If the network connection to EMotion is valid, you should see the EMotion controller in the Device Tree (as shown in the diagram below). If not, please follow our troubleshooting guide.
Navigating the WDM user interface:
- Device Tree: This tool discovers all available USB and Ethernet WPC devices.
- Function Test Panels: These panels display different function types based on the type of WPC device.
- Configuration and Settings: This section allows you to configure and adjust settings for the WPC device.
- Description of WPC Device: This section provides a detailed description of the WPC device.
- Status: This indicates whether the device is currently connected or disconnected.
Verify motor movements with Motion Test Panel:
To test for correct motor behavior, use the Motion Test Panel within WDM. You can also monitor feedback signals, such as encoders and limit/home switches.
IMPORTANT:The Motion Test Panel is your primary resource for troubleshooting.
Before you begin programming in LabVIEW, make sure to verify correct motor behavior using the Motion Test Panel.
To access the Motion Test Panel, click on the “Motion” button from the WDM Function Test Panels menu.
From the Motion Test Panel, you can also access these 3 separate sub-menus for each axis, they are:
- Axis config menu
- Axis find reference menu
- Axis simple move menu
- Test your motor axis by opening the Axis simple move menu (triangular “play” button), and set the following parameters. (Other parameters can be left as default for now.)
- Operation Mode: Velocity
- Velocity: 1000 steps/sec
- Press the run button, and see if the motor turns. If the motor does not turn, please follow our troubleshooting guide.
- To test the motor in reverse, set Velocity to “-1000 steps/sec”, and run again.
- If you have connected other sensors such as limit and home switches, you can block the sensors manually to see if there is a reaction in the Motion Test Panel.
- If you observe a difference between the "logical position" and the "encoder position," you might need to adjust the encoder output ratio on your motor driver. For example, if after a movement of 10000 steps, the logical position displays "10000" while the encoder position displays "1000", you should increase the encoder output ratio on the motor driver by a factor of 10. This will ensure that the encoder counts align with the logical counts.
Congratulations! By this point if your motors are turning correctly, then you have verified that the EMotion hardware has been correctly installed and configured.
WPC Device Drivers (WDD) installation and usage:
- Download the WPC Device Drivers and unzip the file.
- Double-click the VI Package file, and "VI Package Manager" will automatically install the VI Package. The installation will take about 10-15 minutes.
- If you have multiple versions of LabVIEW installed on your computer, select the correct LabVIEW version that you wish to use with EMotion.
- Verify that the "WPC Device Drivers" have been installed by opening LabVIEW and examining the tools palette. The Motion VIs will be available in the "WPC Drivers" palette.
The WPC Motion VI Palette:
Your first LabVIEW program
To start programming the EMotion controller in LabVIEW, it's best to begin with a shipping example. There is a LabVIEW example available for each supported function of EMotion.
You can access these examples in two ways:
- Use the Example Finder in LabVIEW (select Help » Find Examples). Toggle the "Browse according to:" radio button to "Directory Structure" and you will see all of the EMotion examples under "WPC Systems Ltd".
- Browse to your LabVIEW installation folder, and the examples will be located here: <LabVIEW folder>\examples\WPC Systems Ltd\WPC Device Driver\Examples\Motion.
When you have found the examples, a good starting point to use is "WPC Motion-1 Axis Move.vi”.
This VI follows the pattern of "Initialize -> Configure Motion -> Start Motion -> Monitor Status -> Close". From the front panel, you can select the options that apply to your motor driver, then run the program to see if the motor executes the expected behavior.
Alternatively, you can use the WPC Motion Express VIs to write your LabVIEW program. Simply drag an Express VI onto the LabVIEW block diagram and double-click to open a dialog window. From there, you can configure all of the move settings without using the individual low-level VIs. This makes it easier for beginners in LabVIEW to understand.
Congratulations! By now you should be able to control your EMotion movements from LabVIEW. From here, you can use design patterns such as State Machine or Queued Message Handler to build your LabVIEW motion control application.
Or, send us an email at support@tenet-tech.co and we’ll be happy to help you!