Internal Memory Initialization

Do you have a question on how to do something.
Ask in here.
Post Reply
ufgators2k
Posts: 58
Joined: Sun May 12, 2013 2:21 pm

Internal Memory Initialization

Post by ufgators2k »

I guess this is more of an opinion question than a technical one, but how do you all feel about initializing the internal memory in the Init portion of the PDE? I am going to use the standard memory locations and run the wizard/init the memory when I first start the new ReefAngel Plus, but if it reboots for some reason, wouldn't you want it to start in a known memory state? I notice most people don't initialize the memory (Lee does, but he is using custom memory locations).

Thoughts?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Internal Memory Initialization

Post by rimai »

Initialization only needs to happen once.
Let's pick an example: Heater temps.
The StandardHeater() function uses 2 memory locations.
When the controller is fresh out of the oven, the 2 memory locations are set to 65535.
I already init the memory locations with standard default values just to test the boards.
I set them to 766 and 770.
These values persist through power cycles, so even if you cut the power off, they will stay.
So technically, you don't even need to run internal memory settings for those locations ever again.
The recommendation for initialization memory and why the wizard just forces you to initialize it anyway is because of new memory locations that were created after the controller was preprogrammed and shipped out.
For example, one controller set is made and tested on libs 1.1.0. Then, when 1.1.1 libs comes, it will contain a new memory location that the controller is not aware of and when the user updates the libs, those memory locations would be not initialized. That's the only reason you would want to initialize it and the wizard forces you to do so.
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Internal Memory Initialization

Post by lnevo »

I do not initiate memory every time...

I have a flag in memory that I set IF i want to reset and it runs that function once on boot.

I set that up because I was playing around early on when i was messing with things and moving things around. I havent used it since...
ufgators2k
Posts: 58
Joined: Sun May 12, 2013 2:21 pm

Re: Internal Memory Initialization

Post by ufgators2k »

So if the libraries are updated then it should be reinitialized? Does this imply that Ph Cal needs to be redone? I know how to hard code those, is that recommended?
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Internal Memory Initialization

Post by lnevo »

Nope. First time it gets initialized is fine. The memory stays set after that. Any new memory locations that get added will be updated when they get used the first time.
ufgators2k
Posts: 58
Joined: Sun May 12, 2013 2:21 pm

Re: Internal Memory Initialization

Post by ufgators2k »

Awesome, thanks!
Image
Post Reply