Technical FAQs

Ask a Question

How does the M580 handle the Program/Data write process during a power failure with a SD Card?

Title
M580 PAC Program Backup
 
Issue
M580 PAC Program Backup with SD Card
 
Product Line
M580 PAC
 
Environment
Unity Pro 8.1 or higher
 
Cause
N/A
 
Resolution
 Since the M580 has a new internal flash compared to M340 : by default the application is primarily backed up in internal flash, then to SDcard. The addition of an internal flash makes the need for a SDcard optional in the M580 (compared to M340 where it is mandatory)
Since, our SDcard file system is an industrial one, no one cannot corrupt your SDcard, even if you extract it (or cut the power) during write or read.  If a write is interrupted by power failure, or you cannot store the entire application, at next power-up your system will restart with the application that was backed up in internal Flash. The process to read or write to the SDcard is relatively "slow" compared to internal flash; it is managed in a low priority task, which means it is managed "when the system has free time" for it.
 
On an M580, if a file is being written out to the SDcard and the write is interrupted by a power failure and the system cannot entirely write the application on SDcard, the PLC will boot from internal flash where we are sure that application was correctly backed up, thanks to our energy tank (super capacitor).
 
To allow enough time for the write to complete, there is an energy tank ("super capacitor") that allows M580 to perform operations after a power failure.  We have dimensioned this super capacitor to be able to store the application in the internal flash, with current data (up to 4Mo of data - max retained data).
 
Below are the various scenarios or to be more concise, below are some cases defined to better understand the management of an application restore using our 2 Flash memories (Internal and SDcard), depending on situation. Internal flash is proprietary compared to SDcard:
 
Case 1: Boot without SDCard - PLC restores application stored in Flash.
Case 2: Download application without SDCard - PLC stores application in Flash
Case 3: Boot with SDCard - PLC restores application from SDCard.
            **If a different application exists between Flash and SDCard -> copy restored SDCard application to Flash
Case 4: Download application with SDCard (regardless of existing application on SDCard) - PLC stores application in SDCard and Flash.
Case 5: Online modification without SDCard - PLC performs online modification in Flash.
Case 6: Online modification with SDCard - PLC performs online modification in SDCard and Flash.
Case 7: SDCard is inserted: Application RAM and SDCard applications are equal - when connected with Unity, SDCard icon displays "equal"
Case 8: SDCard is inserted: Application RAM and SDCard applications are not equal - when connected with Unity, SDCard icon displays "not equal"
Case 9: Boot with SDCard, application on card is not valid - PLC starts in NoConf. No copy of application from SDCard to Flash.
Case 10: Boot without SDCard, Flash application is not valid - PLC starts in NoConf.
Was this helpful?
What can we do to improve the information ?