11-24-2019 12:36 AM
I think this is pretty simple but im not smart enought to figure out how to do it. I´ve been searching for a while but i´m still stuck.
So the idea is that with the Get Date funtion i have an initial date, then with a signal (boolean ,etc). A counter is set from that moment and it ends the counter with another boolean signal, showing the result in an indicador of the elapsed time(Hour, minute, second).
Any good advice it will be helpful!
11-24-2019 03:28 AM
Hi Marucial,
The idea you have sounds fairly reasonable. Which bits are you having problems with? Are both of your "signals" input by other parts of your code (perhaps hardware acquisition) or is the first supposed to be output somehow when you take your "initial date"?
Depending on exactly what you're trying to do, there could be a large number of possible solutions. One that you might consider could be a Notifier, with a timestamp datatype.
Each time you receive a new notification, you can calculate the difference from the previous value and update your "elapsed" indicator. Each time you get an appropriate "signal", you can send the current time to the notifier.
An alternative might be something like a Functional Global Variable (FGV) which is essentially a VI used to globally store a value. You can also search for information about "Action Engines" - Ben has a nugget about this topic and explains how this is an FGV with extra powers 😉 In your case, this might include outputting the "elapsed time" since the last "Set" action, or similar.
11-25-2019 09:40 AM
@Marucial wrote:
I think this is pretty simple but im not smart enought to figure out how to do it. I´ve been searching for a while but i´m still stuck.
So the idea is that with the Get Date funtion i have an initial date, then with a signal (boolean ,etc). A counter is set from that moment and it ends the counter with another boolean signal, showing the result in an indicador of the elapsed time(Hour, minute, second).
Any good advice it will be helpful!
Well lets break this down a bit...