03-09-2009 08:43 AM
I need a way to store a measured value into a variable when I press a button (using an event structure). This stored value needs to be available like a local variable for the duration of the running of my program. Whenever I click the button, a new measurement is taken and the stored value is updated; but otherwise it is 'latched' between updates.
Dave
03-09-2009 08:50 AM
Hi Dave,
Take a look at this Nugget on Action Engines.
Use a "write" method in the event case and a "read" method everywhere else.
Have fun!
Ben
03-09-2009 08:54 AM - edited 03-09-2009 08:57 AM
Instead of 'latching' a value into a 'local variable', how about storing an array of the values in a shift register?
03-09-2009 10:49 AM
Thanks. Nice idea. I like the simplicity of this.
I have to say I'm pretty confused about action engines at the moment (are they a 'thing'/VI one uses, or more of concept in programming?) so perhaps will have to come to them another day!
Dave
03-09-2009 10:55 AM
oilyfingers wrote:Thanks. Nice idea. I like the simplicity of this.
I have to say I'm pretty confused about action engines at the moment (are they a 'thing'/VI one uses, or more of concept in programming?) so perhaps will have to come to them another day!
Dave
They are something you code then use in your program. Since you code them yourself, they allow almost endless potential to be customized just the way you like. To start your code would just use a read and a write. Latter on you may wnat to add another method like (Compare this value with Latched".
Ben
03-10-2009 06:25 AM