Derivative / Rate of Change

klawson2012

Member
Join Date
Jan 2013
Location
Mass.
Posts
9
Hi,

I have a ControlLogix processor and I'm using RSLogix 5k V19. I am trying to find the derivative or the rate of change of a signal every second across a two minute period. Is this possible with the derivative block? I have not been able to get this block to work, does anyone have samples?

Thanks.
 
I setup a value that increments by 1 every second until it reaches 100, then it resets to 0. I am expecting to receive a derivative of 1 but the derivative block is outputting around 5.12 and it seems to be outputting the value sporadically instead of every second. I have read the derivative help guide Rockwell supplies but its not clear to me how to perform what I need.
 
Could you post a screenshot of the DERV configuration block?
Where is the instruction being examined, Main Task routine or Periodic Task?
If the latter, what is the Periodic Task configured execution period?
What is the configured RPI of the module containing the DERV instruction's Input data?
 
The attachment below is how I have it setup. I thought I need to use the periodic Timing Mode.

This is in a function block diagram that is using a JSR from the main routine.

Derivative Block.jpg
 
You will have to remember that the Main Task (Continuous) of any Logix application has the lowest execution priority and its execution timing is variable, depending of the CPU's "workload".
The point I am trying to make is that the Main Task is a poor choice of locating of any accurate "math" code especially when the CPU's RTC (Real Time Clock) is not "invoked".
I your particular case, if the DERV FBD subroutine is located within the Continuous Task, the Δ Time used by the block's functionality equation

Rate = Δ Value / Δ Time

is equal to the elapsed time since the last execution, time which, again, is variable in case of your applications's Main Task; this is the reason the block's Output results are not what one would expect.

I would locate the DERV subroutine within a Periodic Task with a Period equal to 1000ms (one second)and give it one more try.
Otherwise, if your process Input variable has an update timestamp, you could leave the DERV subroutine within the Continuous Task, however, use the Real Time Sampling DERV "timing" mode instead of the Periodic one.
 

Similar Topics

So, I have a problem.. Maybe. I only had 3 test runs with the system so I'm not sure. It is a steam cooling system, and I thought it would be...
Replies
1
Views
2,098
This might seem like a dumb question however I can't see the difference and can't test it as I don't have an allen bradley PLC available. In the...
Replies
25
Views
10,489
In my very limited experience with control loop tuning, I found the use of derivative to be a hindrance, and dialed in quarter decay with...
Replies
9
Views
4,593
I cannot see a derivative function built into RSLOGIX 5000 v16. I only see an integrator. I wish to estimate the rate of change of a signal with...
Replies
2
Views
6,091
Greetings to all, this series of posts is in response to a request from jvalle in this post in which he asked for a basic explanation of the...
Replies
20
Views
40,873
Back
Top Bottom