I'm trying to find a way to read a single sample value from a signal, and I've tried using the new "codebox" but I'm having difficulties.
The situation is there is a signal reading 0. with a single sample value of a positive number every couple seconds or so, the amount of time between these positive values changes. Think of it like a single sample pulse wave with both a fluctuating frequency and amplitude. I am trying to find a way to make that single positive value convert to a max message.
If I were to use "snapshot," I would think the signal would need to hold that positive value for much longer than a single sample. So, I've been trying to use "codebox" to replace those 0. values in the signal with the previous positive value passed through. However I've had no luck. Any help would be greatly appreciated!