viman

Controlling Yaskawa servo with NX via ethercat

18 posts in this topic

All of the ethercat servos I have installed are Omron. I have used many many brands in the past - over analog, pulse train, but not ethercat. I have one of the Yaskawa servopacks that can control two servos independently. The drive is all wired (POT, NOT, safety), autotuned, it's in RUN OK state, I have installed the ESI file, set up the axis, mapped the PDOs.. it's all working, but they do not move.

u4S3nip.png

Z7I92vX.png

I made a test program just with MC_POWER and MC_MOVEJOG/MC_MOVERELATIVE/MC_MOVEABSOLUTE along with the resetting of MC and EC and the servos do turn on, but ignore any movement command.

D415GiP.png

They do not flare up with an error, and they give me their actual position, so the network is working.

FMIXhwH.png

If I send the movement command the command position starts to differ, so the plc is/should be sending the command. I feel like there's something missing in the PDO mapping screen, but I didn't need to do all of this with Omron so I have no idea. I thought at first the servos needed huge units of movement and speed but the actual position value confirms this is not the case since it doesn't ever change.

Edited by viman
Wrong picture

Share this post


Link to post
Share on other sites

Your Acceleration and Deceleration input on the MC_MoveJog function block are both set to 0 which would mean the motor won't accelerate?

Share this post


Link to post
Share on other sites

AFAIK it's not necessary as long as the motor can reach the target speed. But I did try all kinds of values for acc, dec and velocity. From single digits to millions. The motors don't move since the encoder is always showing the same value. It does change if I move the motor by hand.

Share this post


Link to post
Share on other sites

Do you get any MC errors in the 'Tools' > 'Troubleshooting' section?

Do you get any Instruction errors from the MC_MoveJog?

If you have an Incremental Encoder, try running the MC_Home command. This shouldn't make any difference with the jog function but it worth a shot.

I haven't used Yaskawa but I have used other third party motors.

Share this post


Link to post
Share on other sites

No, there's no errors. Neither from EC nor MC (from plc/drive side, all OK). The move instructions do not throw errors either and they do set the done signal.

I can't home the servo at all since it doesn't move with MC_Home. There's something weird going on though.. MC_Power powers the servo but I can still move it with my hand. There's the internal relay activating inside the drive, but the servo doesn't have power whatsoever. Which is different from when I jog it from the yaskawa software - it sounds much louder, like they always sound like, and I can't move it manually (like it should be).

I have connected a spare Omron ethercat servo I have and it works with the same code, so either there's something wrong in the PDO mappings/ESI file or the drive is faulty/not compatible.

Share this post


Link to post
Share on other sites

It appears you have done some good troubleshooting. I would contact Yaskawa. Maybe they are aware of some compatibility issue with Omron. 

FYI... the MC_Home does not initiate motion. It will simply establishes a Home (or zero) condition when using incremental encoders. When it is not established it inhibits some MC instructions. This doesn't appear to be your issue though.

1 person likes this

Share this post


Link to post
Share on other sites

Thanks, I'm already in contact with both. But I always end up coming to this forum  :-)

Yaskawa's response is that so far everything looks correct and it should be moving. I went back to factory defaults and followed their quick guide for ethercat servos using twincat, since I have used Beckhoff in the past. It exhibits the same behavior there as in Sysmac. I can't jog the motor but it shows the encoder response.

I identified the issue with the 'soft servo on' though. It happens if I map the torque value PDO in Sysmac. I got rid of it, mapped the default PDOs, and works as it should now.

Omron's investigating my project. I'm gonna try hooking their G5 servo to twincat. If it works there I can definitely rule out the plc.

Share this post


Link to post
Share on other sites
4 hours ago, viman said:

There's something weird going on though.. MC_Power powers the servo but I can still move it with my hand. There's the internal relay activating inside the drive, but the servo doesn't have power whatsoever.

This is where I would be focusing. Depending on the size of the servo, I would expect it to react back (as you would ;-))

Do you have the manual that breaks down the control word? Perhaps that a single bit that is not being set correctly via the MC instructions?

I am thinking that you should be able to do everything without the SYSMAC motion instructions to confirm the PLC-Drive functionality & that there is something missing in the actual motions maybe. (you will probably have to un-allocated the control word though.?)

This is just an assumption though, but maybe something I would be trying if it were me.

Share this post


Link to post
Share on other sites

You are absolutely right. That's where I put the spotlight on this morning, since all it did was change from 0000 to 000F. The drive shows the actual command parameters (target velocity, target position) correctly as I send them from the plc, but I really doubt 000F is positive for movement. I once programmed pulse output manually in a NX and most bits of the controlword had to be activated. 000F looks like nothing.

I may try to recreate that project but I counted with a lot of info that time. Unfortunately, and answering your question, there's nothing regarding what it means in this drive. I did ask Yaskawa for these details however.

I'll get the controlword value sending the movements from twincat as the guide says, and see if it differs.

Share this post


Link to post
Share on other sites

I had a similar issue with Oriental Motor but it was concerning the Torque function. It seemed the Torque function wasn't ECAT Motion compliant. Anyway, I took a deep dive into understanding the motion control standard. Omron's Motion Control User's Manual actually does a really good job explaining the PDS State Transition. With that said, have a look at the MC_ChangePDSState instruction.

Share this post


Link to post
Share on other sites

Thanks all for the responses. I got it working under the NX, but I can't yet say what's going on.

I was following Yaskawa's quick guide for ethercat servos (AN.MTN.03) but yesterday it wasn't working so I thought about resetting the drive to factory defaults. After that I have done the same, connecting the drive directly to my computer (working as ethercat master, with no plc or coupler in between) and letting twincat 3 scan the network. It's working, but there's a catch.

If I do anything else than adding the drive to the ethercat network in Sysmac Studio (pdo mappings, enabling some setting, whatever), the drive stops working under any condition. It doesn't work anymore in twincat either as long as I don't factory reset and let twincat configure the network again. Sysmac Studio must be sending some wrong parameters cause it breaks the drive. Reminds me of my past thread where the ethernet/ip wasn't working and it turned out to be Sysmac too..

If I have time I will extract the parameters that differ in the drive from twincat vs sysmac

Edited by viman

Share this post


Link to post
Share on other sites
On 7/16/2021 at 2:32 PM, ahbest said:

Your Acceleration and Deceleration input on the MC_MoveJog function block are both set to 0 which would mean the motor won't accelerate?

Accel and decel can be left at zero, it will use the maximum as set in the axis settings.  This is detailed in the instruction help if you click F1.

Share this post


Link to post
Share on other sites

I left work late trying to understand what's not working. I have compared the parameters doing everything in Sysmac and the key is the 'mode of operation' parameter. Twincat immediately sets it to 8, which per the manual means the drive works in cyclic position mode. Sysmac sets it to 0 (no operation) under some circumstances I still haven't figured out. I can edit it manually with the drive's own software and the servo magically starts moving, but it's not a solution if the plc randomly changes it.

Aside from that, since the plc is not writing that parameter correctly, I still haven't been able to home the motors (requires changing mode of operation to 5).

Share this post


Link to post
Share on other sites

Can the 'mode of operation' be exposed via the PDO mapping? 

Share this post


Link to post
Share on other sites

Not really. You can't do anything with it other than mapping it to the axis, and since it's an output you can't assign it to a variable (unlike PDO inputs). I also discovered the MC functions don't work if I assign PDO objects to the 1st transmit/receive. I can only use the default 2nd, adding objects there if necessary, but that might be a requisite on Yaskawa's end

Share this post


Link to post
Share on other sites

Interesting.... I had the same problem with the Oriental Motor. Fortunately, it was already mapped in the PDO settings, In and Out. Does Yaskawa give the means to write via SDO?

Share this post


Link to post
Share on other sites

I will check the manuals but I haven't seen any SDOs so far. I did find however what the controlword and statusword mean in this drive. I'll locate the paper later and post it here.

Time is running out so I'm just going to make the homing sequence myself. I just needed to confirm if the plc was able to set that mode of operation parameter correctly on its own, so it can command the servo later via MC_MoveX commands. It does, mapping just the following PDOs in the 2nd channel or whatever it is.

  • Controlword
  • Target position
  • Modes of operation
  • --------------
  • Status word
  • Position actual value
  • Modes of operation display
  • Inputs

Anything else than that makes the motors stop working. With this the plc can change the mode of operation from 0 to 8. I confirmed this by resetting that value manually on the drive, so it appears twincat isn't necessary. I can use the MC features I need except homing.

These two motors have to work in sync at some point, but I guess (hope) that it falls back to the controller and works too

Share this post


Link to post
Share on other sites

The paper in question is SIEPS80000219, chapter 13.

End of the road anyway. With those parameters I can use jog, absolute and relative movements. I also tried linear interpolations and other sync movements and it seems to work. Looks like they all use the same mode of operation.

Omron told me they know first hand that NX works with Yaskawa SGD7S via ethercat. Mine is a SGD7W but aside from controlling two motors instead of one all the parameters are identical, so I don't know what's going on.

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