LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

software timing - Functional Global?

I was reading NI Intermediate manual to prepare for the CLD exam, and noticed that they used Functional global variable in combination with timed loop for the software timing. Also, the error handling was implemented using functional global.

 

However, I was reading in one post( not this forum) that the functional global is obsolete, can anyone shed any light on this issue, why would the functional global be obsolete: and if it is, what are acceptable design for software timing.

 

Thank you.

0 Kudos
Message 1 of 5
(2,437 Views)

I dont see why a global would be obsolete.

There are some instances when using a global variable is the best option, especially in cases when a resource will be used on several different computers.

If you trust your programming, you can use a timed loop to ensure that you dont have two computers trying to access the same global simultaneously, but again there is a better option.

If you use a 'semaphore', you can ensure that only 1 computer can access this resource at a time. This helps eliminate race conditions.

 

Where did you see someone say that globals are obsolete?

Cory K
0 Kudos
Message 2 of 5
(2,428 Views)
0 Kudos
Message 3 of 5
(2,426 Views)
I was surprised to see that some of those posters use them as rarely as they say they do.

I wouldn't consider them obsolete. I think that "interview" was trying to determine how heavily functional globals be covered in an Advanced LabVIEW course. And I would agree in an Advance LabVIEW course, FGV's should not have to be covered hardly at all because anyone taking an advanced course should have already mastered how to use them.

I thought some of those posters sounded a little pretentious. It would be like someone taking a high level calculus course saying that basic geometry and algebra are obsolete because there are more advanced topics they are trying to use.
0 Kudos
Message 4 of 5
(2,415 Views)

Cory K wrote:

I dont see why a global would be obsolete.

There are some instances when using a global variable is the best option, especially in cases when a resource will be used on several different computers.


A functional global variable isn't the same thing as a global variable. A functional global variable is what was used before global variables were introduced in LabVIEW 3. It is the heart of an Action Engine.

 

As for their obsolesence... Hah! That's all I have to say on that. Smiley Very Happy

 

As to the original post:  I'm a tad suspicious. What kind of software timing and error handling is being done with a functional global variable? Can you post the code?

0 Kudos
Message 5 of 5
(2,400 Views)