Message Edited by James R on 04-20-2007 09:14 AM
Message Edited by Ben on 04-20-2007 09:34 AM
Can anyone tell me why placing input controls only into the case that would use them would impact the performance of the FG/AE? I have been doing this instinctively when I added various cases other than read/write to my functional globals. I'd like to know why it's wrong.
Kevin, the releveant discussion about terminal placement is in a different thread:
Maybe you should read it first, then post over there if there are remaining questions. 🙂
TIP: There are explanations from highly regarded NI insiders such as Darren and Greg McKaskle, so focus primarily on their answers. 🙂
For some completeness, here's what Ben's example would look like using GOOP.
If you'll remember, Ben included the following image in reply 2:
He then offered this alternative:
The GOOP version of this would look like this:
As you can see, the code is relatively similar, but it has a few important differences:
The key to making this work is simple:
The VIs share a cluster of data. When a VI wants to modify this cluster (like the toggle VI), it requests a lock.
As soon as the cluster is available it locks it and now it can modify it and unlock it, so that any other VI wanting to use it can do so.
This guarantees that all the functions work on the same data.
For example, this is what the toggle VI looks like:
There are several GOOP implementations available, mostly using the same basic concept with slightly different implementations.
They all have wizards for creating the basic VIs you need. In this case I used dqGOOP, but any of the others would work as well.
I'm sure that with the built-in LabVOOP, you can also do this in a similar fashion (although for parallel operation, you would need a wrapper),
but I don't work with 8.x, so this is what I'm showing.
Attached is the example shown in the example above
This thread on LAVA discusses sharing an Action Engine across projects in both the development and runtime environments. Potentially extendable to cross-plattform opeartion.