Results 1 to 3 of 3

Thread: CR1081 and CR0401 CANopen connection

  1. #1
    Join Date
    Aug 2016
    Posts
    28

    Default CR1081 and CR0401 CANopen connection

    I'm trying to update my CR1081 program from Codesys 2.3 to 3.5, I'm having trouble trying to figure out how to set up the CAN connection between the HMI and PLC. Does anyone have any steps on how to set up the CAN connection in Codesys 3.5 ?

  2. #2
    Join Date
    May 2009
    Location
    Minneapolis, MN
    Posts
    302

    Default

    You have to use the RCAN library in the CR1081 and do all the transmits and receives to the CR0401. There is no CAN based Network Variables in Codesys V2.3.

  3. #3
    Join Date
    Aug 2016
    Posts
    28

    Default

    I was able to get this to work with help from ifm support, just in case anyone else runs into a similar issue.

    I used the RCAN library on the CR1081 and enabled CAN1. (ifmRCAN.CAN_enable)

    I then had a CAN_Rx set up. (ifmRCAN.CAN_Rx)

    I had the aData input into a Array [0..7] of USINT

    I then had to do a memory swap. (SysMem23.SysMemSwap)

    I then output the aData to a data structure with my 4 UINT variables. (SysMem23.SysMemCpy, for dwCount used CAN_Rx_NetVar.usiDLC)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •