Value resetting whenever signal loses

This has been discussed quite a few times before, this topic is probably a good starting point for your research…

Pete.