存储卡MMC的选型计算

2018年6月26日22:38:05 发表评论 97 阅读

MMC常见问题列表

QUESTION 1 : 如何确定STEP7中的工程项目需要使用多大空间的MMC卡?

QUESTION 2 : MMC卡上存储程序块或数据块的限制是什么?

QUESTION 3 : 如何删除MMC卡上的数据或程序?

QUESTION 4 : 31X型PLC插入MMC卡后,STOP灯不停闪烁,怎么办? 或 如何格式化MMC?

QUESTION 5 :插入MMC卡的S7300 PLC不能正常调用SFC54程序块?

QUESTION 6 : 采用MMC卡的S7300和C7613,635系列CPU是如何完成数据保持功能的?

QUESTION 7 : 我如何将一些系统文件或是项目相关的文件存储到MMC上?

QUESTION 8 : 我想将我的STEP7项目完整地保存在MMC卡上,该选择多大的MMC?

QUESTION 9 : 我对插入MMC卡的S7300PLC进行了加密,但我忘记了密码,如何才能对MMC解密, 或删除MMC卡上的密码?

 

MMC卡是西门子新型PLC的程序、数据的存储体,目前应用于以下几种PLC产品:

6ES7312-1AE14-0AB0
6ES7312-5BF02-0AB0
6ES7312-5BE03-0AB0
6ES7312-5BF04-0AB0
6ES7313-5BF03-0AB0
6ES7313-5BG04-0AB0
6ES7313-6BF03-0AB0
6ES7313-6CF03-0AB0
6ES7313-6CG04-0AB0
6ES7314-1AG13-0AB0
6ES7314-1AG14-0AB0
6ES7314-6BG03-0AB0
6ES7314-6BH04-0AB0
6ES7314-6CG03-0AB0
6ES7314-6CH04-0AB0
6ES7314-6EH04-0AB0
6ES7315-2AF03-0AB0
6ES7315-2AG10-0AB0
6ES7315-2AH14-0AB0
6ES7315-2EH13-0AB0
6ES7315-2EH14-0AB0
6ES7315-2FJ14-0AB0
6ES7315-6FF04-0AB0
6ES7317-2AJ10-0AB0
6ES7317-2AK14-0AB0
6ES7317-2EK13-0ABO
6ES7317-2EK14-0AB0
6ES7317-2FK14-0AB0
6ES7317-6TK13-0AB0
6ES7318-3EL00-0AB0
6ES7318-3EL01-0AB0
6ES7318-3FL01-0AB0
6ES7313-6BG04-0AB0

注:以上产品的订货号会因为产品软硬件的升级略有调整,产品特性以产品名称为准。

 

  1. 在定购以上产品时,PLC本身不带有MMC卡,所以为了正常使用PLC,您必须根据您工程项目实际需求定购一个大小适用的MMC卡,如果您的PLC上未插入MMC卡,你是无法将STEP7中的程序和数据下载下去的,同时你应当注意,不能带电插拔MMC卡,否则会丢失程序或损坏MMC卡。
  2. 在Simatic manager中,选择一个程序块下载,则该块被下载到MMC卡中,如果在窗口左边的树型图中选中Block文件夹进行下载,则所有的块被下载到MMC卡上,MMC中原有的信息将被覆盖,向MMC卡读写数据或下载程序的次数不受限制。
  3. 除过CPU中集成的SFB/SFCs块外,MMC当中其他的块可被在线删除。
  4. 对某些CPU用新版MMC卡(6ES7 953-XXX10-0AA0)替代旧版MMC卡(6ES7 953-XXX00-0AA0)时需要升级PLC的OPERATING SYSTEM。升级时需要使用PG(6ES7798-0BA00-0XA0)或带USB口的编程器(6ES7792-0AA00-0XA0),通过STEP7 MANAGER窗口中的菜单功能“PLC/UPDATE OPERATING SYSTEM”将CPU_HD.UPD文件写到MMC卡上,CPU_HD.UPD文件可以在www4.ad.siemens.de网站上下载得到。
  5. MMC卡作为CPU的装载内存(Load Memory),在为您的CPU选型MMC的时候,我们建议您所选的MMC卡一定要大于等于您所选定的CPU工作内存的大小(work memory),最好比工作内存大一些,但如果您的应用中,PLC工作时要使用大量的过程数据,历史数据,配方数据等或控制工艺中存在较多的用户程序块、STEP7中的应用功能块(如FB41、FB42等)时,建议选用2-8M的MMC卡,但请注意只有314、315-2DP、C7系列的PLC支持8M的MMC卡。
  6. MMC卡是装载内存,所以不能够在上位机中的组态软件中直接读取MMC卡上的数据值(DB块中的数据),组态画面读取的是PLC RAM内存中的数据。
  7. 在西门子的PLC上必须使用西门子专用的MMC卡,如下表中所列出的,不能使用数码相机、移动电话或PDA等数码产品使用的通用型MMC卡。

The order numbers for MMC cards are in the following  table:

Micro Memory Card / S7-300 Order number
64 Kbytes 6ES7 953-8LF31-0AA0
128 Kbytes 6ES7 953-8LG31-0AA0
512 Kbytes 6ES7 953-8LJ31-0AA0
2 Mbytes 6ES7 953-8LL31-0AA0
4 Mbytes 6ES7 953-8LM31-0AA0
8 Mbytes 6ES7 953-8LP31-0AA0

QUESTION 1 : 如何确定STEP7中的工程项目需要使用多大空间的MMC卡?

Answer :确定您的控制程序所需的MMC卡的大小,可以按以下步骤进行:

  1. 在STEP7 Manager中打开您的Project;
  2. 选中您的程序块,点击鼠标右键(或快捷键Alt + Enter),打开程序块的属性页面:

New Folder\1.bmp

  1. 选择弹出窗口中的General-Part 2页面:

New Folder\2.bmp

从上图中可以看出您的某个程序块在PLC中占用装载内存和工作内存的字节数。

  1. 将您项目中所有程序块(OB、FC、FB、DB)占用装载内存(Load Memory Requirement)的数量加在一起:

New Folder\3.bmp

这里的OB1程序块需要占用装载内存(即MMC卡)中的248个字节。

New Folder\4.bmp

这里的FB101程序块需要占用MMC卡中的4490个字节。

将OB、FB、FC、DB(不包括SFC、SFB、System data)所需占用的字节数加在一起:

存储卡MMC的选型计算-5

得到的总的字节数量在除以1024,就可以知道您的Project中的程序块需要多大的MMC卡空间。

  1. 如果您已经有Siemens的PLC和MMC,那么您可以通过在线诊断,获取PLC工作内存和装载内存(MMC卡)的使用情况。

在STEP7 Manager界面中,选中CPU,用CP5611或PC-Adapter连接PLC的MPI通讯口,使用快捷键Ctrl + D,弹出PLC的诊断信息窗口:

当MMC卡未插入PLC中时:

New Folder\9.bmp

因为PLC中没有插入MMC卡,Load memory RAM + EPROM列为空,Work Memory列中显示当前PLC的工作内存为48K,EPROM是S7-400、旧款S7-300使用的装载内存卡;

在PLC中插入MMC卡时

使用快捷键Ctrl + D弹出PLC的内存使用情况:

New Folder\10.bmp

可以看出PLC的内存使用情况为0%,空余128K装载内存和48K工作内存;

将您的程序下载到PLC当中:

New Folder\6.bmp

使用Ctrl + D弹出PLC的内存使用情况:

New Folder\8.bmp

可以看出,您的控制程序在PLC中对装载内存和工作内存的占用情况。

返 回

QUESTION 2 : MMC卡上存储程序块或数据块的限制是什么? Is there any restriction to the number of blocks I can load onto an MMC (Micro Memory Card)?

ANSWER:
Yes, there is a limited number of blocks you can load onto an MMC depending its size as shown by the table below:

Type MLFB Maximum number of blocks
MMC 64KB 6ES7953-8LF11-0AA0 768
MMC 128KB 6ES7953-8LG11-0AA0 1024
MMC 512KB 6ES7953-8LJ11-0AA0 2560
MMC 2MB 6ES7953-8LL11-0AA0 6528
MMC 4MB 6ES7953-8LM11-0AA0 12672

Table 1: Maximum number of blocks on an MMC

Please note here the applicable quantity framework for each CPU (number of blocks altogether).

返 回

QUESTION 3 : 如何删除MMC卡上的数据或程序?
How can I delete the data or program on a MMC (Micro Memory Card)?

You can use the following procedure to delete the block on an MMC in the CPU:

  1. The MMC to be deleted is slotted in the CPU.
  2. In the SIMATIC Manager, switch to online mode via "View > Online" or by pressing the appropriate button.
  3. In the Online window, you select the block folder.
  4. Select all the blocks in the folder which you want to delete.
  5. Click the "Delete" key on your PC keyboard (you can acknowledge the message that system functions cannot be deleted).

QUESTION 4 : 31X型PLC插入MMC卡后,STOP灯不停闪烁,怎么办? 或 如何格式化MMC?
Why does the STOP LED flash on my CPU 31xC when the MMC (Micro Memory Card) is slotted? The CPU does not behave like this with other MMCs.

ANSWER:
The MMC in your CPU is not formatted or contains data that cannot be interpreted by this CPU (e.g. the configuration of a different CPU type or an operating system not compatible with the CPU).

WARNING:
When you format the MMC all the data that is located on the MMC is deleted!

Proceed as follows to format the MMC.

  1. Your CPU requests an overall reset (slow flashing of the STOP LED).
  2. Put the switch into the MRES position and hold it there until the STOP LED lights permanently (approx. 9 seconds).
  3. You must then release the switch within the next 3 seconds and then put it back into the MRES position. The STOP-LED now flashes during formatting.

If the MMC cannot be formatted as described above, then the MMC is defective.

NOTE:
It is only possible to format the MMC if there is data located on the MMC that is invalid for the CPU. Otherwise the MMC is only initialized through the steps described.

More information on the MMC is available in Entry ID: 8861901

QUESTION 5 :插入MMC卡的S7300 PLC不能正常调用SFC54程序块?
Why does the SFC 54 "RD_DPARM" not work with the new S7-300 CPU with MMC?

ANSWER: ;
In the new S7-300 CPUs with micro Memory Card, SFC 54 "RD_DPRARM" for reading out a data record of a chosen block of the system data configured with STEP 7 has been replaced by SFC 102 "RD_DPARA".

SFC 102 "RD_DPARA", in contrast to the old SFC 54 "RD_DPARM" is an asynchronously executed system function. This means that the processing is extended over various SFC calls.

Blocks containing SFC 54 "RD_DPARM" can not be loaded to a new S7-300 CPU with MMC. Therefore, please replace the call fo the SFC 54 "RD_DPARM" by the call of the SFC 102 "RD_DPARA" and adjust your programming logic to the asynchronous behaviour of the SFC 102 "RD_DPARA" an.

Below, you will find a comparison of the two system functions:

SFC 54 "RD_DPARM" SFC 102 "RD_DPARA" Observations
 Inputs  
--- REQ Function will be executed only with REQ=1; new for SFC 102
IOID --- Parameter has been dropped for SFC 102; see LADDR
LADDR LADDR SFC 54: any block address, specification of the E resp. A address range over IOID ((B#16#54=Peripherie Eingang; B#16#55= peripherial output) SFC 102: any block address; Specification of the E resp. A address range over bit 15 of LADDR (most siginficant bit) Bit15=0 -> peripherial input Bit15=1 -> peripherial output
RECNUM RECNUM use identically
Output
RET_VAL RET_VAL use identically; however, there are additional error numbers for SFC 102 at disposition.
--- BUSY BUSY=1; the order has not been finished so far, there are no results at disposition
RECORD RECORD use identically

Table 1: Comparison SFC 54 and SFC 102

QUESTION 6 : 采用MMC卡的S7300和C7613,635系列CPU是如何完成数据保持功能的?
How does the remanence function of the S7-300 CPUs and C7-613 and C7-635 compact devices work with Micro Memory Card?

ANSWER:
The remanence characteristics described below affect the S7-300 compact CPUs, S7-300 modular CPUs and the C7-613 and C7-635 compact devices with MMC. We describe the remanence characteristics after changes in operating mode in terms of data blocks, times, counters and markers.

Data blocks:

  • CPU STOP/RUN or Power OFF/ON
  1. Database contents of CPUs 31xC, 312, 314, 315-2DP, C7-613 and C7-635 are always remanent.
  2. The DBs can be defined as remanent or non-remanent for the CPU 317-2DP.
    Therefore, a setting in STEP 7(V5.2 +SP1) is required for CPU317-2DP:

    • An explanation for the activation or deactivation of the option "Non-Retain" in the block properties of the DB, can be found in the entry-ID: 17146856 or
    • a DB was created with SFC 82 "CREA-DBL". While creating a DB with SFC 82 it is determined in the attributes of the DB in Bit 2, whether the DB shall get remanent or not.

Note:
Only 256K bytes of the main memory (512 Kbyte) can be used for remanent data blocks at a CPU 317-2DP! No remanent DB will be created anymore and the value 80B2 (not sufficient main memory) will be displayed, if the main memory is too small for remanent data blocks.

  • Memory reset (MRES)
  1. The data will be reset to the values in the loading memory (initial value). These are the last current values which were loaded with the PG into the CPU or which were written with the SFC84 into the loading memory.
  2. All blocks of the loading memory remain unchanged. The data blocks are initialized in the main memory.
  • CPU Power OFF -> pull MMC -> Power ON -> Power OFF -> plug MMC -> Power ON
  1. The data are reset to the values in the loading memory. These are the last current values which were loaded from the PG into the CPU or written into the loading memory with SFC84.
  2. All blocks of the loading memory remain unchanged. The data blocks are initialized in the main memory.

Note:
If it is required to safeguard current data, those have to be saved on the MMC (loading memory). SFC84 can be used for this purpose. The frequency of the write accesses on the loading memory is critical because a MMC only allows 100,000 write accesses.

Markers, times and counter:

These operand areas can be defined as remanent or non-remanent in the HW configuration under "Object properties CPU > remanence".

  • CPU STOP/RUN or Power OFF/ON
    These operand areas keep their values if they were defined remanent. Otherwise they lose the values and will be initialized with "0".
  • Memory reset (MRES)
    These operand areas are deleted during the memory reset, regardless whether they were defined remanent or non-remanent.
  • CPU Power OFF -> Remove MMC -> Power ON -> Power OFF -> Insert MMC -> Power ON
    If they were defined as remanent, these operand areas retain their values. Otherwise they lose their values and initialize with "0". This characteristic applies if the same unchanged MMC is inserted again.

QUESTION:
What does "Non-Retain" mean in the Properties - Data Block dialog?

ANSWER:
In STEP 7 version V5.2 + SP1 and higher you have the option of selecting the property "Non-Retain" in "Properties - Data Block" in the "General - Part 2" tab. You can define the remanence behavior of data blocks with this option.

http://www4.ad.siemens.de/WW/llisapi.dll/csfetch/17146856/3i(2003_09_01)S7_nonretain_e.gif

Fig. 1: Properties - Data Block

The requirement for this option is that the CPU supports the Retain property of data blocks.

A data block with the property "Non-Retain" is not stored in the remanence memory in a CPU 317 -2DP and is thus reset to the original load values at each power OFF/ON or each STOP-RUN transition of the CPU.
A data block with the "Non-Retain" property occupies RAM space as usual, but no remanence memory space.

Note:
The CPU 317-2DP has a RAM of 512 KB, but only 256 KB of data can be retained

QUESTION 7 : 我如何将一些系统文件或是项目相关的文件存储到MMC上?
Can I also save other files that belong to the project or system on the MC/MMC?

ANSWER:
You can save any file connected with the system on the MC/MMC.
Procedure:

  • Slot the memory card or micro memory card into the PG.
  • Open the SIMATIC-Manager.
  • Go to "File > S7-Memory Card > Open".
  • Then go to "PLC > Save to Memory Card ...".

http://www4.ad.siemens.de/WW/llisapi.dll/csfetch/15399111/sonstige_Dateien_speichern_auf_MMC_01.e.gif

Fig. 1: SIMATIC Manager - S7 memory card

  • In the left file explorer you select the required file and mark it for saving with the "-->" button.

存储卡MMC的选型计算-12

  • If you want to remove files again from the selection, use the "<--" button.
  • Click "OK" to save the selected data to the memory card or micro memory card.
  • You receive an acknowledgment once the data has been saved.
  • Then the data transferred is displayed in the "S7 Memory Card" window.

http://www4.ad.siemens.de/WW/llisapi.dll/csfetch/15399111/sonstige_Dateien_speichern_auf_MMC_03.e.gif

Fig. 3: View of data in memory card window

Note:
You can only use this function for an S7-300 Micro Memory Card and S7-400 Flash EPROM card.

返 回

QUESTION 8 : 我想将我的STEP7项目完整地保存在MMC卡上,该选择多大的MMC?
How can I determine the size of the MMC so that I can store my complete STEP 7 project on it?

ANSWER:
In order to choose the appropriate MMC for your project you need to know the overall size of the project and the size of the blocks to be loaded. You can determine the size of the project as described below:

First archive your STEP 7 project. Then open the archived project in Windows Explorer and determine its size (select and right-click). This gives you the size of the archived file.

http://www4.ad.siemens.de/WW/llisapi.dll/csfetch/14053219/S7-300_MMC_Speicherbedarf_01_e.gif

Fig. 1: File properties

Load your blocks into the CPU. Now you still have to select "PLC > Module Information > Memory". There, in "Load memory RAM + EPROM", you can see the size of the assigned load memory.

http://www4.ad.siemens.de/WW/llisapi.dll/csfetch/14053219/S7-300_MMC_Speicherbedarf_02_e.gif

Fig. 2:  Load memory

You must add this value to the size of the archived project you have already determined. This gives you the overall amount of memory required to store your complete project on an MMC.

返 回

QUESTION 9 : 我对插入MMC卡的S7300PLC进行了加密,但我忘记了密码,如何才能对MMC解密, 或删除MMC卡上的密码?
答: 如果您忘记了您在S7-300CPU Protection属性中所设定的密码,那么您只能够采用siemens的编程器PG(6ES7798-0BA00-0XA0)上的读卡槽或采用带USB接口的读卡器(USB prommer 6ES7792-0AA00-0XA0),选择SIMATIC Manager界面下的菜单 FileS7 Memory Carddelete 选项删除MMC卡上原有的内容,这样MMC就可以作为一个未加密的空卡使用了,但无法对MMC卡进行解密,读取MMC卡中的程序或数据。

返 回

 

 

weinxin
plc入门知识问答
每一个PLC工程师都应该关注的微信公众账号,只需输入您的问题,就会有答案

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: