I have got the LV 2009 VI attached underneath for reading a displacement (x) which comes from my RS232 PXI interface, converting it to an angle (gamma aero) and displaying it on the Frontpanel. This VI allows me to get Information about the actual angle while moving. I would like to modify in the VI Block to automatically save the last angle position where i stopped for more than 20sec. This would be then displayed on the front panel. I am totally new to Labview and would be happy to get any hint/help from anyone more experienced.
Usually you use a shift register or feedback node for storing values between itterations of a program. Functional globals (also refered to as a form of action engines) are good architectures for generating a function for doing this as well.
If your measurement works currently you should be able to put it all in a big while loop (it seems you already had a good delay), then read the value and the current time each loop.
Feed both to a shift register and you can read the previous value next loop. (Start time and measuerment)
If the Value is changed, send both to the shift register (small case), if Value is the same send a new start-time and check if time is >20 sec, if so update indicator.
thanks a lot for the ideas!! however can you please provide me with a small example VI or even a hand sketch to understand your suggestion better, i am trying to build the shift register but not figuring out really how to start?how can i get the current time and feed it to the shift register together with the value? i would really appreciate it very much if you provide me with a hand sketch or so of your suggestion. I attached snapshots of my VI and sub VI. Note please that Alpha Aero is my Value.
This tutorial has info on shift registers and lots of other useful stuff.
To send the time and some other value to the shift register you can use a cluster. Or you can use a second shift register.
can anyone help me out on this VI, i am not sure if my approach was correct. I built the advice you gave me here, do you think this is ok?i am happy to receive all remarks for correcting my while loop.
i managed to test my VI attached. It worked out for the actual Alpha angle but still i cant read my Last Alpha angle. However, when i stopp my VI for 20s plus not move my Vanes for 20s, i got an update of this angle after running my VI again. I can figure out whats wrong with my VI? i want to get this update while running and not while the VI is aborted. Please help me out on this guys!