Results 1 to 1 of 1

Thread: Using PCAN USB with CoDeSys and the Downloader

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2009
    ifm Exton, PA

    Default Using PCAN USB with CoDeSys and the Downloader

    The following tips and guidelines will help you establish a CAN connection with an ifm controller using both the Download tool and CoDeSys

    The dll Peak_USB.dll must be on your PC. This is installed with the ifm mobile version of CoDeSys (currently Also follow the insutrctions to properly install the PCAN Usb hardware and drivers.

    Configuring the Download tool:
    (refer to image Download_1.jpg)
    Set the 'Can Board Type' to PCAN USB
    Set the Baudrate and Download ID to match the controller. This can be found using a serial connection and the PLC Browser in Codesys. (See notes below)
    Typical Default Baudrate is 125k (See notes below)
    Typical Default Download ID is 32 or 127

    Then test communication by getting Identity.

    Configuring CoDeSys:
    The 'CAN Card Driver' must be set to 'Peak_USB'. Refer to image 'codesys_1.jpg)
    The download ID and Baudrate must match the controller.(See notes below)
    You should now be able to go online with the controller.

    The downloader and the Codesys Gateway CANNOT be open at the same time. If more than one instance of software is trying to access the PCAN USB card you will receive an error (refer to image error_1.jpg).

    After using Codesys you will need to manually shutdown the communications gateway in order to use the downloader over CAN. Look in your lower right task bar for the Codesys icon (red circle on top of yellow circle on top of green circle). Right click the icon and select exit. If you still receive the error you may need to reboot the PC.

    At the bootloader the default baudrate should be 125k. However, I noticed that when using a CR2500, after downloading v5 firmware, the baudrate then went to 250k. The Download ID remained 32. I have not verified with v4 firmware.

    The default Download ID should be noted in the datasheet of each controller, however you may need to verify for accuracy using the procedure below. Standard Default ID's are 32 and 127.

    Checking the Download ID using the PLC Browser.
    When using Codesys online (serial connection) on the resources tab there is an item called 'PLC Browser'. Open the browser window and type 'GetDownloadId' in the command line box. It will return the current Download ID of the controller. (Refer to image PLC_Browser.jpg).

    A standard 'Communicatio Error' from Codesys or the downloader will usually indicate an incorrect baud rate or download id.
    Attached Images Attached Images

Tags for this Thread

Posting Permissions

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