Hello,
I've got several Boolean variables which I am logging to a table.
DataTable (_Hourly_Data,True,-1) 'Defined to record min, max, avg and sample values on the hour
DataInterval (0,60,Min,10)
Minimum (1,BatteryVoltage,FP2,False,False)
Maximum (1,BatteryVoltage,FP2,False,False)
Minimum (1,PanelTemperature,FP2,False,False)
Maximum (1,PanelTemperature,FP2,False,False)
Maximum (1,Err_UnderFrequency,Boolean,False,True)
Maximum (1,Err_UnderVoltage,Boolean,False,True)
Maximum (1,Err_OverFrequency,Boolean,False,True)
Maximum (1,Err_OverVoltage,Boolean,False,True)
Maximum (1,Err_GovernorWaterFlow,Boolean,False,True)
Maximum (1,Err_GovernorWaterHighTemp,Boolean,False,False)
Maximum (1,Err_TurbineVibrationSwitch,Boolean,False,False)
Maximum (1,Err_GeneratorWindingTemp,Boolean,False,False)
...
EndTable
These variables represent the state of an LED; True = LED on, False = LED off.
If I want to capture the ON state of the LED (and tag it with a time stamp) should I be using the Maximum or Minimum instruction.
Thanks
I would set up another Table (Alarms) that captures data on change of state of the LEDs. Choose an appropriate scan rate and test for a change of state and on change call the Alarms Table. This will record LED change on and off with time stamp.