Now we have some data and know our way around just a bit. This is where things get interesting. Expressions allow us to make transformations to our data like math, filtering, searching, serial-decoding, smoothing and much more.
The Expressions feature has its own mathematical language and is growing in functionality all the time. It loosely follows syntax you are probably familiar with -- think spreadsheets equations.
- Expressions are prefixed with the "=" character.
- Input signals are enclosed in [ ] - example: =[temp_f]*2
Many typical math and programming operators are supported as well as a number of other mathematical functions. Expressions are supported in Waves and Tiles. It's a deep topic so definitely check out our reference material linked below.
Try It Now
1. Head back to Waves and start creating an expression.
Each new expression you create becomes a new signal after pressing <Enter>. You will see there is a drop down menu with all the available signals. This will appear when you start typing a signal name.
2. Create your first expression.
Let's smooth out the ripples on the Position signal. We will use the "smooth" function with a smoothing factor of .75. Feel Free to experiment with your own ideas. Expressions are powerful and getting more-so all the time.
3. Hit enter to confirm the new signal.
The new signal will show up wherever you are currently selected or at the bottom of the waves stacked plots. You can move it around by dragging the signal name up and down. Right-click the new signal and click "rename" to give a better title.