Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: CR0020 2nd CAN interface

  1. #1
    Join Date
    Jul 2010
    Posts
    9

    Default CR0020 2nd CAN interface

    We have an application that will require 3 machines, each with a CR0020 controller and individual CAN I/O networks, to communicate between each other. We would like to utilize the 2nd CAN interface of the CR0020 controllers for the communications between the machines. This will keep the machine I/O networks seperate and minimize CAN traffic. Does anyone have any experience with this type of setup?

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

    Default

    That will work just fine. Its just how you setup the second CAN port.

    Do you wish to use Network Variables? If so just added add another CANopen Master to the CR0020, then add your Network Variables and chance the Controller Index to 1 (from 0).

    If you are just doing Layer 2 transmits and receives, then just use CAN2_TRANSMIT and CAN2_RECEIVE.

    Either way, make sure you use the CAN2 block to enable the second CAN port.

  3. #3
    Join Date
    Jul 2010
    Posts
    9

    Default

    Erik, thanks for the reply. Yes, I had planned on using Newtork Variables and setting up a 2nd CANopen Master for the CR0020. However, Codesys won't allow me to insert another master for the CR0020 in the PLC configuration. Any ideas on why I can't insert the 2nd master?

  4. #4
    Join Date
    May 2009
    Location
    Minneapolis, MN
    Posts
    300

    Default

    Sorry. I was wrong on this one. The 32 bit supports this but not the 16 bit.

    You will have to use CAN2_TRANSMITs and CAN2_RECIEVEs.

  5. #5
    Join Date
    Jul 2010
    Posts
    9

    Default

    Are there any example programs available using the CAN2_TRANSMIT and CAN2_RECEIVE blocks?

  6. #6
    Join Date
    Jul 2010
    Posts
    9

    Default

    We have it working properly now. The ENABLE input of the CAN2_TRANSMIT block needs to be activated by a pulsed timer bit or some other instance and not steady on (TRUE). Thanks.

  7. #7
    Join Date
    Aug 2009
    Location
    ifm Exton, PA
    Posts
    196

    Default

    You should still be able to use network variables on the second CAN interface

  8. #8
    Join Date
    Jul 2010
    Posts
    9

    Default

    Great. That would be the preferred method. Could you pleae provide some details as to how the network variables should be configured?

  9. #9
    Join Date
    Aug 2009
    Location
    ifm Exton, PA
    Posts
    196

    Default

    Same as you would for CAN1. Create a global variable folder, right click and select object properties. Click add network. Click the button that says settings and change the network number to 1.

    The rest will be the same.

    In a POU you should add the function blocks for CAN2 to enable the interface.

  10. #10
    Join Date
    Jul 2010
    Posts
    9

    Default

    Thanks for the reply. I have tried that exact procedure however the compiler returns an error indicating that no CAN controller can be found in the PLC configuration for that index.

Posting Permissions

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