Math channel to store initial value at start of record
Sorry. Somehow I deleted the text in the previous post.
I wanted to zero a LVDT linear sensor at the start of measurement, but when I use a sensor that is added in the system, the zero button is not visible (see picture). So I wanted to create a Math function where I can store the initial value when recording starts and subtracts it from all other values. Something like,
Formula 1 = AI 1 - AI 1(First value)
Can this be done?
Technical support
Dear Ratnakar,
the "Zero" functionality is not visible because you probably have set a fixed offset for the sensor in the "Angle sensor editor".
In online mode, you can not store the first sample of the signal with formula. You can do it in offline mode. First you need the information about the number of samples, which you can get with a simple formula "scnt". Then create a formula "A1.data(- # of samples)".
Easier and better solution would be c++ script. With c++ script you can store the first sample online, during measurement.
Regards