1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. KUKA Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

How to communicate with external ethercat drive

  • Kuka60HA
  • February 15, 2024 at 10:19 AM
  • Thread is Resolved
  • Kuka60HA
    Trophies
    1
    Posts
    16
    • February 15, 2024 at 10:19 AM
    • #1

    Hi there,

    I'm trying to set up an extruder on a KR60 robot with KR C4 8.3.46 to do some 3D printing stuff.

    I've received a stepper driver from Applied Motion, the model is a STF06-EC : driver's website

    On their website, there's a XML file that I've used to add the drive's informations to WoV.

    And I wired the EtherCAT in port of the motor drive with the EtherCAT out port of the EK1100

    It seems like the robot actually see the drive but now how can I talk to him ?

    I tried to map digital input and output but nothing changes when I display the I/O in the pendant.

    I have done the required physical wiring as I can jog the motor with the vendor's motor setting software

    I mapped the

    My goal was to create a simple programm just to be able to enable the motor, and make it turn.

    I've no idea about EtherCat and programm. Can somebody help me please with the code ?

    Thank you for your help...

  • MOM February 15, 2024 at 10:39 AM

    Approved the thread.
  • DannyDJ
    Reactions Received
    67
    Trophies
    6
    Posts
    505
    • February 15, 2024 at 1:07 PM
    • #2

    Did you map the STF-EC IO signals with the KRC I/Os in workvisual?

    Images

    • IMG_20240215_130750.jpg
      • 295.48 kB
      • 1,920 × 965
      • 25
  • DannyDJ
    Reactions Received
    67
    Trophies
    6
    Posts
    505
    • February 15, 2024 at 1:28 PM
    • #3

    And also for the outputs, from the STF_EC EtherCat manual IO signals match the signals defined in the STF-EC.xml file, so something should be visible or reacting, if you don't have no error messages on KCP and you've mapped correctly the signals.

    Images

    • IMG_20240215_131702.jpg
      • 195.24 kB
      • 900 × 1,200
      • 18
    • IMG_20240215_131649.jpg
      • 382.72 kB
      • 1,600 × 1,200
      • 21
    • IMG_20240215_131810.jpg
      • 243.77 kB
      • 900 × 1,200
      • 19
  • Kuka60HA
    Trophies
    1
    Posts
    16
    • February 15, 2024 at 3:17 PM
    • #4
    Quote from DannyDJ

    Did you map the STF-EC IO signals with the KRC I/Os in workvisual?

    Yes I did map them. I must be stupid but I'm trying to sent pictures here but can't figure how to import them...

    Also, where did you go to display that yellow/orange columns on your second picture ?

    Will provide you with pictures as soon as I understand how to attached them here :grinning_face_with_smiling_eyes:

  • panic mode
    Reactions Received
    1,295
    Trophies
    11
    Posts
    13,130
    • February 15, 2024 at 3:21 PM
    • #5

    in the IO mapping screen, near bottom of the window are several icons, one of them is pencil. this allows you to edit signals. this is optional, it just allows you to break and group bits differently (one could also just map them as is)

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • Kuka60HA
    Trophies
    1
    Posts
    16
    • February 15, 2024 at 3:23 PM
    • #6

    Based on your first picture, shall I use INPUT103 to INPUT114 and only these ?

  • DannyDJ
    Reactions Received
    67
    Trophies
    6
    Posts
    505
    • February 15, 2024 at 6:54 PM
    • #7
    Quote from Kuka60HA

    Based on your first picture, shall I use INPUT103 to INPUT114 and only these ?

    You need to map all STF-EC inputs and output if you want to use all of them. To which inputs or outputs on KRC side its up to you as long they are free, not already mapped to some other device. In the picture it is just an example how to map part of the STF-EC inputs to KRC. You could also post your WorkVisual settings, signals,...

  • DannyDJ
    Reactions Received
    67
    Trophies
    6
    Posts
    505
    • February 15, 2024 at 6:55 PM
    • #8
    Quote from Kuka60HA

    Yes I did map them. I must be stupid but I'm trying to sent pictures here but can't figure how to import them...

    Also, where did you go to display that yellow/orange columns on your second picture ?

    Will provide you with pictures as soon as I understand how to attached them here :grinning_face_with_smiling_eyes:

    There is an attachment icon and upload button above the reply button 😊.

  • Kuka60HA
    Trophies
    1
    Posts
    16
    • February 19, 2024 at 3:45 PM
    • #9
    Quote from DannyDJ

    There is an attachment icon and upload button above the reply button 😊.

    I can see the image icon but it's asking me source and link. Where do I find that ?

  • Kuka60HA
    Trophies
    1
    Posts
    16
    • February 19, 2024 at 3:49 PM
    • #10
    Quote from DannyDJ

    You need to map all STF-EC inputs and output if you want to use all of them. To which inputs or outputs on KRC side its up to you as long they are free, not already mapped to some other device. In the picture it is just an example how to map part of the STF-EC inputs to KRC. You could also post your WorkVisual settings, signals,...

    Alright I get it! Thank you

    I'm a beginner regarding programm and stuff, which input/output should I use to make to motor enable and rotate ?
    Once this is mapped, how do I write the programm to make it work ?

    In my TP, digital input/output doesn't light up when I upload the project with mapped input/output

  • SkyeFire
    Reactions Received
    1,060
    Trophies
    12
    Posts
    9,456
    • February 19, 2024 at 4:24 PM
    • #11
    Quote from Kuka60HA

    I can see the image icon but it's asking me source and link. Where do I find that ?

    You can simply drag&drop an image into the message window.

  • Kuka60HA
    Trophies
    1
    Posts
    16
    • February 19, 2024 at 4:59 PM
    • #12
    Quote from SkyeFire

    You can simply drag&drop an image into the message window.

    It doesn't work :fearful_face:

  • panic mode
    Reactions Received
    1,295
    Trophies
    11
    Posts
    13,130
    • February 19, 2024 at 5:10 PM
    • #13
    Quote from Kuka60HA

    I can see the image icon but it's asking me source and link. Where do I find that ?

    that only works for images that are already transferred to the forum server. for example images you see on other posts. but that is not what you want anyway, you want to attach new image for the first time. for that open the image in some image viewer or editor, copy the image content (not the file) then click into your post and paste it...

    right HERE

    Files

    Example.zip 7.15 MB – 17 Downloads

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • panic mode
    Reactions Received
    1,295
    Trophies
    11
    Posts
    13,130
    • February 19, 2024 at 5:22 PM
    • #14

    the other option is to not open file. just drag and drop it here from explorer.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • DannyDJ
    Reactions Received
    67
    Trophies
    6
    Posts
    505
    • February 20, 2024 at 8:14 AM
    • #15
    Quote from Kuka60HA

    Alright I get it! Thank you

    I'm a beginner regarding programm and stuff, which input/output should I use to make to motor enable and rotate ?
    Once this is mapped, how do I write the programm to make it work ?

    In my TP, digital input/output doesn't light up when I upload the project with mapped input/output

    Hello, after you have mapped the all the IO signals from STF-EC, then I would declare in $config.dat(R1/SYSTEM folder) the output/input signals with names that match the names in STF-EC manual.

    For example for "Modes of operation register" :

    Code
    SIGNAL O_CONTROL_WORD $OUT[1100] TO $OUT[1115] ; control register
    SIGNAL O_MODES_OF_OP $OUT[1116] TO $OUT[1123]  ;Modes of operation register

    Look in the picture at the attachments.

    Then for the Enable motor power, for example you set the corresponding value from the manual either in robot program or manually in variable single window for the testing.

    Code
    O_CONTROL_WORD = 7 ; enable motor switch on value 7-> only switch on
                       ; 15 -> switch on + enable operation

    But also you must enter the value for the target position(so i guess where you want the motor to go),speed value for target_velocity, etc...

    When the motor reaches the target position, the STF-EC will signal this with bit 10 (Target reached) in the status word register(which you mapped to your preferred KRC inputs signals),

    Also while motor is moving you should be able to see the current position in the "position actual value" register"(which again you mapped to your preferred KRC inputs signals).

    Also I would try to set the STF-EC from the STF-EC hardware manual, so that you don't need to set EtherCAT ID by S1or S2 rotary switch.

    2.8.2 Assigned by master controller

    When the drive’s ID is configured to be assigned by master controller in STF Configrator software, the master controller can set

    the EtherCAT node Alias ID to address 0004h of SII (Slave Information Interface) EEPROM. The drive can get this ID value from SII

    EEPROM address 0004h after power up.


    But I must tell I never worked with Microstep Drive in the past, so this you should just take as a guide or an idea, so it's up to you that you read the manual for STF-EC, because you have different options how to drive the motor, etc...

    Images

    • STF-EC_decl.jpg
      • 545.9 kB
      • 1,907 × 939
      • 26
  • Kuka60HA
    Trophies
    1
    Posts
    16
    • February 20, 2024 at 5:27 PM
    • #16

    Thank you Danny, it helped me a lot!

    I was able to enable the operation using that code so green light's blinking on the drive :

    DEF test()

    SIGNAL O_CONTROL_WORD $OUT[1300] TO $OUT[1315]

    INI

    O_CONTROL_WORD = 15

    ....


    Then I added target_pos and several profiles for velocity, accel and decel :


    DEF testmda2 ( )

    SIGNAL O_ CONTROL_WORD $OUT[1300] TO $OUT[1315]

    SIGNAL O_MODES_OF_OP $OUT[1316] TO $OUT [1323]

    SIGNAL O_TARGET POS $OUT [1324] TO $OUT[1355]

    SIGNAL O_PROFILE_ACCEL $OUT[1356] TO $OUT[1387]

    SIGNAL O_PROFILE_DECEL $OUT [1388] TO $OUT [1419]

    SIGNAL O_PROFILE_VEL $OUT[1452] TO $OUT [1483]

    INI


    O_CONTROL_WORD = 15

    O_MODES_OF_OP = 1

    O_TARGET_POS = 10000

    O_PROFILE_ACCEL = 20

    O_PROFILE_DECEL = 20

    O_PROFILE_VEL = 50


    PTP HOME Vel=100 % DEFAULT

    .....

    .....


    But nothing moves, what do I'm missing ?

  • DannyDJ
    Reactions Received
    67
    Trophies
    6
    Posts
    505
    • February 20, 2024 at 5:36 PM
    • #17

    At first glance, did you set the velocity? O_TARGET_VEL, as for velocity, Maybe your target velocity parameter is zero. And maybe try to set O_CONTROL_WORD at the end back to 31.

    O_CONTROL_WORD = 15

    O_MODES_OF_OP = 1

    O_TARGET_POS = 10000

    O_PROFILE_ACCEL = 20

    O_PROFILE_DECEL = 20

    O_PROFILE_VEL = 50

    O_TARGET_VEL = 5000

    O_CONTROL_WORD = 31

  • Kuka60HA
    Trophies
    1
    Posts
    16
    • February 21, 2024 at 11:34 AM
    • #18

    Awesome I could make it turn! Thank you so much

    Now, how do I proceed to make it turn forever ?

    I tried using different mode of operation but they all use target speed or target position to drive the motor as I understand, any way to create a loop somehow ?

    Thank you again to all of you guys for your helps, much appreciated

  • DannyDJ
    Reactions Received
    67
    Trophies
    6
    Posts
    505
    • February 21, 2024 at 1:45 PM
    • #19

    Did you try the velocity profile mode O_MODES_OF_OP = 3 (looking the table in picture)?

    You only need to set velocity, acceleration, deceleration.

    and with O_CONTROL_WORD = 15 it should rotate(you start the motor), and with O_CONTROL_WORD = 271 you stop the motor.


    from the manual:
    Profile Velocity Mode is a relatively simple operating mode. Once the velocity, acceleration, and deceleration are set, the drive

    will either command the motor to accelerate to the running velocity according to the acceleration parameter, or to halt movement

    according to the deceleration parameter.

    Images

    • Velocity_profile.jpg
      • 100.63 kB
      • 756 × 614
      • 13
  • Kuka60HA
    Trophies
    1
    Posts
    16
    • February 21, 2024 at 4:22 PM
    • #20

    Danny,

    With this programm, I'm able-ish to make it rotate constantly

    I'm saying -ish because there's a trick...

    The first time I start the programm, the motor rotate half of a turn and stop (he reaches the velocity I guess)

    But if I reload the programm and start it (from INI), now it turns constantly !

    And then I can use an output to stop it (1319 i.g.)

    It already happened to you ?


    &ACCESS RVP


    &REL 157


    &PARAM EDITMASK = *


    &PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe


    DEF testmda2( )


    SIGNAL O_CONTROL_WORD $OUT[1300] TO $OUT[1315]


    SIGNAL O_MODES_OF_OP $OUT[1316] TO $OUT[1323]


    SIGNAL O_TARGET_POS $OUT[1324] TO $OUT[1355]


    SIGNAL O_PROFILE_ACCEL $OUT[1356] TO $OUT[1387]


    SIGNAL O_PROFILE_DECEL $OUT[1388] TO $OUT[1419]


    SIGNAL O_PROFILE_VEL $OUT[1420] TO $OUT[1451]


    SIGNAL O_TARGET_VEL $OUT[1452] TO $OUT[1483]

    ...

    $OUT[1300] = FALSE


    WAIT SEC 1


    $OUT[1300] = TRUE ; enable communication



    O_CONTROL_WORD = 15


    O_MODES_OF_OP = 3


    O_PROFILE_ACCEL = 15000


    O_PROFILE_DECEL = 500


    O_PROFILE_VEL = 20000


    $OUT[1318] = TRUE ; stop the motor

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Similar Threads

  • How to communicate with a EtherCAT device in KRL

    • chiachingyen
    • June 12, 2021 at 11:38 AM
    • KUKA Robot Forum
  • How to integrate custom external axis into KRC4 compact setup - first steps done !

    • designingB
    • May 12, 2021 at 7:35 AM
    • KUKA Robot Forum
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download