I’m trying to implement a program that has two buttons that can control when the data starts and stops recording in the Ignition reports. Additionally, I want to compile a report based off the behavior of these buttons with a graph that can record the data between the time when the button turned on, and the button turned off.
I also want to be able to record more than one instance of these events happening, e.g. if I turn the button on to start recording, and then turn the button off to stop recording, and repeat this three times, I want the data for all three events included in one report’s graph and filter out the data that didn’t occur between those times. Additionally, I want to implement further conditions where if the time difference between two events is too small(15 min), then it will include that data, but if it’s too large(4 hrs), then it will truncate that data.
I’m having issues finding out how exactly I can “truncate” data points in Ignition’s reporting. It seems like the only values I can really change to control this are startdate and enddate with a timeseries chart?
I figure that I’ll have two memory tags attached to the buttons and include an expression tag that can track the occurrence of multiple events(if the start date memory tag has a value that is greater than the end date memory tag, then you know that the start button has been pushed twice, indicating another event), but I’m not sure how else to go about this or if there’s a better way.