המותגים שלנו

Impact-Company-Logo-English Black-01-177x54

ברוכים הבאים לאתר האינטרנט של שניידר אלקטריק

ברוכים הבאים לאתר שלנו.
		
איך נוכל לעזור לך היום?
How to extend the life of a File System SD Card used for Logging Data
Goals and Symptoms
How to extend the life of a File System SD Card used for Logging Data

Facts and Change
Unity,

Causes and Fixes
The MODICON M340 and M580 SD Card Interface Buffer is 512 Bytes.
The optional SD File Storage Cards have 512 Byte Sectors.
The SD Card Interface includes Wear Leveling Algorithms.

SD Cards have a limited number of Write Operations per Sector before the Sector is marked bad (approximately 100,000).
Delete Operations also count against the number of Write Operations.
There is no 'Gas Gauge' to know when a Sector is approaching its end of life.

Because of these technology restrictions it is critical to optimize the use of the MODICON M340 and M580 SD File Storage Card.
This is accomplished by only writing 512 Bytes per Write Operation.

There are two exceptions to this:
> The total number of Bytes required in a file is less than 512 Bytes.
> The last Write to a file before closing it will be less than 512 Bytes.


M340/M580 SD File Storage Card Best Practices
1)Instances of the File Management EFBs in Unity Pro should be executed every scan.
This insures that the Done, Status and Error output data from them EFBs is always updated.
2)File names on the SD File Storage Card must be unique.
3)Files should be opened and remain open for as long as there will be data written.
Avoid Opening and Closing Files each time Writing is required.
4)Avoid FTP Client interaction with the Log Files that are currently Open.
5)The use of Periodic Scan Configuration of the MAST Task will reduce (improve) SD File Storage Card FTP file transfer time.


Below is Example Code. This code is only provided as a reference and is incomplete to actually
function as there is no File Create/Open nor Close.

The purpose of the Example Code is to demonstrate a method of limiting the Writing of data to the
SD File Storage Card with 512 Bytes when the overall amount of data needing to be written is
greater than 512 Bytes.

If you require a Functional Example or Application Assistance with MODICON M340 and M580 SD
File Storage Card Writing then contact your local Schneider Electric Representative or Schneider
Electric Technical Support.

Here are the Variables defined and used in the Example Code.

EXAMPLE CODE

IF %S13 THEN (* First Scan Initialization *)
MyDINT := 0;
My1025byteVariable := '';
END_IF;
IF WR_DATA_TO_FILE_EFB.DONE THEN
RESET(MyWriteToFile);
My512byteVariable := '';
JMP Skip_1_Scan;
END_IF;
IF NOT %S13 OR (WR_DATA_TO_FILE_EFB.DONE AND NOT MyWriteToFile_TargetReached) THEN
WHILE LEN_INT(IN := My1025byteVariable) <= 512 DO
MyDINTasSTRING := DINT_TO_STRING(IN := MyDINT); (* MyDINTasSTRING length = 11 characters *)
My1025byteVariable := CONCAT_STR(IN1 := My1025byteVariable,
IN2 := MyDINTasSTRING);
MyDINT := MyDINT + 1;
END_WHILE; (* here: the length of My1025byteVariable will always be 512..522 *)
My512byteVariable := My1025byteVariable; (* truncation will not set %S15 *)
MyTempINT := LEN_INT(My1025byteVariable);
My1025byteVariable := MID_INT(My1025byteVariable, MyTempINT - 512, 513);
END_IF;
Skip_1_Scan:
IF NOT MyWriteToFile_TargetReached THEN
SET(MyWriteToFile);
END_IF;
WR_DATA_TO_FILE_EFB(REQ := MyWriteToFile,
FILEDESC := MyFileDesc,
VARIABLE := My512byteVariable,
DONE => MyWriteToFile_DONE,
ERROR => MyWriteToFile_ERROR,
STATUS => MyWriteToFile_STATUS);
MyWriteTest_CTU(CU := MyWriteToFile,
R := %S13,
PV := MyWriteToFile_Target,
Q => MyWriteToFile_TargetReached,
CV => MyWriteToFile_Count);

שניידר אלקטריק ישראל

גלה עוד
טווח:
גלה עוד
טווח:

זקוק לעזרה?

  • בורר מוצרים

    חפשו ברשת של מפיצים מאומתים עם יותר מ-15,000 שקעי למכירה ברחבי העולם.

  • קבלת הצעת מחיר

    התחילו את בקשת הקניה בצורה מקוונת ונציג מכירות ייצור עמכם קשר.

  • היכן לקנות?

    אתר בקלות את מפיץ Schneider Electric הקרוב ביותר אליך.

  • מרכז העזרה

    חפשו משאבי תמיכה לכל הצרכים שלכם במקום אחד.

  • תיעוד מוצרים
  • בורר המוצר
  • מוצרים חלופיים והחלפה
  • מרכז עזרה ויצירת קשר
  • איתור סניפי שניידר אלקטריק
  • היכן לקנות
  • משרות
  • פרופיל חברה
  • דיווח על התנהגות בלתי הולמת
  • נגישות
  • חדר חדשות
  • משקיעים
  • EcoStruxure
  • חיפוש משימה
  • בלוג
  • מדיניות שמירה על פרטיות
  • הודעה על קובצי Cookie
  • תנאי שימוש
  • Change your cookie settings