Results 1 to 5 of 5

Thread: CR0451 Demo Program

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

    Default CR0451 Demo Program

    Attached is a demo program for use in the CR0451.

    Here is also a link to a demo for the CR1081:

    http://mobilecontrols.ifmefector.com...read.php?t=218
    Attached Files Attached Files

  2. #2

    Default

    Even though from an old post should this demo work for a new controller? I get errors that it can't find about 5 of the libraries referenced. Would I just add the newest version of the libraries it's looking for and then delete the reference to the old one? Thanks.

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

    Default

    Yes, it is an older demo so the libraries and target would need to be updated.

  4. #4

    Default CAN_TX / RX & Sync questions

    After a long break from Codesys I've been back at it now. Been combing over the DemoStarterSet program being that I have a the Basic Kit here to work with. I'm getting fairly comfortable programming the CR0403 and CR0451 individually. Now I'd like to do more with them communicating together.

    After focusing on the PDM_TO_PLC and PLC_TO_PDM POU's I thought I had a good enough grasp to add another feature to the original DemoStarterSet program. I want to read a poteniometer input on Input 4 of the CR0403 and be able to use it in the CR0451 display.

    Using the same methods as in the original demo program, I captured the state of the input on the CR0403, packed it into the first to slots of the CAN_TX data array, and ran a CAN_TX just for this data in the PLC_PRG. Likewise I setup a CAN_RX on the CR0451 to read and unpack the value.

    Programs compile with no errors. They load up and run on the devices. The CR0403 is picking up the potentiometer reading on INPUT 4. But no dice on the display end.

    My guess is it has something to do with the Sync / Async functions in the PDM_TO_PLC. If that's the case, can you help me understand what the Sync and Async are doing in relation to the CAN_TX and CAN_RX? Thanks for the help. I'll post a couple screen grabs of what I'm doing if it helps.

    Silas

    https://www.dropbox.com/s/1t0k9r84nl...input.png?dl=0

    https://www.dropbox.com/s/q8tpeobo5o...nsmit.png?dl=0

    https://www.dropbox.com/s/yfj4s081nd...ceive.png?dl=0

    EDIT (late that night):
    OK, I think I'm on the right track now. Network Variables, right? All of our programming has been on single controller / device setups, so up to this point I haven't done anything with Network Variables. After doing some searches I found Jeremy's tutorial on Network Variables (http://mobilecontrols.ifmefector.com...light=tutorial). That was a great help. I am still curious though if someone can explain the way the sync / async functionality works.
    Last edited by Silas Curfman; 11-24-2014 at 01:24 AM.

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

    Default

    Sync / Async comes in with CANopen. If its set to sync the value gets sent when it sees the sync message (#80). Async is usually done on change (up to manufacture). Not sure where you were seeing it at.

    Anyways, yes Network Variables is where you need to be going.

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
  •