Do Omron Function Blocks retain the value of internal variables between calls?

scrambled

Member
Join Date
Jul 2015
Location
Brisbane
Posts
108
So I have a program for an Omron CJ1M PLC that I have to reverse engineer for a customer. This PLC is meant to control a water pump station.

There is a function block of interest which reads a reservoir level and some setpoints and sends pump start/stop signals accordingly. This FB also has a debounce counter which is defined as an internal UINT type variable, not tied to any FB input or output.

This debounce counter is pretty simple: increment when a level setpoint is reached and reset otherwise. Pumps don't start or stop until this debounce counter reaches a certain hard-coded value.

My confusion stems from the fact that this debounce counter is internal. Based on my understanding of FB's, internal variables don't usually retain their values between FB calls.

So wouldn't the debounce counter reset to zero every single time the FB is called? Unless Omron PLC's are smart enough to allocate static memory addresses to internal variables of each FB instance? I tried looking through the CX-P manuals but haven't found anything that explicitly states this.
 

Similar Topics

I am looking for fb that are for speed control with ramp rate in them. basically i have to put in an rpm value from and HMI then also set ramp...
Replies
2
Views
2,413
Hello all, I am trying to set PLC clock using DATE function. When DATE function is enabled, I can see A351 to A354 change to the register...
Replies
3
Views
380
Hello, I'm currently trying to recieve some data over RS232, using an Omron CP2E with an RS232 option board. The device it's communicating with...
Replies
0
Views
655
Hello! I have a network of conveyors bringing raw product to 4 machines. A sensor in the hopper of each machine calls for more product. I'm...
Replies
15
Views
5,867
I really need any tutorial about mail send function, please..
Replies
3
Views
1,828
Back
Top Bottom