LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help with functional global

Solved!
Go to solution
Solution
Accepted by RTSLVU
It looks like you have the functional globals in different projects. I may be mistaken, but I think a VI only has context within the project that it is in.  The FG in a different project is in a different context.
Message 11 of 16
(1,537 Views)

Yes, you're right. They are faster outside the loop. I think Greg Mckaskle (sp?) posted the reasoning for this somewhere on the forum. I forgot (oops). And, I believe Raven is correct; they are not visible across projects. Have you tried testing the global on in separate threads on the same VI like this?

 

 

 

See if it works in a simple case like this. If it does, you know you have a visibility problem, not a problem w/in the FG

 

Message Edited by for(imstuck) on 05-11-2010 12:19 PM
0 Kudos
Message 12 of 16
(1,532 Views)

Ravens Fan wrote:
It looks like you have the functional globals in different projects. I may be mistaken, but I think a VI only has context within the project that it is in.  The FG in a different project is in a different context.

 

Yes they are in different projects.

 

The FG.VI is in "Project-A" but it is also listed in "Project-B" as a dependency.

 

Is that not good enough?

 

Can I add just the FG.VI to "Project-B" or do I have to add the entire "Project-A" to "Project-B"?

 

I would rather not do the latter...

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 13 of 16
(1,520 Views)
I'm not going to try to answer this because I know that I don't know. I do have one question though. Why are you using separate projects? Are you running separate processes? If so you should look for interprocess communication. If not, you should see if you can reorganize your code to all be in one project.
0 Kudos
Message 14 of 16
(1,507 Views)

Indeed it would appear that all VI's that reference the FG.VI must be in the same project. Do standard globals have that limitation?

 

This is disappointing to say the least as I was hoping for an elegent soultion to using standard globals.

 

I guess I will keep the idea of FG's in the back of my mind for use in larger "stand alone" projects.

 

The reasion I have two projects here is the comunication VI's are a seperate project that I did for our production test group. It is quite large and I would rather keep it "isolated" from the quick and dirty test VI's that I often have to throw together at a moments notice.

 

 

Message Edited by RTSLVU on 05-11-2010 11:07 AM
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 15 of 16
(1,505 Views)
Some people may be able to give you better suggestions. That being said, you can use a tcp/ip connection using the loop back ip ("localhost"). You can have one process listening on some port and the other sending data. Any time data is sent, you can update your variables.
0 Kudos
Message 16 of 16
(1,491 Views)