adccommunitymod (AutomationDirect) asked a question.

How can I backup a program stored in a CP128 CoProcessor module?

Created Date: October 01,2004

Created By: pjones

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I need to make a backup of a program which is currently runing in a F4-CP128-1 module. I understabd that I should be able to upload the program to a PC. As this didn't work with the module which is running, I am trying with a spare module with a spare base/CPU (DL440). The problem is that I am only able to communicate with the module when I install the CLRALL jumper of the module. But I also understand that this erases program 0 (which I want to backup) and other things. So, How do I backup the program? Any help will be highly appreciated.


  • adccommunitymod (AutomationDirect)

    Created Date: October 01,2004

    Created by: pjones

    I need to make a backup of a program which is currently runing in a F4-CP128-1 module.

    I understabd that I should be able to upload the program to a PC. As this didn't work with the module which is running, I am trying with a spare module with a spare base/CPU (DL440).

    The problem is that I am only able to communicate with the module when I install the CLRALL jumper of the module.

    But I also understand that this erases program 0 (which I want to backup) and other things.

    So, How do I backup the program?

    Any help will be highly appreciated.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: October 01,2004

    Created by: RHanrahan

    To be able to upload the program you have to "Stop " it first. After that it should be no problem to back it up. I typically save the program on the BCP to Program 3 because Program 0 is used for all the upload/download stuff. Then just set up the Auto start to program 3 after a power cycle.

    If the 440 BCP works like the 205 BCP, after you get to the programming window, click on System Status and when the alarm dialog box pops up just click okay. Then the Stop button with not be greyed out and you can click on it.

    Bob

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: October 02,2004

    Created by: pjones

    Thanks Bob for your reply.

    My next question is: So I don't need to use the CLRALL jumper?

    I will try what you suggest in the field in the meantime.

  • adccommunitymod (AutomationDirect)

    Created Date: October 02,2004

    Created by: pjones

    I finally solved my problem. It came out that the spare module had the program I was triyng to backup stored as program #1. So I was able to upload it to the PC. I also tried it in the field and made sure it is the same program which is running in the other module.

    I reconfigured the spare module's Autostart parameters at 2,1 (run program 1 without clearing tables).

    Anyway, I came to the conclusion that I always needed to use the CLRALL jumper in order to be able to upload the program.

    The program could not be stopped because it has a Break=0 sentence included (this avoids the program from being stopped by using the Ctrl-C or 'stop ' command).

    The question that remains is:

    Is it possible to upload a program like the one mentioned above without using the CLRALL jumper?

    What if the programmer left the running program as #0 (CLRALL jumper erases it)?

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: October 02,2004

    Created by: RHanrahan

    pjones,

    Is it possible to upload a program like the one mentioned above without using the CLRALL jumper?

    No. the active running program has to be stopped before you can do any up/downloading to the BCP.

    What if the programmer left the running program as #0 (CLRALL jumper erases it)?

    Now Mac may correct me here on Monday but I think that it would be erased if you do that. As far as I know, using the CLRALL jumper will erase Program 0.

    If i were you, I would remove the BREAK=0 from your program. That way you do not have to install the CLRALL jumper to stop the program. The original programmer may have set it up this way to make it difficult for someone to come along at alater time and mess with the program.

    The only time I use the CLRALL jumper is if I am having trouble getting the BCP to communicate initially.

    I hope this has helped,

    Bob

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: October 02,2004

    Created by: pjones

    Bob,

    Thanks for the info and good suggestions, they really helped.

    I will give them a serous thought and share them with my coleagues here.

    Anyway, if you o sMac have further information on this, let me know.

  • adccommunitymod (AutomationDirect)

    Created Date: October 04,2004

    Created by: MacS

    pjones,

    Bob is correct. You have to stop the BASIC program and get a command prompt before you can issue commands to the module.

    If you power up the F4-CP128-1 (or the F2-CP128) with the CLR ALL jumper installed then program 0 is cleared, all variables are cleared, the AUTOSTART parameters are cleared, and module is placed in a state where it is waiting for a space bar character to be received in port 1 ('system Stats ' or the 'Connect ' button in ABM Commander for Windows sends the space bar character) so that it can autobaud based on the baud rate and framing that it received the space bar character.

    Normally you should not need to use the CLR ALL to connect to the module. The CLR ALL jumper should only be used if sending a stop character (ASCII 3 / Ctrl C / 'stop ' menu selection in ABM Commander) to the command port (could be 1 or 2 depending on how the programmer left it) at the correct baud rate and framing does not stop the module.

    It is OK to run the program out program space zero but it is not recommended primarily because of what happens if you must break into the module using the CLR ALL jumper. Normally I recommend saving the program to a saved program space (program number>0) and setting the AUTOSTART parameters to run the saved program.

    One reason you might want to run the program out of program space zero is if you wanted to prevent an end user from accessing the BASIC program. If the program is in zero and BREAK=0 and LOCKKOUT=NOT(0) then there is no way to access the program unless you have programmed some mechanism (like a special string in the serial port, a certain value in a v-memory location, turning on a certain bit in the PLC CPU) into your program to allow it to be stopped. If the module is powered up with the CLR ALL jumper installed then the program would be erased.

    Expand Post