Showing results for 
Search instead for 
Did you mean: 

Codesys Softmotion with IndraDrive Cs

Codesys Softmotion with IndraDrive Cs

Established Member

Hello everyone,

I am configuring here a CtrlX-Core handling a single IndraDrive Cs via EtherCat SoE.

My goal at this moment is simply use the Codesys SoftMotion libraries in order to show existing customers that they could easily switch from MLC to CtrlX-Core and still comfortably use the PLC-Open function blocks.

I was able to configure the axis and the EtherCat Master at the CtrlX Works IO, as well as configuring the SoftMotion at the CtrlX Works PLC. However, it does not look like the PLC is in charge of the axis, after booting, the CtrlX-Core switches the axis from Init to OP (no problem), but I still can not PowerOn the axis using the SM3_Basic.MC_Power function block.

I am using CtrlX Works 1.12.9 here with IndraDrive Cs MPC20V.

I have tried to use the Drive as ServoDrive Profile and ServoDrive Profile No DriveEnable bit check, but none worked out. I tried to add the S-0-0134 and S-0-0135 in the AT/MDT lists but those parameters are deleted when the drive reaches OM.

I have followed all the steps from the link below (including adjusting the Main Task as External Event 07), but so far no success.

Please, take a look at the files below.

Any help is very much appreciated. 🙂



Community Moderator
Community Moderator

I'ld like to mention that also with ctrlX MOTION PLCopen function blocks are available. So customer do not need to use some 3rd party software. See Library CXA_PLCopen.

ctrlX PLC Engineering CXA_PLCopen libraryctrlX PLC Engineering CXA_PLCopen library

Hello CodeShepherd,

Thanks so much for your kind reply.

To be honest I would rather prefer using our function blocks directly without using 3rd party libraries (codesys).

Do you have any manual or step by step guide on how to set-up/configure the AXIS_REF? Because my axis here (the DataLayerNode) below is simply a DED.CAADiagDeviceDefault and not a proper AXIS_REF.

Thanks so much!



As mentioned in the online documentation inside the Axis_REF object is a String(15) located. The value needs to be the same then the ctrlX MOTION axis objects name:

ctrlX Motion axis CXA_PLCopen.MC_PowerctrlX Motion axis CXA_PLCopen.MC_Power

Hi again CodeShepherd,

I've been trying to use the MC_Power but I keep having no action on the drive. Stays on Ab and the CtrlX-Core does not report any error.

However, when I map the IOs directly via my own PLC variables, I am able to jump to AF and then, perform Position Control lagless with success (no problem). Look at screenshot below.

How did you map your Axis_Test (DataLayerNode) >> DataLayerNode I/O Mapping? Have you used a pre-defined variables from the CXA_PLCopen or CXA_Basic libraries?

I really would like to use the PLCopen fb instead of using the S-0-0047 directly.

Thanks in advance again! 🙂



For first commissioning we also have a how to video that shows the usage of ctrlX MOTION in combination with the ctrlX PLC. See this page for reference.

I did not do any mapping in the PLC. This would also lead to conflicts because PLC and MOTION would both try to command the drive.
The connection was established via the "Axis Profiles" in the ctrlX MOTION app and commanding all as well as position is done via this.

ctrlX CORE WebUI Axis Profiles mappingctrlX CORE WebUI Axis Profiles mapping

Hey CodeShepherd,

Thanks so much for the hint, I totally forgot to link the Axis Profile to the Axis. That was the bridge that was missing! Look below.

Everything is running perfectly with PLCopen fbs. Awesome!

My last comment here regards the CXA_PLCopen.MC_ReadActualVelocity, which is not working (value remais at zero). At the Axis page in the web server the velocity value also does not update. Any plans to calculate it internally in next releases? My Motion app is 1.12.5 and my PLC app is 1.12.4.

Thanks so much again for your patience!



Please have a look at topic "Velocity mode missing Ctrlx"

Hello @CodeShepherd 

I also have the same problem as the original question for this thread. I can't get the drive to enable using Codesys Softmotion MC_PowerOn. I want to use the Softmotion CNC and Robotics. So I can't use the Rexroth Motion library.

I think there is something missing in the instructions CODESYS Softmotion - How to configure ctrlX CORE a... (

Maybe something to do with setting up a profile?

Here is the status of the MC_Power function block. It seems to be stuck in Busy.


I can see some errors in the Axis configuration














It looks like the Ethercat bus is not running or the axis have some problems.
What is the status of the I/O Editior?
If everything is good there, please have a look in the PLC log, if there are any errors.
Have you tried the example "SoftmotionCncExample"?

I'm having the same problem as reported here.  My symptoms seemed to be exactly the same as bclapperton.  I had first followed the document posted by JordiLaboria.  I had a red triangle by the axis (see below).

But then followed the other link explaining the setup of the Task in the Scheduler.  After setting up the Scheduler the red triangle has gone away although I'm not sure I completely set it up correctly as I don't see what I entered displayed anywere, plus it seemed to error the first time I tried it???

Unfortunately I still can't get it to work as the MC_Power Function Block still shows "Busy" as bclapperton has posted.

I feel like something is missing.  I don't see one consise explanation of all the steps needed to get this to work.

I haven't seen anywere talking about the Rexroth Motion App.  My control originally had this setup along with the Axes with the Profiles set up.  I assumed this could cause some conflicts so at first I removed the Axes and then Uninstalled the Motion App.  I'm assuming we don't need the Rexroth Motion App???





Previous documentation indicated that the drive's I/O mapping should be configured as shown in the image below.  This contradicts the instructions found here:  CODESYS Softmotion - How to configure ctrlX CORE a... (



With this configuration SM3_Basic>MC_Power operated normally.  (Note that the Busy output stays on in normal operation.)

The old documentation, which is presumably now deprecated, is attached.

@PLC2030 Please review.




This fixed the problem for me.  Thank you!!