Last night I found time to add some functionality I have been thinking on for quite some time.

The signal transform can now include any global variable value just include the global variable name surrounded by $. And it will be replaced by the variables value when the transform executes. (The name is case sensitive)

Second change is for the more advanced user. If the transform starts with $EVAL: the rest of the string will be evaluated as a python expression. The result will be the new signal. I do acknowledge that this is a security problem as you can write any type of Python code here. I will address that later. I recommend keeping to arithmetics and conditional code. Don't think about making filesystem access or similar :-)

Examples:

$EVAL:"Min temp is " + str(min($temp_front$,$1))

This will output the temperature in the revived signal ($1) or from the global variable temp_front ($temp_front$) depending on which one is lower.

Good luck and let me know what you think or if you run into problems.

R
2/5/2014 22:53:46

Superbra funktionalitet. Undrar om det går att komma åt ett datum på något vis? Om man tex vill skapa en ny signal där outputen är ett datum, typ tidstämpel alt datumet för signalen? Målet är att skapa en global variabel vars innehåll ska vara ett datum då en viss signal kommit senast.

Reply



Leave a Reply.