在S7-200的編程中,系統(tǒng)塊中有一項(xiàng)功能為斷電數(shù)據(jù)保持設(shè)置,設(shè)置范圍包括V存儲(chǔ)區(qū)、M存儲(chǔ)區(qū)、時(shí)間繼電器T和計(jì)數(shù)器C(其中定時(shí)器和計(jì)數(shù)器只有當(dāng)前值可被保持,而定時(shí)器位或計(jì)數(shù)器位是不能被保持的)。其基本工作原是在PLC外部供電中斷時(shí),利用PLC內(nèi)部的超級(jí)電容供電,保持系統(tǒng)塊中所設(shè)置的斷電數(shù)據(jù)保持區(qū)域的數(shù)值保持不變,而將非保持區(qū)域的數(shù)據(jù)值歸零。由于超級(jí)電容容量的限制,在西門子的資料中宣稱只能保存幾天時(shí)間。對(duì)于M存儲(chǔ)區(qū)中的前十四個(gè)字節(jié)(即MB0-MB13),當(dāng)設(shè)為斷電數(shù)據(jù)保持,在PLC外部供電中斷時(shí),PLC內(nèi)部自動(dòng)將以上存儲(chǔ)區(qū)的數(shù)據(jù)轉(zhuǎn)移到EEPROM中,因此可實(shí)現(xiàn)斷電永久保存。
若需更長(zhǎng)的RAM存儲(chǔ)器斷電數(shù)據(jù)保存時(shí)間,西門子公司可提供一個(gè)可選的電池卡,在超級(jí)電容耗盡后繼續(xù)提供電能,延長(zhǎng)數(shù)據(jù)保存時(shí)間(約200天)。
在程序設(shè)計(jì)的編程階段,可在編程中建立數(shù)據(jù)塊,并賦予需要的初始值,編程完成后隨程序一起下載到PLC的RAM存儲(chǔ)器中,CPU同時(shí)自動(dòng)將其轉(zhuǎn)存于EEPROM,作為EEPROM儲(chǔ)器中的V數(shù)據(jù)永存儲(chǔ)區(qū)。因EEPROM的數(shù)據(jù)保存不需要供電維持,所以可以實(shí)現(xiàn)永久保存。若在系統(tǒng)塊中相應(yīng)V存儲(chǔ)區(qū)未設(shè)為斷電數(shù)據(jù)保持,在每次PLC上電初始,CPU自動(dòng)將EEPROM中的V數(shù)據(jù)值讀入RAM的V存儲(chǔ)區(qū)。若相應(yīng)V存儲(chǔ)區(qū)設(shè)為斷電數(shù)據(jù)保持,在每次PLC上電初始,CPU檢測(cè)斷電數(shù)據(jù)保存是否成功。若成功,則保持RAM中的相應(yīng)V數(shù)據(jù)保持不變。若保存不成功,則將EEPROM中的相應(yīng)V數(shù)據(jù)值讀入RAM的V存儲(chǔ)區(qū)。此方法只適用于V數(shù)據(jù)的斷電數(shù)據(jù)保存。
在程序中將要保存的V存儲(chǔ)器地址寫入SMW32,將數(shù)據(jù)長(zhǎng)度寫入SMB31,并置SM31.7為1。在程序每次掃描的末尾,CPU自動(dòng)檢查SM31.7,如果為1,則將指定的數(shù)據(jù)存于EEPROM中,并隨之將SM31.7置為零,保存的數(shù)據(jù)會(huì)覆蓋先前EEPROM中V存儲(chǔ)區(qū)中的數(shù)據(jù)。在保存操作完成之前,不要改變RAM中V存儲(chǔ)區(qū)的值。存一次EEPROM操作會(huì)將掃描時(shí)間增加15至20毫秒。因?yàn)榇鍱EPROM的次數(shù)是有限制的(最少10萬(wàn)次,典型值為100萬(wàn)次),所以必須控制程序中保存的次數(shù),否則將導(dǎo)致EEPROM的失效。
結(jié)合以上的了解和工地調(diào)試的經(jīng)驗(yàn),在實(shí)際應(yīng)用中,若遇到需程序數(shù)據(jù)保持的時(shí)候,要多種方法結(jié)合運(yùn)用以達(dá)到最理想的結(jié)果。針對(duì)程序中需保存數(shù)據(jù)的不同,采取不同的方式實(shí)現(xiàn)。對(duì)于需在程序第一次運(yùn)行時(shí)進(jìn)行預(yù)置并在程序運(yùn)行過(guò)程中個(gè)別情況下進(jìn)行重新設(shè)置的數(shù)據(jù),如高度、荷重等相關(guān)標(biāo)定參數(shù),可在程序的數(shù)據(jù)塊中建立數(shù)據(jù),并賦予初始數(shù)值。同時(shí)在程序中編入SMB31和SMW32命令,在相關(guān)條件下對(duì)EEPROM的V數(shù)據(jù)區(qū)進(jìn)行重新保存,修改先前的初始值。示例如下,當(dāng)進(jìn)行參數(shù)設(shè)置時(shí),置M0.0為1,完成一次VD100的EEPROM存儲(chǔ)器保存操作。
對(duì)于程序運(yùn)行過(guò)程中數(shù)值變化比較頻繁,且需斷電長(zhǎng)期保存的數(shù)據(jù),則可將數(shù)據(jù)存于MB0至MB13存儲(chǔ)區(qū),且系統(tǒng)塊的斷電數(shù)據(jù)保存設(shè)置中將相應(yīng)的M存儲(chǔ)區(qū)設(shè)為斷電數(shù)據(jù)保存。也可使用程序中的V存儲(chǔ)區(qū),在必要時(shí)如上圖所示進(jìn)行一次程序數(shù)據(jù)存儲(chǔ),而在斷電數(shù)據(jù)保持設(shè)置中可選取,也可不選取。?
Mitsubishi / Leadwell Circuit Board PCB GX04B, Rev E, B...
Fanuc Velocity Control Unit, # A20B-0004-0171 / 04C, Us...
Mazak D70UB001832 Power Supply, AC 100V, CN-200, Used, ...
Ingersoll Rand D.C. Servo Drive, # 93972701, D.C. Motor...
Schneider Automation / Modicon iCC Power Supply, # 110-...
ABB DSQC 249B DSQC249B Robotic Servo Amplifier Board, U...
ABB 3 Phase Servo Drive, # ACS401600532, Used, WARRANTY
Yaskawa Yasnac DCP Unit, # JUSP-DCP60 B, Used, WARRANTY
National Inverter DV-505 Unit, DV505-1500PAB, 2.4 KVA, ...
Mitsubishi / YEC AF-PS Power Supply, 2000304L-B, Used,...
Hitachi Seiki VK45II PC Board, 06-19-00-01, Encoder Int...
Acramatic 850 Keyboard Operator Panel, Part# 3-525-0946...
Fujitsu Fanuc A06B-6035-H315 H316 Velocity Control Unit...
Mitsubishi Memory Card MC413-2, Leadwell MCV-OP, Used, ...
BalaDyne Corp. IV Active Balancing System, # A03.2230, ...
Okuma OPUS7000 SVP Board, E4809-045-158-A?, 1911-2162-17...
Mazak / Sharp 14" Color Display Unit, # 8DSP40, AIQA8DS...
Mazak SV-20 Operators Control Panel, Fanuc 11M Control,...
Sanyo Denki MC1K-U015D Single Axis 15A Peak Servo Drive...
Fanuc Operator Panel for Built In CRT, # C49705011, USE...
Hitachi Seiki VK45II PC Relay Board, 13-25-01-00, VK-II...
Siemens 6SN1123-1AA00-0?AA0, Simodrive LT-Modul Int. 15A...
Mitsubishi PC Board, MC303B, # BN624A828G52, Revision C...
Kollmorgen Corporation Drive Unit TPAR-3330-34,TP?AR3330...
Mitsubishi CNC PC Board, # BN624A822G52, MC301B, Revisi...
K & T / Gemini D Control Power Supply Module, 1-2129200...
SPS Tech / Pacific Scientic System Module, # SM602-001,...
Yaskawa CPCR-MR052GC, Servopack Drive, Top Board, Used,...
Yoshida PLC, PSWR-50V8/LB35, Off Okuma LT25 Turning Cen...
ACDC Electronics Power Supply, # 5N25-1, Used,?
Parker XL Power Supply Unit, Type# XLPSU, Used, Warrant...
Parker XL Stepper Drive Power Supply, Mod# XL80, Used, ...
Danfoss D.C. Drive, 176B4001, 2 HP, 120-240 VAC, USED, ...
Yaskawa Power Supply, Type# JZNC-TU17, Used, * * * * W...
Fisher & Paykel TCP/IP Co-Processor Module, # 30250, PS...
Mazak PC Board, 69438H S-350, This Board is off Power ...
Schneider Automation / Modicon Cyberline 1000A Servo Dr...
Allen-Bradley Proc Panel Assy., 8000-GE, 905173 01, USE...
SQUARE D OMEGAPAK Adjustable Drive, 7.5 HP Cap., Type P...
Deemstop Protection Control Chassis, # 6033-1, Used, W...
Protection Controls Protectofier, 7256 BT60-15NR, Used,...
Hitachi 14" Color Display Unit, # CD1472D1M, Used, WAR...
Fisher & Paykel State Processor Module, # 30011, PSC-3,...
Indramat AC Servo Bleeder Drive, # TBM 1.2-40-W1/115V, ...
Square-D Sy/Max Processor, 8030 ADP100, RRK300, USED, W...
Dotronix 10" Operator Monitor, # BCX190, Used, WARRANTY
Indramat Digital AC Servo Drive Controller DSC 3.1-100-...
Indramat Digital AC Servo Drive Controller DSC 3.1-100-...
Indramat Digital AC Servo Drive Controller DSC 3.1-100-...
Artis - KLCD - Operator Display Module Unit, Used, WARR...
General Corp 9" CRT Display Monitor, TD0910ALBA, 12 VDC...
Mitsubishi PC Board, MC301D, # BN624A822G52, Revision B...
Mitsubishi PC Board, MC301D, # BN624A822G52, Revision B...
EMS CIMR-PCU-40P7 FREQUENCY INVERTER AC DRIVE, USED, WA...
Mitsubishi PCB Board, QX53 Z, BN634A422G51, Used, WARRA...
EIC Power Supply, 510132, Rev E, Used, WARRANTY
Danfoss Variable Speed Drive, # 175H1731, Type 3002, US...
Volkmann 1 HP Adjustable Frequency AC Drive, # AD-1-G1,...
Mori Seiki Keyboard Control Panel, FP2-YE1, Used, WARRA...
Mitsubishi / Shindengen Power Supply, MYG250/51,
Mazak PC Board, 69437H S-350, This Board is off Power ...
Square-D Sy/Max 30611-531-50 Class 8030 Type PS-21 Powe...
Parker / Compumotor Apex 6152 Series Servo Drive, (2) N...
Danfoss Cycletrol 150 DC Motor Controller, 120V, P/N 15...
Seicos / Hitachi Seiki HC-400 Keypad Unit, P-221-I, * *...
Square D Weld Control Panel, 8997 EQ5100-DEP 1, Ser. D,...
TDK MRM 043C Power Supply, Serial #1674, 1981, Used, Wa...
ABB Capacitor, 7.5 KVAR, # C484G7.5-3LE, Used, WARRANT...
Hitachi Seiki VK45 Seicos Operator Controller Panel, Us...
Fisher & Paykel Power Supply Module, # 30205, PSC-3, Us...
Parker / Compumotor Apex 6152 Series Servo Drive, NEEDS...
ABB Capacitor, 10KVAR, # C484G10-3LE, 3 PH 480 VAC Use...
Square D Sy/Max TTL Output Module Class 8030 Type HOM-2...
Fanuc Velocity Control Unit, # A06B-6047-H003, w/ A20B-...
Fanuc Velocity Control Unit, # A06B-6047-H003, w/ A20B-...
Fanuc Velocity Control Unit, # A06B-6047-H003, w/ A20B-...
ABB Capacitor 12.5 KVAR, C484G12.5-3LE, 3 PH 480 VAC, U...
Yaskawa JVOP-131U Digital Operator Module, Used, WARRAN...
Pacific Scientific 1/2 H.P. AC Motor, # VC3640-405-1-48?...
Fanuc Velocity Control Unit, # A06B-6047-H003, w/ A20B-...
Mitsubishi PC Board, MC301D, # BN624A822G52, Used, WARR...
Fanuc Velocity Control Unit, # A06B-6047-H003, w/ A20B-...
Mitsubishi PC Board, MC303B, # BN624A828G52, Revision C...
Fuji Electric Fujilog Programmable Controller Unit, # M...
Promess Interface DRO, RS 485/232, USED, WARRANTY
Fisher & Paykel Serial Expansion Module, # 30222, PSC-3...
Fanuc A06B-6045-H001/?H002 Velocity Control Unit, Used, ...
Robotron Series 415 Weld Controller, 503-2-0329, V9.005...
Omron Power Supply S82F-1224P, USED, WARRANTY
Uson Series 4000 LTX Tester & External Dual I/O Interfa...
Mitsubishi PC Board, MC303B, # BN624A828G52, Revision C...
Kearney & Trecker 1-2197900 24VDC Power Supply Module, ...
Mitsubishi TR-15A Power Supply, DU30D B1288, BN624B055D...
Yaskawa DCP Unit, JUSP-DCP, B, USED, WARRANTY
Acme Electric SPW 24-7.2 Power Supply, Used, WARRANTY
MAZAK / Mitsubishi Brake Unit off Mazak VMC, NJ-1.2-205...
Danfoss Variable Speed Drive, Type VLT 3002, 175H1732, ...
ATAM Systems PC Board w/ Transisent Supressor, # 52848,...
Summit Dana Bandit II CNC Controller, # 219-303-14, CH...
Electronics For Industry Chopper Drive, Mod# EFI-2430
UTICOR Programmable Message Display 180-42A1NO32RO, USE...
Cosel Power Supply Unit, LDA75F-24, 24V, 3.2 A, Used, W...
Hobart Display Unit, Model# U2000CP3, Suffix -1, Used, ...
Telemecanique Inductel Sensor, # XGS-Z24, WARRANTY
Siemens SITOP 10 Power Supply, 6EP1434-1SH01 , Used, WA...
Nachi Wet Type Hydraulic Solenoid Valve, S-G01-C5-GRZ-D.?..
Telemecanique/ Square D, Alvitar 18 5HP AC Drive, # ATV...
Portwell Switching Power Supply PW-380APSA, Used, WARR...
Nemic-Lambda RWS-200A-12, Power Supply, 12V Output, 19 ...
Ingersoll Rand Micro Tas Plus Module, # 99340382, S/W 7...
Okuma Operator Panel, E5415-019-308, Off LT25 Turning C...
Okuma Operator Panel, E5415-019-291, Off LT25 Turning C...
Payne Engineering Power Control, 18D-1-30, W/ DC Ampere...
Sugino Synchrotapper Controller, # RCD-A, Used, WARRAN...
JSW 24 VDC Power Supply EPAC-SWU, USED, WARRANTY
ALLEN BRADLEY PROCESSOR MODULE 1775-L2 1775L2 PLC-3, US...
Indramat Trans 01.7/1/OP 01 Keypad for Servo System, Us...
Square D Data Entry Panel, 8995, 52046-170-50, C1600, ...
DGD Gardner Denver Servo Control, # BLS1-2, 960601, Use...
DGD GARDNER DENVER SERVO CONTROL BLS1-2, Used, Warranty