Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Rolling Rate Of Change


Makada Jul 7, 2015 09:39 AM

Hi,

I have a rate of change for every minute of data as shown below.
Is it possible to have this rate of change for the minute update every second?
In other words, can the rate of change show every second the past 1 minute, so it calculates every second the rate of change for the past 1 minute?


Public BP_mmHg
Public BP_mmHg_Change
DataTable (Test,True,1000)
DataInterval (0,1,Min,10)
Sample (1,BP_mmHg,IEEE4)
Sample (1,BP_mmHg_Change,IEEE4)
EndTable
BeginProg
Scan(1,Min,1,0)

'PTB101B Barometric Pressure Sensor (CSL) measurement BP_mbar
VoltSe(BP_mmHg,1,mV2500,11,1,0,_50Hz,0.184,600)
PortSet(1,0)
If Test.Record(1,1) > 0 Then
'calculate change for one minute
BP_mmHg_Change = BP_mmHg - Test.BP_mmHg(1,1)
EndIf
CallTable (Test)
NextScan
EndProg


JDavis Jul 8, 2015 09:00 PM

To have a rate of change time resolution, you would have to use a 1 second or faster scan rate.

Log in or register to post/reply in the forum.