I am trying to keep track of a max value over a variable interval of time. The easiest way I can think of to this would be to use a calculated channel that compares itself to the channel I am checking and keeps whichever is higher. However, I want to be able to reset that channel without having to redeploy.
There does not seem to be any way to reset a maximum calculated channel. Anyone know of a good way to force a reset on that?
Is your reset based on a value, or some other stimulus? If it's based on a value, you could use the Peak and Valley function and set the reset value.
You also might use a combination of alarms and procedures to check for the reset request and then work from that--I'm not sure there's a way to force this easily.
When I developed in the past, I created Custom Device to hold max value.
It could reset the stored value with some way.
But as Claire mentioned, I agree using procedure is good way.
Why don't you "Set Variable" procedure?
A LabVIEW model is the most reasonable solution here. Write an FGV that retains the maximum value returned by one of its inputs and include a "Reset" state that sets the value back to zero or whatever is appropriate.
Once you've compiled the model, use a system mapping to link up the input channel you're interested in getting the maximum value for.
If you're unfamiliar with the process of creating/importing LabVIEW models, this white paper gives a good walkthrough.