Unity Pro Value retention

Iet=gud

Member
Join Date
Mar 2010
Location
SASKATCHEWAN
Posts
16
Hello all, new poster so bare with me. We recently upgraded from Concept 2.5 to Unity Pro 4.1. Software is used throughout the plant and on some underground equip.(I work in the mining industry) The problem I am having is with values being retained after power outage to mining equipment. If, for example, the operator is performing a function from his touchscreen and power is lost, function will still be active when power is restored, even though he is no longer energizing the function. The reading I've done so far says that in Concept the 0x registers are not buffered meaning they are reset to zero with a warm restart, but with Unity the %Mx registers are buffered meaning they are retentive conforming to IEC standard. I have tried setting the initial value for the variable to zero, but this did not work. Tried unchecking parameter '%MWi reset' in controller config, this also did not work. Variable type used is ebool.
Similar problem happens with the HMI(Wonderware 10.0) as well, if I am pushing one of the buttons and then drop power to the HMI only, when power is restored pushbutton will still be on although no longer being pushed. It will go out if touched again though.
This isn't a regular occurance, but a safety issue when it does.
Any thoughts would be appreciated.
 
Hi!

As you have noticed, Unity PLC's ebool variables won't be resetted automatically to zero if power is lost (warm restart)

Schneider's recommendation for this is to use sysstate function (or %S1 system bit directly; warm restart bit) and move or reset block to reset ebool variables on warm restart.
(p. 6 on attachment)

You can reset all %Mx variables at same time if you use MOVE_INT_AREBOOL fuction, but you have use also array variables for %Mx with this function.
 
Thanks for responding Lare. I had come across the attachment you included before, but wasn't sure how to use the SYSSTATE function block to copy the value 0 to the %Mx registers. The program does use the SYSSTATE block to set a variable called 'boot' which is used in the program as a first scan bit. I have not used arrays in the past, but will try and figure it out and how it can apply. If you have some examples of how to set them up in Unity that would be appreciated.
Thanks
 
Thanks and welcome to forum. On attachment is little sample program for this.

I think this helps you at when PLC is rebooted, but when HMI is rebooted bits remains state before HMI reboot. You should use also watchdog signal between PLC and HMI. If communication is failed reset bits also.
 
Thanks Lare, I followed what you had done, made it the same really, just that I am using %M1050 to %M1055. I understand what you are doing and believe that it should work, but either I have something wrong or there is something else going on. I have tried power cycling, as well as using the warm restart from the task tab. When I look at the animation table the array shows that all at 0, but when I look at the variable using %M1054 it shows as a 1.
Any ideas, can I use the array and still have a separate variable with the same address? ie. 1054 First array I've used so I'm not to sure.
Thanks
 
It should work, if you use same variable addresses also in array. On Unity you can use sama addresses to several symbol names. If you change one also other symbols with same addresses will change to new value.

Is %M1050..%M1055 writed directly from HMI. I mean there is no move/copy commands example. %M2000 := %M1050 or something similar?

You can also try reset command only to %M1050, but it means that you have to make seperate reset to all bits. If you use array method, you can reset all bits at same time.
 
I tested program with real PLC, what I noticed was that bit reset worked when I used %S1 system bit directly (I tested warm reset from task tab and power cycling also).

Bit reset didn't work somehow if I used systate function with move block, systate block shows error on my PLC and because of that systate block didn't see that warm restart occurs.

So, try using also system bit %S1 directly to enable input on move or reset block.
 
Values are directly written from HMI. I will attach a screenshot showing what I have done to this point. This is the outcome after a power cycle. FWD_START_HMI is %mw1054.

screenshot.jpg
 
have you declared your array to use %MW1054 -> addresses on variable declaration (same addresses as you want to reset). That is only reason which I know at this moment, why it won't work.

If you need only reset these 6 bits, you can use reset block with system bit S1. array is not needed if you use reset block, but you have to use reset separatelly to all 6 bits.
Array method is not maybe the best or clearest to others, but if you have lot of bits to reset, it is lot of faster to program to PLC, than separate reset commond to every bit.

reset_addresses.JPG
 
Last edited:
Thank you Lare! I had not declared the addresses, I have now and it is working. Now I have to figure out the Wonderware issue. Again, thank you for the array lesson.
 
You're welcome.

For wonderware issue searh heartbeat (or Watch dog also) from forum post. You will find several examples of monitoring communication between HMI/scada and PLC. You can start also another thread for this.

Principle is that you send pulse to PLC from HMI and PLC sends pulse back to HMI. If pulse get "stuck" to "1" or "0", you will then know that communication is lost.
 

Similar Topics

Hi everyone :* I am using using unity pro v.13 i want to do the mathematical function of floor() which makes for example 1.2 to 1 and makes 2.9...
Replies
7
Views
3,082
Dear Gents I am new to schnieder PLC I want to work on it my question how can i use the function blocks to make scaling for the analoge...
Replies
16
Views
10,337
Hi everyone, My name is Chris and I'm currently in the midst of teaching myself how to program PLCs for my job. I'm currently experimenting with...
Replies
7
Views
12,424
Hi I have a small problem. I want to save on memory card installed on PLC or in PLC's internal memory a value of selected variables. Example: I...
Replies
8
Views
13,839
I am trying to set up default values for Unity input pins, but can't find any way I can do so. Currently, the pin retains the last value that was...
Replies
16
Views
5,587
Back
Top Bottom