Sign in to follow this  
Followers 0
Hedgeson

continuously writing Retained tags

4 posts in this topic

I have a simple question that might be hard to answer:

Is it contraindicated to set tags that are continuously updated, such as analog values, as "Retained" ? I'm not sure if "Retained" values are in flash, and if they're written every time the value changes or only on power loss.

I have a background in embedded programming, where I had to take memory write cycles into account. I'm working on my first SYSMAC project, and I'm used to Allen Bradley at this point, where FB instances are accessible from everywhere. The fact we cant read or write function blocks from the HMI in SYSMAC is a pain.

As a workaround, I'm using structures and I would prefer not splitting the parameters and working-values in different structures.

This is my first post here and I didn't see a search function, so I apologize if this was already answered.

 

1 person likes this

Share this post


Link to post
Share on other sites

There is a search function, but it appears to be broken right now. 

I am not sure what you mean by " The fact we cant read or write function blocks from the HMI".  Do you mean you cannot access the function block memory by name, like FBName.Done?  If that is what you mean, you are correct.  The FB instance is a local variable and only Global variables can be accessed by the HMI.

With respect to not splitting the parameters and working-values in different structures, did you look at In/Out variables as an option for the FB?  You can have Inputs and Outputs of the function block in the same structure using the IN/Out variable when designing the function block.

 

Share this post


Link to post
Share on other sites

Hello Michael, thanks for your time.

That is what I meant; the FB instances are local and can't be accessed by the HMI like global variables.

As a workaround, I am using In/Out parameters with custom Structure Data Types. I don't have problems with the function blocks, other than their inaccessibility to the HMI. The custom datatypes work in the FB and HMI.

My issue is that I would prefer to use a single structure for parameters that need to be retained, and values that do not. As an example, I want a structure with PID Setpoint that does not change and is retained, and the Process Value that does not need to be retained.

If I have the process value in a retained structure, will it write to EEPROM/flash memory every time the process value change, and reduce the life of the memory? Or is the value only written on power-loss ?

I'm also waiting on an answer from Omron tech support, but I figured I would ask here.

Edited by Hedgeson

Share this post


Link to post
Share on other sites

Ah, I understand.  Writing constantly to a retained variable will not reduce the life of the memory.  The retained memory is only stored when the processor is powered off.  The capacitors in the CPU give it time to do so.  

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0