Schneider problem with retentive memory

jesusvasquez

Member
Join Date
Jul 2014
Location
Padova
Posts
11
Hello everyone,

I'm facing a problem with the retentive property of the allocated memory.

I'm using bits (BOOL) of some %MW allocated registers as flags. I saw that after a warm reset these flags keep the previous status. But, I want these flags to be clear after any kind of restart (cold & warm resets).

The only solution that I could thinks was to manually reset the flags when the system bit %S1 is set.

Does anybody knows any alternative to do this? Maybe something more elegant? Or some configuration on the CPU for disable the retentive memory?

Thank you very much.
Jesus
 
It is Unity redundant PLC and conforming to IEC %MW register need to be retentive. You can use SYSSTATE function to clear it, quite easy.

Best regards,
Goran.
 
There are various options to control this under the CPU. There are options like Memory Protect and Initialize %MWi on cold start. I always have to look up what they mean in the help so I can't be of more assistance.

Check out %S21 instead of %S1 - I almost always use %S21 for startup routines.

>>Maybe something more elegant?

This is definitely subjective, but as a possible maintainer of what others create, I would prefer you use these bits and manually clear your variables. It becomes self-documenting that way - many people here, myself included, work on multiple platforms so trying to remember every little nuance from every little feature on different platforms is difficult. However, if I saw your code triggering on %S21, you could either name %S21 in the data editor 'FirstScanBit' or something obvious, or even if I had to look it up in help, it's fast. Otherwise, it's not obvious what might happen to the variables and it would take me a lot longer to find where this behavior is managed.
 
Thank you very much for your answers.

So, would it be redundant to check the bit three bit %S0, %S1 and %S21 in order to detect a restart? in other words, is there any case where %S21 is not set will %S0 or %S1 is set?

The outputs of the SYSSTATE FB are 100% identical to the bit %S0 and %S1?

I was doing a test using the PLC simulator, and the SYSSTATE FB didn't detect a warm restart performed using the "Warm restart" command under the PLCScreen page (Animation tab, on the CPU configuration page), while the %S1 bit did.

Jesus
 
>>in other words, is there any case where %S21 is not set will %S0 or %S1 is set?

I can't say. I have had to test this extensively in the past, and determined that %S21 and automatic start in run were the two features that I needed to always come back in a known state from whatever I did. I never execute 'warm restart', though I know this button. I never really hit the cold start button, either, as a matter of course. My two states were powered on and running, or powered off.

To answer your questions, I would start with Unity help and then strongly suggest you test what it tells you. If something does not seem right, or is not consistent, then I would point you to Schneider support.

Unity help says for %S21, it indicates the first cycle of a task, including after a cold start with automatic start in run, or a warm start. If you look at %S0, it warns that if you want a bit that is set for every start, use %S21.
 
You have reduntant PLC, so you should look system bit %S1 and %SW10.0 bit for warm and cold restart.

This because system bit %s0 (cold restart) works only if 2nd PLC is allready faulted/stopped before cold restart and primary plc makes cold restart at redundat system...
If you have only one plc (not reduntant system) you can look system bits %S0 and %S1

http://www.google.fi/url?sa=t&rct=j...M76WX-jK5Eu94bc-_1UBG_A&bvm=bv.76943099,d.bGQ


page 174. Happy reading with manual ;)
 

Similar Topics

Dear all, I have a Schneider PLC TM200C40T and Schneider HMI GXU3500. I want to communicate between these using MODBUS serial link. Can...
Replies
2
Views
1,709
I have an M241 connected in Ethernet to a HMIS5T panel and I can't get them to communicate I'm using Machine Expert 1.2 On the controller the...
Replies
0
Views
1,798
Dear experts, I have a problem with drive for servo motor "Schneider elau c400", the problem is that I was doing parameters backup, but it...
Replies
0
Views
1,816
Good Day Sir, I have an issue with my Unity Pro XL v7. Every time i press the variable type selection, as shown in the attachment, my unity pro...
Replies
4
Views
4,328
I have a problem for importing DFB Blocks in a project of Unity Pro V3.0. I have a compressed file containing the Database of DFB Blocks with a...
Replies
7
Views
5,917
Back
Top Bottom