ni.com is currently experiencing download issues.
Support teams are actively working on the resolution.
ni.com is currently experiencing download issues.
Support teams are actively working on the resolution.
Introduction
NI SoftMotion is a very flexible motion control program, especially when using the Axis Interface nodes available in the Premium edition. Using Axis Interface, motion control information can be sent to any device. This example shows how to connect to 3rd party EtherCAT drives and provides examples for Danaher AKD and Yaskawa Sigma-V EtherCAT Drives.
Steps to Complete
The attached zip file contains the LabVIEW Project. The EtherCAT master and drives must be setup through the project. Once these are setup, deployed, and the Scan Engine is able to transition to active mode without any errors, the SoftMotion Axis Interface VI can be run and will send the drives interpolated position information that will allow all EtherCAT drives to be tightly synchronized.
While the Axis Interface VI is running, standard SoftMotion Function Blocks or Property / Invoke node commands can be executed. The Axis Interface will automatically pull the control information from the SoftMotion engine process that runs in the background and will update the EtherCAT drives every Scan Engine Cycle.
This example is for Advanced LabVIEW users who understand the concepts of SoftMotion, Axis Interface, and EtherCAT.
Additional Notes
Readme File:
Requirements / Setup:
LabVIEW 2009.1 or later
NI SoftMotion 2009.1 Premium or later
NI-RIO 3.4 or later
NI Indicom Driver for EtherCAT 1.2 or later
RT controller that supports EtherCAT (i.e. - NI-9022/3, NI-9024/5, NI-31x0, RT PXI etc)
SoftMotion Axis
Unbound
Set Limit / Home Active State settings
Optionally set:
"Enable Drive on Transition to Active Mode"
Software Limits
All other axis settings ignored / not implemented (control loop, analog input, digital inputs/outputs, encoder, capture/compare, etc)
Danaher AKD Drive option:
Use modified EDS file for Danaher AKD eCAT Drive located in EDS folder of the zip file (use this file and not the default EDS file)
Import this file in the LabVIEW Project:
Right-click EtherCAT Master in project; Utilities -> Import Device Profiles . . .
Set cRIO Scan Engine Rate set to 8ms or less
EtherCAT Settings:
EtherCAT Slace Device Properties -> EtherCAT:Advanced:Initial Commands
Data for Object Indes x60C2 Subindex 0x1 needs to equal scan time in millisecods (ex: if scan rate set to 4mSec, Data set to 04) - double click data field to change EtherCAT Slace Device Properties -> EtherCAT:Advanced:Distributed Clock
Distribued Clock Enabled
Cycle Time: 1
Shift Time: 0 uSec
All settings must be deployed
After settings are deployed and drive is powered - set scan engine to active.
Run "Axis Interface.vi"
Use SoftMotion Interactive Test Panel to test enabling and running motor. (Note - Standard AKM motors have very high resolution encoders - small moves may not be noticable).
Yaskawa Drive Option:
Modified EDS file for Yaskawa eCAT Drive (SGDV-xxxxExx Firmware vs 1.0) located in EDS folder (use this file and not the default EDS file)
Right-click EtherCAT Master in project; Utilities -> Import Device Profiles . . .
Scan Rate set to 4ms or less
EtherCAT Master Properties -> EtherCAT:Advanced:Distributed Clock
Additional Correction for Synchronized IO: 50 uSec
EtherCAT Slace Device Properties -> EtherCAT:Advanced:Initial Commands
Data for Object Indes x60C2 Subindex 0x1 needs to equal scan time in millisecods (ex: if scan rate set to 4mSec, Data set to 04) - double click data field to change
EtherCAT Slace Device Properties -> EtherCAT:Advanced:Distributed Clock
Distribued Clock Enabled
Cycle Time: 1
Shift Time: 125 uSec
All settings must be deployed
After settings are deployed and drive is powered - set scan engine to active.
Run "Axis Interface.vi"
Use SoftMotion Interactive Test Panel to test enabling and running motor. (Note - Standard Yaskawa motors have very high resolution encoders - small moves may not be noticable).
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.