8/26/2008 12:25 PM | |
Joined: 9/28/2005 Last visit: 3/15/2025 Posts: 2957 Rating:
|
Hello, Today I experienced some strange behavior with CPU 314C-2DP (latest firmware). This CPU was used in some test applications with different people and had lots of blocks in the MMC card which were not active. This can happed when you download many times different programs and configs and then you have lots of blocks (functions etc) which are not used. So what happened with the latest program is that memory bits from M16.0 to M21.7 refused to be set to "1" (via VAT). So I thought that my collegue made a mistake in the program. So I decided to make MRES and load empty project with only OB1 end "BE" instruction inside it. And what do you think?... The same situation: the same bits refusing to be set to 1 via VAT when basically there is no programm in CPU. I thought that CPU is broken, but I tried to go online and delete everything from MMC card (except SFCs offcourse). So basically CPU went to factory defaults (I know that there is more quicker way to do that So I think Siemens engineers must pay attention to this behavior. I think this somehow depends on these inactive blocks which are consequense of frequent loadings. So if you have behavior like this - don't throw your CPU. Just set to factory defaults and everything will be ok |
Best regards, |
|
This contribution was helpful to
1 thankful Users |
8/26/2008 12:48 PM | |
Joined: 9/1/2006 Last visit: 3/14/2025 Posts: 193 Rating:
|
Hi Darius, I've never seen faulty behavior in memory flag bits. Perhaps there was a hardware interrupt OB that you didn't see or a time triggered OB that still executed some code? Or there was something wrong with the online connection of the VAT-table viewer? I thinks it's always a big chalenge to find the cause Ifyou havesomething simulair again try to reset one of the bits in OB1 andcheck the status in the bottom part of OB1 by monitoring the status online in OB1. And remove or disable all other OB's. In the past i always found alogic explaination for simular problems which seems to be bugs at first. Good luck, Remark |
This contribution was helpful to
1 thankful Users |
8/26/2008 12:57 PM | |
Posts: 196 Rating:
|
Hi Darius.You said the plc won’t set the bit from, from the variable table. I don’t know your program but. But have you check all the diagnose OB12x and OB8x to see if there is not any old code left the in the blocks. Another thing is the memory clock bit in the HW configuration. But it is only 7 bits, and it doesn’t explain the whole problem.Have you made cross Ref. at your program, is a fast way to see what part of your program that is writing to m bit array. As you also describe you have only make a memory reset. Have attached a PDF document that describe, how to format the memory card and how to set the cpu into delivery state again. // Bedst reagard Søren C. AttachmentResetCPU.pdf (450 Downloads) |
This contribution was helpful to
1 thankful Users |
8/26/2008 12:59 PM | |
Joined: 9/28/2005 Last visit: 3/15/2025 Posts: 2957 Rating:
|
Hi, Thanks for good explanation. It's very likely that therecould bean interrupt OB with some code, but there is only thing: no cross-references showed that there bits are using as bits or words or double words. I think if you write interrupt OB, you must see in cross-reference everything what is used in your program. Besides, no interrupt OBs is executed if you download empty project to PLC and there is no matter that somebody was using them (interrupt OBs)long time ago on this CPU. I think that every block which is executed in the moment is the block which was last downloaded. So no old OBs must interference with the current program. So again: if I download empty project with only one OB (that is OB1) there can't be any old OBs executing at the moment. |
Last edited by: Darius at: 8/26/2008 1:10 PMIf you format MMC as in PDF document you attached then all old blocks were left in MMC. I did this thousand times, but everytime old blocks were left in the MMC. And why I must use any diagnostic OBs if I DOWNLOAD EMPTY PROJECT to PLC which has non empty MMC card ? Everything I download is OB1 with one instruction "BE" and also HW config. So how can be old blocks still executing ??? Best regards, |
|
8/26/2008 1:45 PM | |
Posts: 4 Rating:
|
Hello CPU's which contain a MMC are a little different to clear the memory. 1st you have to access the MMC card through Simatic Manager. Be online with the PLC, and Select File -> S7 Memory Card-> Open. Delete all blocks from here by selecting all, and press Delete. Then do a memory reset. What happens is, when you do a memory reset the PLC automatically reloads the information off of the MMC. Verify the PLC is empty by going to online view, and selecting blocks. You should only have OB1. Go online and try to set the bits again. |
8/26/2008 3:01 PM | |
Joined: 6/8/2007 Last visit: 3/26/2025 Posts: 54 Rating:
|
Hi all, Darius is right, "formatting the MMC" as described won't clear the card, it will just reset the data areas (DBs M's etc) to their initial value, hardware configuration and user program remains. I've also whitnessed similar situation, what I did was exactly what Darius described in the first post, go online and delete everything from the MMC with Simatic Manager. I think it's the only way to really clear the MMC. Darius, regarding the memory bit problem, I think you are forgetting one thing: cyclic interrupts are not disabled by a HWconfig, if they are found in the CPU, they are executed. Maybe OB35 was downloaded previously into the CPU, and kept the M bits reset... Regards Boti |
8/26/2008 3:13 PM | |
Joined: 9/28/2005 Last visit: 3/15/2025 Posts: 2957 Rating:
|
Hi, There is 95% probability that there was an OB35 in that CPU previously loaded. Do you want to say that previously loaded OBs are still active after new dowload where one one OB was active (OB1) ? I think this is a very bad thing if it is so. Very bad and I didn't know that. Is it really true ? |
Last edited by: Darius at: 8/26/2008 3:18 PMAnd why OB1 after MRES isn't runing then? If you MRES your PLC and go to run - it perfectly lights RUN LED - means running, but non of the FCs and FBs are called within OB1. So what really happens with all OBs after MRES and what more important after new download to PLC? Best regards, |
|
8/26/2008 3:25 PM | |
Posts: 4 Rating:
|
Siemens Software does not delete what is on the card, then reload new. It simply overwrites the blocks that are downloaded. When you download a new project with only OB1 you are only changing OB1. OB's are system called, so if there is one that has information on the MMC, it will be executed when the system calls it. Best thing is to ensure your MMC is empty, then do a memory reset. Then redownload your project. |
8/26/2008 3:33 PM | |
Joined: 9/28/2005 Last visit: 3/15/2025 Posts: 2957 Rating:
|
Ok, I can understand this. I mean overwriting, but what then does memory reset with MRES switch ? I think it does nothing with deleting old blocks. And still I think that this is not good when you donlowad new project and all old blocks (maybe even not yours) are left. This is wrong (not errorneus) behavior. Programmers can get to this situation like me and be a little bit confused. At least MRES should be able to delete and format EVERYTHING. |
Best regards, |
|
8/26/2008 5:20 PM | |
Posts: 196 Rating:
|
HI Darius I can understand your a little confused af abut the memory concept,As written earlier you can format the men card by using the MRES,should be able to see a "clean" card.But as you can see there is many ways to format the card.I have attached a link where you can see how the memory concept is build up on pc. http://support.automation.siemens.com/WW/view/en/22605763. |
We are working on a new user interface with better overview and more relevance.
Follow us on