BrunoRamos

NX1P2 Motion Control change output device with code

15 posts in this topic

Hi everyone,

To explain the problem a little bit: I have 2 systems that are equal, they have 1 PLC, 1 Inverter and 1 Servo Axis (Image01). The devices are connected via EtherCat. The thing here is tht in these systems the PLC and Servo Axis is the same but the inverter is different. My goal is to have the same project on both systems and depending on the inverter detected use the correct program.

What worked: If I add the 2 Inverters and 2 Servo Axis on the project on different nodes (Image02), I can detect which is present using the variable _EC_EntrySlavTb[n]. My issue is that if I want to make more replicas of the systems using different inverters I will eventually hit the Axis Number limit for the PLC while in reality I am only using on Servo Axis at a time.

What I wanted: I would like to be able to control 1 Servo Axis with 2 different inverters (only one active per PLC) (Image03).

What I tried: The axis parameters can be set using a variable of the type _sAXIS_PARAM, however it seems that the option to change the axis basic settings is not available (Manual: NJ/NX-series Motion Control Instructions Reference Manual (W508) page 5-58) (Image04). The axis basic settings is where the definition of the output device plus control words are set (Image05).

Is there a work around to solve this issue? I would really like to avoid having to manually change the output device for the Servo Axis every time I make an update on all the systems.

 

Best Regards,

BR

 

Image01.PNG

Image02.PNG

Image03.PNG

Image04.PNG

Image05.PNG

Share this post


Link to post
Share on other sites

The variables for the axis reference structure is READ ONLY.  All system variables are.

You cannot write to that variable.  The settings for an axis must be made in the axis as shown in the Multiview Explorer.  Those settings cannot be changed in the program code in any way that I am aware of.

The instructions MC_ReadAxisParameter and MC_WriteAxisParameter are able to change some, but not all axis settings, as you are seeing. 

 

 

Share this post


Link to post
Share on other sites

If you set up and configure your axes normally but set them to DISABLED I believe toggling the _EC_ChangeEnableSetting in your code should allow you to select which drive to use.

This should toggle the _EC_PDSlavTbl[*] so you know which drive is enabled.

Not 100% sure but worth a try.

 

Axis Disabled.jpg

Share this post


Link to post
Share on other sites

Thanks for the replies @Crossbow and @BITS N BYTES.

I will try these Enable/Disable Settings but I believe this is not my issue. I can automatically detect which drives are on and run the program normally.

My struggle is the pairing off the Servo Axis with the drives. Basically, if you look at Image03 you'll see that I have 2 Drives E001, E002 and 1 Servo Axis MC_Axis000, how can I choose which driver I want to use to control de Servo Axis automatically?

 

@Crossbow is there no other way of changing certain axis parameter without using the Multiview Explorer? (Assuming the Multiview Explorer  is the Sysmac Studio interface)

Share this post


Link to post
Share on other sites

I have tried the Enable/Disable options mentioned above. Basically what this does is disable the driver communication without getting EtherCat errors. This is useful, however it doesn't fix my Servo Axis control problem.

One thing that I tried: Creating multiple Motion Control Axis and link them with the same inverter on the Output Device in the Axis Basic Settings. I didn't get any error from the software so I assume it is possible for some inverters to control multiple axis at the same time (this test was done offline). But what I need is the reverse, instead of having multiple Motion Control Axis linked to 1 Driver, I need mutiple Drivers linked to 1 Motion Control Axis.

Share this post


Link to post
Share on other sites

Hmmm! I am confused as to why you are using configuring the Delta 300 series VFD drive as an AXIS??

Normally a VFD drive is just another node on ETHERCAT but it is NOT an Axis.

Please clarify.

Share this post


Link to post
Share on other sites

Yeah VFDs are not typically configured as motion axes.  I wondered why you kept saying inverter.

Multiview Explorer is the left navigation window in Sysmac Studio.  Axis settings can only be edited there, they cannot be edited on the fly.

And no, you certainly cannot connect more than one device to one motion axis.  If you try to connect it to servo amplifiers, you will see that after you assign a node to an axis, that node is not available to use for another axis.

Why not drive a virtual axis for your control, and then use MC_GearIn and MC_GearOut to control the actual output axis?

Share this post


Link to post
Share on other sites

You guys caught me here, I wasn't expecting you to check on the components used.

Please let me redo the example. Please check the Image06 attached. Instead of the Delta drive I am now using Omron G5 Series Servo Drives R88D-KN02H-ECT and R88D-KN04H-ECT. If I want to change which drive is controlling the MC_Axis000 I need to go to the Axis Basic Settings and manually change the Output Device to the desired node.

About using 'Inverter' on my previous post, I may have some word mixed up on my side. I googled it and I think the word I was looking for was in fact VDF.

Really sorry for the confusion here and thank you very much for your replies @Crossbow and @BITS N BYTES

Image06.PNG

Share this post


Link to post
Share on other sites

You must have two axes in the axes setting one for each servo. Set them BOTH to disabled and enable which one you wish to use.

Once complete you can use similar code to define which one is OK.

Attached is example how to check.

 

 

 

614ca953731ea_CodeExample.thumb.jpg.bf46

Edited by BITS N BYTES

Share this post


Link to post
Share on other sites

This is what I need, thank you very much.

But what If I reach the maximum number allowed for the PLC?

Share this post


Link to post
Share on other sites

Dependent on PLC model.

Don't see the PLC model in any of your prior posts?

Share this post


Link to post
Share on other sites

The one I have for testing is a NX1P2. It seems I can only create up to 8 Axis, even if 7 of them are disabled.

Share this post


Link to post
Share on other sites

You are correct, you can only create 8 axes in that CPU.

And VFD and inverter are basically 2 names for the same device.  And they don't get connected to motion axes, they are typically for speed control not position control.

Share this post


Link to post
Share on other sites

The VFD's are just an additional Ethercat device and are NOT counted as an axis. So you should be good to go per your previous posts.

This also applies to other Ethercat devices provided they are NOT an Axis. i.e. NX I/O/ IO Link, Ethernet IP etc...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now