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

How to setup a gateway (with CAN)?

Anonymous
2020-02-26
2020-07-17
  • Anonymous - 2020-02-26

    Originally created by: hedmant

    I'm trying to setup a gateway with CAN to be able to download a Codesys application to an ECU. However, no success yet...

    ECU: that is used is an TTC580.
    CAN adapter: Peak CAN (Dont know the model now)

    This is the steps that I tried with.

    1) flash the ECU with codesys_rts.hex (version 1.6.1.0). The download works fine with TTCDownloader tool.

    2) configure Gateway.cfg in Program Files(x86)/3S CODESYS/GatewayPLC with following values

    [ComponentManager]
    Component.1=CmpEventMgr
    Component.2=CmpCAATypes
    Component.3=CmpCAACallback
    Component.4=CmpCAAMemBlockMan
    Component.5=CmpCAATick
    Component.6=CmpCAATickUtil
    Component.7=CmpPCANBasicDrv
    Component.8=CmpBlkDrvCANClient
    Component.9=CmpCAASdoClient
    Component.10=CmpCAACanL2
    ...
    [CmpBlkDrvCanClient]
    CycleTimeMs=1
    NumChannels=2           ; Number of block driver instances
    0.Name=BlkDrvCanClient1 ; Name of this driver instance
    0.NetId=0               ; CANbus Network Id (0..n)
    0.Baudrate=500          ; CANbus Baudrate in kbit/s
    0.NodeId=2              ; Unique NodeId of the Gateway
    0.BlockTransfer=1       ; Use block transfer for higher performance
    

    3) stop and start the gateway via CODESYS Gateway systray

    4) Scan the network in Gateway in codesys.

    No success when following this procedure and the Peak CAN-adapter does not even blink. Is there some kind of driver needed in codesys to get this to work?

    Does anyone have an idea and can point me in the right direction?

    BR, Tony

     
  • e60newbie - 2020-07-17

    Hy,
    with the TTC580 you need to communicate with Ethernet. I don´t remember that you can flash the Application over CAN by the 580? We use the TTC540 without Ethernet and I can confirm that works fine with the Peak with the same settings above.

     
    👍
    1

Log in to post a comment.