05-15-2014 04:19 AM
Excuse me i don't know where are my left and right hands 🙂
05-15-2014 04:30 AM
thanks
what did you mean by FGV
05-15-2014 04:49 AM
An FGV is a "Functional global variable"
An FGV has to have :
1. Uninitialized shift registers
2. While loop wich is executing only once (with a TRUE wired to the stop condition)
3. Usually an enum type which correspond to your states machine
The FGV stores its data between successive runs of the VI as long as the VI remains in memory.
BR,
Vincent
05-18-2014 11:06 PM - edited 05-18-2014 11:19 PM
i want to have one elapsed time for 2 indicators,that's my problem.
for each indicator ,there is 1 condition in order to make the elapsed time for maintain starts.i want to have 1 maintain for both of the indicators,so when the 2 conditions happen in the same time(1st indicator at 30 and the other at 7) then the maintain starts and if he keeps thoses values for 10sec then the user get the maintain
how to do that especially that i have 2 while loops and 4 case structures
05-19-2014 03:05 PM
Hi achfire,
Have you tried implementing a functional global variable, and other suggestions by Vincent?
05-19-2014 03:42 PM
i tried but i think i didn't know how to really use FGV,where exactly to implement it,and what to do to retrieve data from the conditions from 2 loops to put them in 1 elapsed time;so it starts just when the 2 conditions are true
05-20-2014 11:46 AM
Hi achfire,
Do you think you can post what you have with the FGV implemented? Once your code is posted, we can point you in the right direction regarding your current use of the FGV.
Here is a community example showing the basic implementation of a FGV
https://decibel.ni.com/content/docs/DOC-2143
05-20-2014 03:02 PM
i will try,even if i don't get the point of using FGV to get one elapsed time for 2 loops
05-21-2014 06:34 AM - edited 05-21-2014 06:42 AM
Hello everybody,
Like i already told you in personal messages, the use of the FGV will allow you to detect your events with an event loop.
A way to solve your issue is to build an FGV which gonna work as a chronometer. Different states for this FGV could be
* Set time (where you launch the time)
* Get time (where you get the current time)
* Stop/Pause time (where you pause time)
* RAZ time (where you reset time to 0)
There are several ways to do this, this is a possibility. afterwards, we don't understand 100% your problem because i think you don't know what's yours as well.
We could help you if you are giving us some code to comment, we won't do your code !
Edit ;:
Like a told you several times, your "2 loops" architecture is wrong or your way to develop it, is. That's why you need to start again your architecture.
BR,
Vincent
05-21-2014 04:22 PM
Hi everybody
i tried to use just 1 loop as vincent told me,i think i'm missing just a little thing because the maintain is counting when both conditions of variometre and horizon artificiel are true,but for some reason the moment i reach 7 (the condition of maintain for the right one) the pointer of the left one goes directly to 30 which is the condition of maintain for that one,consequently i get the maintain but it's like the condition of the variometre controls the other condition,how to avoid that
NB:i will try this last solution then i will use FGV .