Certification

cancel
Showing results for 
Search instead for 
Did you mean: 

CLD 2 and Functional Globals

Solved!
Go to solution

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 11 of 15
(3,543 Views)
Solution
Accepted by topic author mattmunee

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!

 

subElapsedTime_vi_3d.png

 

 

edit: to crossrulz: yep, we have different "built-in" dictionaries, but at least we see after a while what we talk about 😄

Message 12 of 15
(3,543 Views)

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!

0 Kudos
Message 13 of 15
(3,538 Views)

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...

0 Kudos
Message 14 of 15
(3,536 Views)

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.Smiley Tongue

 

 


@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 15 of 15
(3,527 Views)