How to communicate with external ethercat drive

  • Did you tried this:

    O_CONTROL_WORD = 271  ; stop the motor
    O_MODES_OF_OP = 3     ; set profile velocity mode
    O_PROFILE_ACCEL = 15000
    O_TARGET_VEL = 20000  ; set velocity
    O_CONTROL_WORD = 15  ; start the motor
  • Yes I tried it as well but didn't work

    Ok, then you'll have to figure it out on your own by trial and error I guess. Those are values written in the manual.Usually manuals are correct. So in your working-ish code you have $OUT[1318] = TRUE ; stop the motor for stoping the motor, but from the manual and your program that signal is part of the MODE_OF_OP register so what is then right? I can only blindly guess 🤣, but I never worked with this drive neither I have option to test other values to give you the direct solution, but from the manual nothing special is written. One should just set the correct outputs in correct order and magic should happen. But I could also be miss reading something, somewhere in the manual.

  • why do you have line like

    $OUT[1318] = TRUE ; stop the motor

    as i see it, that is an unconditional stop and it is processed practically at the same time you are initializing motion. can you try to run without it or add before it something like :

    WAIT SEC 5 ; give it time to run before stopping.

    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

  • But isn't the signal $OUT[1318] part of the O_MODE_OF_OP(mode operation) and that signal shouldn't have anything with controling the motor. From the manual 16-bit Control Word(0x6040) register should be used for controling(enabling&stopping,halt,etc) or maybe he meant $OUT[1308] signal which from the manual is performing somekind of shutdown.

Advertising from our partners