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
To have a rate of change time resolution, you would have to use a 1 second or faster scan rate.