12-11-2014 08:21 AM
Blokk wrote:So I do not get how you could have a FGV without Enum case...?
The increment shown above is a FGV that doesn't have an enum case. Each time the FGV is called, it increments the value and returns the count. When you add in the enum case structure, you are specifying an action. Hence, Action Engine. Yes, we are arguing over semantics, but sometimes we just need a reset to make sure we are all talking the same thing.
12-11-2014 08:26 AM - edited 12-11-2014 08:32 AM
I think the answere is simply what crossrulz told you already:
"It has to do with the VI being in memory. When you run it individually, the First Call? will always be TRUE (which could be your problem). I could also be that the shift register is losing it value when execution is complete."
This Express VI has a "First call?" function bundled with a logical OR to the Reset input. That is the reason, you always reset when you call this Express VI with a FGV.
If you have a caller VI, during its runtime, the Express VI stays in memory. therefore from the second execution the "First call?" function gives you a FALSE output!
edit: to crossrulz: yep, we have different "built-in" dictionaries, but at least we see after a while what we talk about 😄
12-11-2014 08:36 AM - edited 12-11-2014 08:38 AM
Sounds like that's what I'm missing. Can any of you elaborate further on this "First Call" behavior of the express VI? Is this something that's widespread through express VIs? I have to admit, I haven't used them much. (Bad LabVIEW programmer, Bad!)
edit: You beat me to it! Thanks for showing the guts. I didn't even know you could get to the back panel of an express VI!
12-11-2014 08:37 AM
To be honest I never use this function. I admit it can be useful, but I like to decide when I reset my Action Engines, explicitly...
12-11-2014 08:57 AM
mattmunee wrote:
edit: You beat me to it! Thanks for showing the guts. I didn't even know you could get to the back panel of an express VI!
Right-click on an Express VI and there is an option to "Open Front Panel". You will then have to convert the Express VI into a normal VI in order to see the code behind the scenes. It is generally not a pretty sight.
@mattmunee wrote:
Is this something that's widespread through express VIs? I have to admit, I haven't used them much. (Bad LabVIEW programmer, Bad!)
That's a good thing.
@mattmunee wrote:
Sounds like that's what I'm missing. Can any of you elaborate further on this "First Call" behavior of the express VI?
The First Call? function just returns a TRUE the first time it is call in an execution run. Every other time, it returns a FALSE. It is extremely useful for initialization. For that reason, a lot of Express VIs and FGV/AEs will use this function.