3/27/2011 2:01 PM | |
Joined: 10/7/2005 Last visit: 9/11/2024 Posts: 3020 Rating:
|
Hello TEBANCH here's my take on things: Method 1: It is a "proper" Memory resetas per chapter 8.4.3 of the SIMATIC S7-300 CPU 31xC and CPU 31x: Installation manual,resulting in clearing of the work memory and reloading ofeveryting from the MMC load memory. MW's would be all zero andDB's get loaded with the offline "actual" values from the last download of them (or what as lastlast saved via SFC 84 from the user program) Method 2: Never tried this, but it is (should be) no different than doing a normal "Warm restart" since the proper MRES procedure is not fully completed. DB's should still have their last online actual values, MW contents will depend on how large you set their retentivity etc. (see HERE for more on Warm restart behaviour). You should inthe case of method 2 also NOT get the fast flashing Stop LED, can you confirm this? I hope this helps |
Cheers |
|
This contribution was helpful to
2 thankful Users |
3/29/2011 2:30 AM | |
Joined: 10/7/2005 Last visit: 9/11/2024 Posts: 3020 Rating:
|
Hello again TEBANCH
The short answer is: It depends. Before we get to the longer answer, let's clarify a things first regarding DB values as theSiemes terminology of "inital" value can be confusing and even some Siemens decription use the term "initial" with different context: DB view: Declaration View: Only Initial value is visible. This purpose of the "initial" valueis simply to have"initial" offline values that can be used to "initialise" the offline actual values (via "Initialize Data Block" command from the "Edit" menu when in "data View"). Also, as and when you create your DB and add/declare new variables, the initial value that you type in becomes the default offline actual value. The values in the "initial value" columnare NEVER usedby the PLC program though nor come into affect when an MRES takes place. DB view: DataView (offline): Initial value and Actual value are visible (Initial value is the same as above). The "actual" value is the offline actual value. It may/can have the same value as the initial value but can also be set to a different offline actual value. A download of a DB will download this offline actual value into the PLC where it then becomes the online actual value (until overwritten/changed by the PLC program). The DB with is lastdownloaded offline actual values resides on the MMC, it is theseoffline actual values that will become the online actual values after aMRES. DB View: DataView (online): Initial value and Actual value are visible (Initial value is the same as above). The "actual value" column now shows theonline actual value. This may be different to the offline actual value (e.g. changed by the PLC program). A download of the DB will transfer the offline actual values into the PLC and overwrite whatever latest online actual values existed. You can use SFC84 to overwrite the offline actual values in the MMC with the current online actual value (which eseentially achievesthe sameascopying the online DB into your offline S7 program and download it to the PLC) To sum it up: It is the last DB download relatedoffline actual values that become the online actual values after an MRES (or last SFC84 saved values if used).
Any MRES is followed by a PLC restart, so a good place forany"initialisation" (comms related or sequence resets etc. etc.)is the startup OB(simply transfer whatever value you need into your DB). One more thing: In case of your method 2 (incomplete MRES), you should still have the last online actual valuesin your DB's. Asmethod 2 also fixes your FB40 "stuck" related problem I think it is unlikely tobe related to or caused by DB values. I haven't used FB40 for FTP related tasks yet, but wonder if perhaps FC10 "AG_CNTRL" can help with your problem or at least aid in diagnosing it (see HERE and HERE for more on it) Last but not least, below is a link with more on this (note that the second oneis S7-400 and PCS7 related and be aware in which contextthe term "initial value"is applied) What is the significance of the initial and actual values of a data block? What does the terms Initial value (declaration view), Initial value (load memory) and Actual value mean in data blocks when a controller is loaded / restarted? I hope this helps and please let us know what you find out |
Cheers |
|
This contribution was helpful to
2 thankful Users |
4/10/2011 3:06 PM | |
Joined: 10/7/2005 Last visit: 9/11/2024 Posts: 3020 Rating:
|
Hello TEBANCH I could really only speculate (or guess) as to what is or could be the source of the problem (more so as I unfortunnately still lack the hands on experience with FB40). I have a fewthings to note and/or check though: 1.) Have you had a look at the CP343-1 Diagnostics (aka NCM Diagnostics, right click on the CP in Simatic Manger, select "Object properties", go to the Diagnostic tab, startthe "Special Diagnostics" it and don'tforget toclick on the"Glasses" icon to get live data)? 2.) You say in yourfirst post that "when FB40 is executed his status word is W#16#8181 (from the online help this status means "No resources on CP")." My FB40 onlinestates for W#16#8181: Job active. If 8181H is indicated permanently: The CP is not released for FB40 (an illegal command for the firmware version (CMD6 or CMD7) was called.) Questions: 2.a.) Are you sure it is W#16#8181 that you aregetting when the problem occurs? 2.b.) Is your CP343-1 perhaps an older version and NOT a GX30? (FB 40 is only released as of the GX30, FC40-44 need to be used for older CP343-1 Advanced cards) 3.) FB40 uses SFC58&59 internally. This means the "limits" of consecutive SFC58/59 calls apply (8 in your case, see HERE for more). Do you perhaps have a number of other communication jobs going on that use SFC59/59 and//or SFB52/53? 4.) It could a firmware issue, have you checked that all your three319 CPU's and CP343-1 have the same firmware and/or upgrade them all to the latest versions? I hope this helps and please let us know what you find |
Cheers |
|
This contribution was helpful to
1 thankful Users |
Follow us on