News:

  • August 20, 2026, 11:47:30 PM

Login with username, password and session length

Author Topic: Restoring backup  (Read 16048 times)

BHVP

  • Newbie
  • *
  • Posts: 5
Restoring backup
« on: October 20, 2017, 04:27:50 AM »
After I created a backup through the BACKUP function I'm trying to restore it.
Whenever I reboot the PLC to restore it I keep getting error 0x8000. What can I do to fix this?

Also, when I try to browse through the files on the SD in the file browser I get the error; the parameter is invalid. Is this caused by the same problem?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: Restoring backup
« Reply #1 on: October 20, 2017, 07:23:21 AM »
Sounds like the SDCard may be corrupt. Can you view it from a PC?
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

ADC Product Engineer

  • Hero Member
  • *****
  • Posts: 270
Re: Restoring backup
« Reply #2 on: October 20, 2017, 08:26:05 AM »
Need to make sure that the SD card is formatted correctly (FAT32).  Also be sure that it only has a single partition.

BHVP

  • Newbie
  • *
  • Posts: 5
Re: Restoring backup
« Reply #3 on: October 20, 2017, 02:27:27 PM »
The SD card is formatted as FAT32 and has one partition. I can browse through it on a PC and see a Backup created by the plc.

I can't figure out why it doesn't work so I'm going to try it with a different SD. I will let you guys know the result if I get to it.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: Restoring backup
« Reply #4 on: October 20, 2017, 03:03:28 PM »
I'm not sure how to direct you. The high bit set means that the file system returned an error, and the error code is supposed to be in the low byte.

If you plug the card into the PLC after it has booted, does it mount? (led goes from red to green)
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

ADC Product Engineer

  • Hero Member
  • *****
  • Posts: 270
Re: Restoring backup
« Reply #5 on: October 20, 2017, 04:01:43 PM »
We tested with a few dozen different manufacturers cards and classes.  We didn't find any that failed to work, but obviously we did not cover every manufacturer out there.

BHVP

  • Newbie
  • *
  • Posts: 5
Re: Restoring backup
« Reply #6 on: November 03, 2017, 10:09:22 AM »
Sorry for the late response. I have tested it with a different SD card, 16GB SanDisk. The result is about the same, the restore doesn’t apply to changed variables. However this time it doesn't give an error message. Because of this I can’t provide you with a more detailed error message, sorry.

Perhaps I got the procedure wrong so I'll summarise what I'm doing;

- Create backup through the BACKUP command.
- Changed variables such as IP and different values inside the retentive memory location.
- Reboot the PLC using the REBOOT command and check if the changed values have changed back.

While I’m doing this the PLC is in Programming mode (switch is on TERM).

I hope this helps to find the problem.

In response to BobO, the SD card does mount correctly. I can see the LED turning from red to green and inside the program it gives a Mounted state in the BACKUP command.

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: Restoring backup
« Reply #7 on: November 03, 2017, 10:49:47 AM »
Sorry for the late response. I have tested it with a different SD card, 16GB SanDisk. The result is about the same, the restore doesn’t apply to changed variables. However this time it doesn't give an error message. Because of this I can’t provide you with a more detailed error message, sorry.

Perhaps I got the procedure wrong so I'll summarise what I'm doing;

- Create backup through the BACKUP command.
- Changed variables such as IP and different values inside the retentive memory location.
- Reboot the PLC using the REBOOT command and check if the changed values have changed back.

While I’m doing this the PLC is in Programming mode (switch is on TERM).

I hope this helps to find the problem.

In response to BobO, the SD card does mount correctly. I can see the LED turning from red to green and inside the program it gives a Mounted state in the BACKUP command.

Is it possible that the memory locations aren't updating because the PLC is not in run mode?

BHVP

  • Newbie
  • *
  • Posts: 5
Re: Restoring backup
« Reply #8 on: November 03, 2017, 10:59:28 AM »

Is it possible that the memory locations aren't updating because the PLC is not in run mode?

The PLC goes in to RUN after the reboot.

I contacted our supplier and he has the same problem. I guess I'll wait for his response for a solution. Thanks for thinking with me.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: Restoring backup
« Reply #9 on: November 03, 2017, 11:11:28 AM »
To Restore from SD card, the PLC switch MUST be in the STOP position (from the Designer Help topic DMD0425 Backup and Restore using a micro-SD Card (BRX-only)

Process to Restore an Image File from a micro-SD Card (Requires an PLC Reboot)

You can have the CPU automatically restore all of the contents from a previously built image file (image.bin) on the next PLC reboot.

Begin by inserting the micro-SD containing desired image file named "image.bin" in the root folder.

Set the PLC mode switch to STOP.

Reboot the PLC.

The contents of the image file will be restored during the first phase of the on reboot.

During the restore, the LEDs will show a sweeping pattern down from the micro-SD card.

Any error codes will be written to $ImageRestore (DST390

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: Restoring backup
« Reply #10 on: November 03, 2017, 11:33:07 AM »
To Restore from SD card, the PLC switch MUST be in the STOP position (from the Designer Help topic DMD0425 Backup and Restore using a micro-SD Card (BRX-only)

There is also a DST mechanism for doing this.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BHVP

  • Newbie
  • *
  • Posts: 5
Re: Restoring backup
« Reply #11 on: November 03, 2017, 11:42:42 AM »
To Restore from SD card, the PLC switch MUST be in the STOP position (from the Designer Help topic DMD0425 Backup and Restore using a micro-SD Card (BRX-only)

Process to Restore an Image File from a micro-SD Card (Requires an PLC Reboot)

You can have the CPU automatically restore all of the contents from a previously built image file (image.bin) on the next PLC reboot.

Begin by inserting the micro-SD containing desired image file named "image.bin" in the root folder.

Set the PLC mode switch to STOP.

Reboot the PLC.

The contents of the image file will be restored during the first phase of the on reboot.

During the restore, the LEDs will show a sweeping pattern down from the micro-SD card.

Any error codes will be written to $ImageRestore (DST390


Set the PLC mode switch to STOP.

I have no clue why I didn’t notice this, sorry for the inconvenience. The restore is working, however for the IP to be set back another reboot is required. This is not a huge problem though.

Is there a way to restore the backup without putting the switch in to STOP mode? This so the restore can be applied without physically being at the PLC?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: Restoring backup
« Reply #12 on: November 03, 2017, 12:23:55 PM »
Is there a way to restore the backup without putting the switch in to STOP mode? This so the restore can be applied without physically being at the PLC?

Yes. There was some debate as to whether we were going to do it or not. I think the code is there, but it isn't documented.

Write a non-zero to $ImageRestore:W0 (DST390:W0), then reboot. The PLC will clear the low word (:W0), and write the result code into the high word (:W1) after attempting the restore.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO