Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

SoftMotion_KeyVisual.jpg

CODESYS SoftMotion - How to configure ctrlX CORE and Drives

PLC2030
Long-established Member
Introduction

This article describes the installation and the basic settings to run CODESYS Softmotion on ctrlX CORE with one IndraDrive axis. With the similar method ctrlX CORE with softmotion can be connected to ctrlX DRIVE. The article describes the proceeding with crlX CORE 1.20 or higher version.
Additional information is avaialble in the following documents:

Also, some help videos are available:

In case of questions or if you experience any problem you can submit your issue in the Area for CODESYS PLC Add-Ons in the Developer Community.

Installation

The following ctrlX CORE apps are required by CODESYS SoftMotion:

  • ctrlX PLC
  • EtherCAT Master

For engineering purpose, a PC with ctrlX WORKS installation is required. All ctrlX software components need to have version V1.20 or higher.
CODESYS SoftMotion and the adaption layer to run CODESYS SoftMotion on ctrlX CORE are provided as CODESYS packages in the Collaboration Room.

Warning label The installation of CODESYS packages requires administrator rights on your Windows PC.

CODESYS SoftMotion Installation

Copy the file CODESYS SoftMotion X.X.X.X.package (this article will use versin 4.15.0.0 as example) to your preferred file location, start ctrlX PLC Engineering and open Add-on installer through Tools -> Add-on installer.

Open Add-on installerOpen Add-on installer

When the Add-on installer is opened. Press the Install File button.

Press the Install File buttonPress the Install File button

Find you required Softmotion Package and select to install.

Find and select required Softmotion Package to installFind and select required Softmotion Package to install

Accept the license agreement and press continue button, then wait until the installation finish. This might take several minutes.

Accept the license agreementAccept the license agreement

You can find the CODESYS SoftMotion add-on exist in your Add-on Installer if you install the package successfully.

Package install successfullyPackage install successfully

Installation of ctrlX SoftMotion Adaption Package

Copy file ctrlX PLC CDS_SM Adaption X.X.X.X.package  (Till now the latest version of SoftMotion adaption package version is 1.20.4.0, please use this package or the newer version in the future)to your preferred file location. Open the Add-on Installer again as mentioned above.

Select the required adaption package and install.

Select adaption package and installSelect adaption package and install

Wait until the installation finish and then you can see the add-on is already in your add-ons list.

Installation finishInstallation finish

Configuration of Drive

The example is made with one IndraDrives. Ensure

  • that your drives are configured for EtherCAT SoE/CoE communication
  • that the EtherCAT line is connected correctly
  • the power supply of the drives is on.

In this example the drive is rotary axis.

Warning label The modulo handling is completely handled by CODESYS SoftMotion. Therefor the drives have to be configured without modulo handling and with the full 32 bit range for the increments. The parameter S-0-0278 must be set to its maximum value, namely 214748.3647. The value is the result of (2^31 - 1) / 10000.  

You can do this by ctrlX DRIVE Engineering. Click in the drive overview dialog on the box Axis mechanics / scaling and set the values like in the graphic below.

Axis mechanics / scalingAxis mechanics / scaling

I/O Configuration

Connect with your web browser to ctrlX CORE, navigate to the EtherCAT Master App and add an EtherCAT Master. 

Add an EtherCAT MasterAdd an EtherCAT Master

Start ctrlX I/O Engineering and define the name of your application and the destination folder on your engineering PC.

Create a new projectCreate a new project

Ensure that your drives are configured for EtherCAT SoE/CoE communication, the EtherCAT line is connected correctly, the power supply of the drives is on. Then click with the right mouse button on the Ethercatmaster node to open the menu where you can select Scan for Devices.  

Scan ethercatmaster for DevicesScan ethercatmaster for Devices

In the scan result you will see the drives which are connected to your ctrlX CORE. Press the button Insert all newly scanned devices in the scan result dialog to copy the drives to your project I/O configuration on the left side of the dialog.  

Insert all newly scanned devicesInsert all newly scanned devices

Closing the scan dialog with OK button will add the drives under the ethercatmaster node in IO Engineering. Download the EtherCAT configuration to your ctrlX CORE via the I/O Engineering tool bar.

Download the EtherCAT configuration to ctrlX COREDownload the EtherCAT configuration to ctrlX CORE

You can see a download completed info on the right bottom side of the window.

Download completedDownload completed

In ctrlX Web UI you can verify the EtherCAT status and change the operation modes. For further proceeding the operation mode OP has to be active. If the drives are not displayed in the slaves list, refresh the web page.

The OP mode of EtherCATThe OP mode of EtherCAT

PLC Engineering

Start PLC Engineering from ctrlX CORE Web UI.

In your PLC Project Tree, find DataLayer_Realtime, right click on it select Select realtime dataSelectively from ctrlX CORE.

Select realtime data from ctrlX CORESelect realtime data from ctrlX CORE

Select ethercat_master_instances_ethercatmaster in Source: Control, select the required datalayer node, and apply to add them to the PLC Project.  

Edit/Online from ctrlX COREEdit/Online from ctrlX CORE

Then you can see the Datalayer Node has been added. Right click on it, secect Adding SoftMotion SoE axis/Adding SoftMotion CoE axis depending on your device type.

Adding SoftMotion SoE/CoE axisAdding SoftMotion SoE/CoE axis

Then the softmotion axis will be added, softmotion function will be enabled automatically, required libraries will be added.

The softmotion axis has be addedThe softmotion axis has be added

Communication Configuration

To make sure the sycronization between PLC and EtherCAT, more configurations should be set.

Go to web UI, find Settings Schedular.

Settings x SchedularSettings x Schedular

In Schedular, switch to Configuration page, find the ctrlXAutomation task, press theDrop down icon button.

Configuration pageConfiguration page

A callable configure window will pop out, configure a PLC External Event on the configure window.

Callable configure windowCallable configure window

You don’t need do any settings on step 2 and step 3, press next until finish.

Process of add callable to 'ctrlXAutomation'Process of add callable to 'ctrlXAutomation'

You can see the callable you configured under the task ctrlXAutomation.

Callable of  'ctrlXAutomation' has be addedCallable of 'ctrlXAutomation' has be added

Then go back to the PLC Engineering, in the project tree, double click the MainTask. Configure the task type to External and select a task external event (make sure the external event number is the same as you configured on the web→schedular→ctrlXAutomation). If you have multi tasks in you project, make sure your softmotion functions runs under the external event task.

Configure the task type to External and select a task external eventConfigure the task type to External and select a task external event

Then double click on the EtherCAT Slave Node, change the Always updatevariables setting to Enable 2 (always in bus cyde task). If you have other EtherCAT Node here, each node should do the settings like this step.

Change the Always updatevariables setting to Enable 2Change the Always updatevariables setting to Enable 2

Write your PLC Motion Program

Now you can create your PLC motion program using the PLCopen motion function blocks.

 

 

MichaelB
MichaelB
Hi, I'm Michael and I work as a Product Manager for ctrlX MOTION. Contact me if you want to know more about this.
4 Comments
ericvergara
Occasional Contributor

Hello,

Where can I get this Softmotion 4.15 package?

I have checked in the Collaboration Room but I only have access to the 4.12 version,

Thanks,

_Beppo
Established Member

Hi,

We are also looking for Softmotion 4.15 and Adaptation 1.20.4 packages.

Thanks,

GB.

MichaelB
Community Moderator
Community Moderator

Hi, it will be uploaded during next days.

MichaelB
Community Moderator
Community Moderator

The update is now available in the collaboration room.

Must Read
Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist