Motion Project Example: Single Axis With CDHD

From SoftMC-Wiki
Jump to: navigation, search
Language: English  • 中文(简体)‎

The following example show how to set a single axis with CDHD properties using softMC Configurator and how to make back and forth movement with increases velocity using it.

Download Example Files

Description Download
It's recommended to download the example ZIP file, extract all the project files, open project with ControlStudio, and run the example by yourself. You will find files description table bellow (4.1). The instructions will be listed below. Download.png

System Setup

In this example we used the following system:

  • softMC 7.
  • single CDHD driver connected to single motors.
  • Computer with ControlStudio and softMC Configurator.
  • Example files - Programs, setups, properties and more. You can find files description down bellow (4.1)

Wiring as showen:
sungleAxis CDHD.png

NOTE-Info.svgNOTE
In this example, the axis setup made with rev/sec units


The motor parameters calculate according to the manufacture, you can find the parameters witch change in the Excel file. {{Note|When using other drivers then CDHD, it's important to insert the motor pitch value (if there is one), as it provided from the motor manufacture, to the softMC Configurator, to get suitable Position Factor

softMC Configurator

To upload the example setups to your sofMC Configurator, open the example .mcfg file from the softMC Configurator.

After creating all project files with softMC Configurator or upload an existing project, you can run your robot from ControlStudio or from the softMC Configurator itself.
In this example we will make back and forth movement with increases velocity using MC-Basic program, from ControlStudio terminal.

For more information about how to setup single axis with CDHD parameters using softMC Configurator - look here

Running The Program

To upload the example setups to your ControlStudio, open the example .apj file from the Controlstudio.
When all relevant files upload to your controller, use the following code, from ControlStudio-terminal to run the example:

-->reset all
-->load AUTOEXEC.PRG   'wait until the program will terminate
-->load MoveAX.PRG
-->Stas MoveAX.PRG

Files table With Description

User Files
File Name Description Upload to Controller
singleAxis_CDHD Excel matrix that contain the information that you need to setup your robot.
Notice which information you need to import from your system.
CONFIG.PRG MC-Basic program that define the basic data so that ControlStudio and sofMC Configurator will work. +
AUTOEXEC.PRG Execute startPRG.PRG program. +
MoveAX.PRG Back and forth movement with increases velocity program +


softMC Configurator files - DO NOT MAKE ANY CHANGE
File Name Description Upload to Controller
AX_SETUP.PRG Axes parameters setup program +
CANSETUP.PRG CANopen communication parameter setup program +
EC_CDHD.LIB EtherCat communication function and subroutine with CDHD library file +
EC_USER.LIB EtherCat communication function and subroutine library file +
ETHERCAT.LIB EtherCat communication function and subroutine library file +
ECCONFIG.PRG EtherCat configuration program +
EC_SETUP.PRG EtherCat communication setup program +
RobLib.LIB Robot function and subroutine library file +
ROBOT.PRG Robot parameter setup program +
STARTPRG.PRG Program that runs all other softMC Configurator programs +
singleAxis.apj Project file - allowed to load an existing project from ControStudio.
singleAxis.mcfg Project file - allowed to load an existing project from softMC Configurator.
singleAxis.dat General project files
singleAxis.asn
singleAxis.pse