10-10-2007 01:37 PM - edited 10-10-2007 01:37 PM
Message Edited by Been bitten by LabVIEW on 10-10-2007 01:38 PM
10-11-2007 04:10 AM
10-11-2007 07:49 AM
10-11-2007 09:07 AM
I got stuck with a similar-sounding issue a couple years ago. First see this message, then this one.
I never did fully resolve the whole mess -- I wound up using a short-term workaround. Since then, I've approached similar "spawned process" needs using different approaches in code. Generally, these involve message sync'ing mechanisms like Queues and/or Notifiers.
What is your purpose for passing data via "Get Control Values" and "Set Control Values"? What are you trying to accomplish with this approach? Maybe your reasons are different than mine were and perhaps there's hope for a cleaner solution for you.
-Kevin P.
10-11-2007 09:40 AM
10-11-2007 09:48 AM
The purpose is to dispose of the connector pane, which is a
pain in the ass. 😞 Seems like connector panes are not compatible when
they should be (same layout, types and names). I've tried to use ConPane
property to copy as well, but it doesn't seem to work very well either,
probably due to the same reason.
So the reason for doing this is to eliminate the connector pane from the
problem, but I've been reading and this may be a hassle as well since I may
have reentrent functions using this method. I'll have to check out
templates.
I just wish that types could be passed like C++ templates do, as this would
simplify code centralisation while enforcing type safty to the nth degree.
10-11-2007 03:46 PM
It sounds to me like you're trying to coerce LabVIEW to match your thinking. Why not use the connector pane? It's the best way of passing data to called functions. Just use a standard connector pattern (4-2-2-4 is probably the most common one with the corner terminals reserved for references and error IO). In any case, always use a pattern which has more terminals then you'll need.
As the others have mentioned, there are much better ways of inter-VI communication than what you're doing, but my guess would be that the FP of your VI is not loaded into memory. Try placing a property node for one of the FP controls in the BD of that VI. That should force it to be loaded.
10-12-2007 10:12 AM
Yeah, I tried that. Didn't have much success. Do I need to use a standard connector pattern? Perhaps that was my problem. I just used a pattern that had the correct amount of terminals which didn't neccessarly confrom to a standard one. But they did have the same layout as the others.
@tst wrote:
It sounds to me like you're trying to coerce LabVIEW to match your thinking. Why not use the connector pane? It's the best way of passing data to called functions. Just use a standard connector pattern (4-2-2-4 is probably the most common one with the corner terminals reserved for references and error IO). In any case, always use a pattern which has more terminals then you'll need.
Tried that. Didin't work. Anyway, I think I'll abandon that since it will become problematic if I were to do recursion or multi-thread stuff.
@tst wrote:As the others have mentioned, there are much better ways of inter-VI communication than what you're doing, but my guess would be that the FP of your VI is not loaded into memory. Try placing a property node for one of the FP controls in the BD of that VI. That should force it to be loaded.
10-13-2007 02:03 PM
No, but it makes your code much cleaner and easier to use. If you see that you are nearing the number of terminals, that should be a hint that some of the inputs\outputs belong in typedef clusters or that you need to divide the functionality into more than one VI. Leaving empty connectors is never a problem and is very useful when you need to add inputs or outputs later. As I said, the most common pattern is probably 4-2-2-4 and it's the one I use.
@Been bitten by LabVIEW wrote:
Do I need to use a standard connector pattern?