Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Softmotion with Beckhoff + RPi - drive error

nwelling
2016-10-24
2018-03-08
  • nwelling - 2016-10-24

    Hello there,

    I have tried to get a Beckhoff synchronous servomotor running with Codesys. To get started I tried using the SoftMotionStartupDrive.project file from this topic.
    However when translating I get the error unknown type drive (sorry the errors are in german but I hope the codes and type names make it comprehensible enough, if not I can translate it all)

                    ------ Übersetzungslauf gestartet: Applikation: CoDeSys_SP_SoftMotion_RTE_V3.Application -------
                    Code typisieren ...
    [FEHLER]        SoftMotionStartupDrive2: START [CoDeSys_SP_SoftMotion_RTE_V3: SPS-Logik: Application](Element ID 36): C0032:  Typ 'Unbekannter Typ: 'Drive'' kann nicht in Typ 'REFERENCE TO AXIS_REF_SM3' konvertiert werden
    [FEHLER]        SoftMotionStartupDrive2: START [CoDeSys_SP_SoftMotion_RTE_V3: SPS-Logik: Application](Element ID 1): C0032:  Typ 'Unbekannter Typ: 'ADR(Drive.strDriveInterfaceError)'' kann nicht in Typ 'POINTER TO DWORD' konvertiert werden
    [FEHLER]        SoftMotionStartupDrive2: START [CoDeSys_SP_SoftMotion_RTE_V3: SPS-Logik: Application](Element ID 1): C0032:  Typ 'Unbekannter Typ: '__TYPEOF(Drive.strDriveInterfaceError)'' kann nicht in Typ 'TYPE_CLASS' konvertiert werden
    [FEHLER]        SoftMotionStartupDrive2: START [CoDeSys_SP_SoftMotion_RTE_V3: SPS-Logik: Application](Element ID 0): C0032:  Typ 'Unbekannter Typ: 'Drive.out.wControlWord'' kann nicht in Typ 'REFERENCE TO WORD' konvertiert werden
    [FEHLER]        SoftMotionStartupDrive2: START [CoDeSys_SP_SoftMotion_RTE_V3: SPS-Logik: Application](Element ID 3): C0032:  Typ 'Unbekannter Typ: 'Drive.in.wStatusWord'' kann nicht in Typ 'REFERENCE TO WORD' konvertiert werden
    [FEHLER]        SoftMotionStartupDrive2: PLC_PRG [CoDeSys_SP_SoftMotion_RTE_V3: SPS-Logik: Application](Zeile 5, Spalte 1 (Impl)): C0046:  Bezeichner 'Drive' nicht definiert
    [FEHLER]        SoftMotionStartupDrive2: PLC_PRG [CoDeSys_SP_SoftMotion_RTE_V3: SPS-Logik: Application](Zeile 5, Spalte 1 (Impl)): C0032:  Typ 'Unbekannter Typ: 'Drive'' kann nicht in Typ 'REFERENCE TO AXIS_REF_SM3' konvertiert werden
    [FEHLER]        SoftMotionStartupDrive2: PLC_PRG [CoDeSys_SP_SoftMotion_RTE_V3: SPS-Logik: Application](Zeile 9, Spalte 1 (Impl)): C0046:  Bezeichner 'Drive' nicht definiert
    [FEHLER]        SoftMotionStartupDrive2: PLC_PRG [CoDeSys_SP_SoftMotion_RTE_V3: SPS-Logik: Application](Zeile 9, Spalte 1 (Impl)): C0032:  Typ 'Unbekannter Typ: 'Drive'' kann nicht in Typ 'REFERENCE TO AXIS_REF_SM3' konvertiert werden
                    Kompilierung abgeschlossen -- 9 Fehler, 0 Warnungen
    

    I have no idea how to resolve this, can anybody point me into the right direction?

    Here is the setup: I use a Raspberry Pi, EtherCAT coupler EK1914, Servomotor terminal EL7211-0010 and a synchronous servomotor AM8131. (I use it for my master thesis)

    IMG: codesys_SoftMotionStartupDrive.jpg

     
  • eschwellinger

    eschwellinger - 2016-10-25

    Hi,
    you need to rename the SM3_Drive... in the device tree to 'drive' (or vice versa in the Pou SM3_Drive... as Axis input)
    Then rightclick on ethercat master (in the device tree) and -> update device to current version

    This should give an error free project (maybe also update device an Raspi deivice is needed if not)
    Keep in mind that you need for SoftMotion a rt_preempt patched Linux kernel to have the realtime capabilites for SoftMotion with distributed clocks
    Search the forum for this (Emlid for example is a ready to use image)

    BR
    Edwin

    IMG: Drive.jpg

     
  • massaproduxy - 2018-03-06

    Salut Edwin and Cie !

    I'm trying to get a Beckhoff servo AM3111 in motion through a drive EL7201 and as you'll notice, I'm a absolute beginner.

    First of all, the "Run" led of the drive (led 1) is flashing continuously (0.5 sec) : I don't know if it refers to the Bootstrap or the Preop state ?

    I'm also confused with renaming the SM3_Drive in the device tree
    As my CoDeSys version is in french, I don't know where to find the ""
    May be it's the reason why I can't activate the drive ?

    As PLC_PRG, I try the first example of the CoDeSys_SoftMotion_V2397_E.doc but at the moment, nothing is moving

    Thank you for your attention

    IMG: Capture EL7201.JPG

     
  • josepmariarams - 2018-03-07

    Mc_power tells you that the drive is enabled and without error.

    But you call mc_move absilute with execute directly in true without passing per false.

    Mc,_moveabsolute works with an edge in execute. It is not necessary(convenient) to put it inside an if. You can put it outside if and change execute from inside if.

     
  • massaproduxy - 2018-03-07

    Thank you Josep M. Rams for your answer and attention. I change the PGR as you advised but I still face difficulties.

    Status of the drive (EL7201) is : EtherCAT is not running and No driver found (!!)

    I also do not know if I change the right way the name of the drive in the "tree device" ?
    Where can I found the command :"-> update device to current version" ?

    IMG: Status EL7201_0001.JPG

    IMG: Connection.JPG

     
  • massaproduxy - 2018-03-08

    EtherCAT message diagnostic :

    Status read from slave address 1002 status 16#1D: Invalid Output Config

    ...

     

Log in to post a comment.