11-02-2011 04:56 PM
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
11-03-2011 07:42 AM
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,
11-03-2011 08:02 AM
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.