viman

MrPLC Member
  • Content count

    45
  • Joined

  • Last visited

Posts posted by viman


  1. If your CPUs have RJ45, Omron FINS ethernet is the easiest choice. I usually wire multiple CP1L-E that talk to each other in a network like this. It doesn't work to the same extend with a regular CP1L with CP1W-CIF41 - this can only REPLY back data. It won't process any network commands in the program but can answer a call.

    Set up the IP address and the FINS node on the configuration page of each PLC - nothing else needed. CPU1 is 250.1 node 1, CPU2 is 250.2 node 2, and so forth.

    1.png.47dc9a8aa646e897659c139bfc267a66.p

    Drag the SendData function block from the CX-Programmer library and set the parameters.

    2.png.e48e9773624c465e36ceed55c867068e.p

    • Network address should be local network (0 - default).
    • Node address is the node of the CPU you want to send data to.
    • Unit address is the type of device (0 for a PLC - default).
    • Send/receive area ID is the type of memory you want to exchange (P_WR for Ws, P_CIO for I/Os, P_DM for Ds)
    • Send/receive area number is the starting channel to write from/write to.
    • Data size is the number of channels.

    This is all in the pdf you bring by hitting right click -> function block reference.

    You can use the opposite function, RecvData, to read from a PLC that can't send commands, like the aforementioned CP1L.


  2. There's a CNC machine with Siemens hardware raising an error. It says the SINUMERIK 810D cannot connect to the controller. It used to take ten minutes, then half an hour, now it's not working. The S7 is giving a SF alarm, I need to connect to it to see what's the cause, but I'm an Omron guy so I need some help in this.

    636cc45517f11_Sinttulo.png.c60d1c0566f66

    This is the S7. It's mounted to the right of a Siemens power supply, all good, tested.

    I have the MPI adapter that works with the S7-300 with native serial port, but obviously here it doesn't fit. I have no idea if just a getting a new cable for the adapter will work. I don't even know if one can connect to this. I'm getting a vibe this is a only coupler for the SINUMERIK to use remote IOs.


  3. Encoder cards have bits to enable or reset the value, but they are not mapped by default. You have to map, if I don't remember wrong, the STATUS word inside the configuration of the module. Then you can either map that word to a variable or the individual bits you want as contacts/coils, and set the reset coil ON for a single cycle.

    I made this in the past, I'll look for the code and post it.


  4. The variable in question is registered on the IO Map menu just like any other input/output. There you can see what data type the encoder value is using and assign a name to it.

    I suggest you enable the Controlword input (I think - need to check this) on the card's side parameters, since I have needed to reset and enable manually the encoder reading in every single application that used one.


  5. Check my thread about a Yaskawa ECAT servodrive, it took me a lot of time to figure out and you may get some guidance from it. It sounds like you are getting the same behavior from the motor as I did.

    Rule of thumb, get the trial of Twincat3 on your computer and connect the drive directly to it. Use your computer as ethercat master; you can still test the motor even if it tells you your network card isn't ethercat compatible. See if it works with it.

    From there I just started comparing the chunk of parameters of the servodrive written by Sysmac and Twincat, and found out which ones were being wrongly set by SS. That gave me a hint of what kind of PDO mappings I should modify.


  6. Yes it is. Some days I get sick of it. It takes literal minutes to open a project, three minutes to detect a dropped connection, four seconds for each contact and relay you place in online editing mode. Removing a whole rung cause you didn't click in a specific part of all the white space, still the bug of selection rectangle not taking mouse client coordinates, variables taking forever to update in online, project compiling like every twenty seconds putting the element you are in out of focus. What about the awful performance of the simulator?

    CX-Programmer had all these things working better already


  7. Maybe the initialize feature needs the plc to be in PROGRAM mode. CX-Programmer behaved like this. If you are online in the plc, look for the PLAY/PROGRAM buttons next to the online/offline buttons. Click PROGRAM and try to initialize the drive.

    If it's not working create a new project, drag your drive from the toolbox in the ethercat category, go online and click Transfer to Controller (NOT compare). Like this

    AKDCKtC.png

    Then click on the drive and open the parameter list, and from there click the Transfer All to Drive button.

    MgWoLd0.png


  8. What's the reference of the drive? If it has buttons you can probably initialize setting a parameter. If not you are going to need a Omron NX/NJ to be able to transfer all the parameters from Sysmac to the drive. The parameters loaded by default when assigning the drive under the ethercat network should be the same as factory defaults.


  9. 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.


  10. 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


  11. 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


  12. 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).


  13. 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


  14. 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.


  15. 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.


  16. 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.


  17. 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.


  18. I will have a look at the functions, but for now I suggest you send and receive using only the plc and your computer. That way you can clear out it's not the plc.

    Normally I use the Hercules tool (HW group) or Wireshark. Hercules lets you set up tcp/udp servers and clients though. You can receive/write from Hercules back to your plc.

    There's many things that may not work here so the first thing to check out is that the UDP loop in the plc works.