DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying maximum value from a graph

I'm generating a graph as data is acquired and want to hold the maximum value.

Y lies between 0 and 10. Values outside of this range should be ignored.

X lies between 0 and 14000. Storing the peak value of Y, I would like to store the corresponding X.

I've tried using a global variable (initialised to 0) and updating it everytime a sample comes that is >= global_var and then also updating a digital meter.

I'm thinking that what is happening is that after doing the comparison and triggering an action, the next sample has arrived so I'm not saving my compared value and not updating the digital meter with it.

Has anyone managed to solve this before, perhaps with shift register?

 

Thanks

 

0 Kudos
Message 1 of 3
(5,813 Views)

Hi T.S.Dyno,

 

Just to clarify are you using LabVIEW or DASYLab and which version are you using? If possible could you please attach your code so that it makes it easier to see what your application is doing. It could be the case of adding a shift register to your global variable to keep the value.

 

Regards,

Ben B.

Applications Engineer
National Instruments UK & Ireland

"I've looked into the reset button, the science is impossible!"
0 Kudos
Message 2 of 3
(5,806 Views)

Ola',

 

You need to use the Min/Max moule that would create a trigger everytime a max or min input is generated.

 

So that when Y reach a max it will trigget it so that you can use it to store the Y and X into wirable by using a latch.

 

 

Tom Rizzo
InSyS Corp.
www.insyscorp.com
Your DASYLab integrator
0 Kudos
Message 3 of 3
(5,803 Views)