store discrect values during measurement

  • Software
  • store discrect values during measurement
Carlos Polvorinos

Posted on 20.11.2024 17:42

hello, I am working with dewesoft equipment and I would like to be able to store while measurement the values of a variable every time I press a button on the screen. 

I have implemented the solution using the mathematics with hold(‘Value’,‘Button’), but I can't find a way to store those values in another variable. 

I want to make tests that are going to make me press the button 5 times and I need to see the values on the screen, so I can work with them. The idea is similar to the image, each vertical blue arrow implies a button press, and I want to have another graph that represents, at the same time, the values of each of the 5 points I have measured.

Gregor Šmit

Posted on 21.11.2024 07:26

Dear Carlos,


thank you for reaching out to us. This can be done with User input and Latch value math. In the attachment I have prepared a setup file. When you will press the green button (Press) the value of the channel sine will be displayed in digital meter and you will be able to see the values on recorder under sine/Latch channel.


Kind regards.


Attached files:
Carlos Polvorinos

Posted on 21.11.2024 10:50

dear Gregor, thank you for your reply. However, I can't quite get what I want. Is there any way to make the horizontal axis not time but number of samples (in the file you attached it would be the veraible Latch index)? Is there any way to make it like the graph on the right, in the X axis the number of samples taken and in the Y axis the recorded value? 

Gregor Šmit

Posted on 21.11.2024 12:20

Dear Carlos,


thank you for the clarification. I missed that you need to have the samples enumerated on x axis. This can be achieved with XY Recorder and a formula that counts the number of samples (NoSample), please notice that the Time axis is set to Latch channel, please refer to the image below. I have attached a revised setup file.




Carlos Polvorinos

Posted on 21.11.2024 16:26

Perfect, now I understand it, thanks. But with this option I don't have the possibility to save the data?


To give a little more context, I have 2 digital inputs and 1 button on the screen. The button is to indicate taking a measurement. One of the digital inputs is used to indicate that a new trial is going to be done, and internally I count the number of pulses to know N trials performed. The other digital signal is used to indicate that the trials are finished. When the N trials are done in which I take 5 points in each one, the mean and standard deviation of each trial is displayed (either during or at the end of the trials, it doesn't mind) on the screen. 

Gregor Šmit

Posted on 26.11.2024 10:22

Dear Carlos,


But with this option I don't have the possibility to save the data?

All channels can be saved i.e. stored. And all mathematics can be recalculated in post-processing.


For calculating the mean and standard deviation you can use the Basic Statistics module. The input channel for Basic statistics will be output of the Latch math. Since you want to calculate the mean and standard deviation of 5 samples you could select basic statistics sample based and set Block size to 5 samples or you can use single value (sample based).


Kind regards.

Login to reply to this topic. If you don't have account yet, you can signup for free account .