12-08-2009 11:10 AM
I am working on a multi-language application that includes a reentrant VI. I have been successful at importing a strings file to non-reentrant VIs but seem to have issues importing strings to a reentrant VI. I basically call the reentrant VI dynamically in a loop (open VI ref, import strings file, run VI). The first iteration is error free, but after that it returns error code 1000.
I know that the import strings function does not execute when the VI is running and that is why I am receiving this error, but my VI is reentrant and set to preallocate clone for each instance. Is this behavior expected when using the import strings function while calling a reentrant VI multiple times? If so, is there a workaround this issue?
Thanks,
Cristian
(Using LabVIEW 9.0f2)
Solved! Go to Solution.
12-08-2009 11:12 AM
Try using a template (*.vit) instead. I believe all re-entrant VI's share the FP.
I admit I have not tried this.
Ben
12-08-2009 11:17 AM
12-08-2009 02:35 PM
Ben wrote:"...I believe all re-entrant VI's share the FP...."
If this is true, then I should be able to just import strings on the first iteration of my loop and the strings should change for all of them.
I made a simple VI of this for testing and found that on the second iteration, the Run VI method returns error code 1000. The loop runs correctly on the first iteration because the reentrant VI was not in memory, but on the second iteration, it seems like when a new reference is made to the reentrant VI, it sees that it is already running in memory.
From what I understand about reentrant VIs (set to preallocate clone for each instance), they should act very similar to VIT's. Someone correct me if I am wrong.
12-09-2009 07:19 AM
I believe the Open VI ref accepts an optional input of a hex "08" (check the help) to indicate the VI should be opened as reentrant?
Ben
12-09-2009 08:22 AM
When I add the hex '08' input to the Open VI Ref function, I get error code 1000 following the import strings function. It almost seems like the import strings feature is not available for either VIT's or reentrant VI's. Can someone verify that this is correct?
12-10-2009 10:38 AM
I am still unable to solve this issue with importing strings to reentrant VI's. If someone could please assist me in solving this issue or finding a workaround, I would greatly appreciate it!
Thanks,
Cristian
12-10-2009 10:41 AM
This is not a an often used feature so I'mnot sure many have done this. I did have one other idea.
Try opening all and import the strings for each before running any of them. This idea is spwaned from the theory that once running the method is invalid.
Ben
12-10-2009 01:48 PM
12-10-2009 01:58 PM
If you are wiling to post a complete zip, ready to go, I'll take a look when I get into work in the morning.
AS I said earlier I have nver done that and never heard of anyone doing it but I am willing to take a look if you post everything I need.
No guarentees aside from trying it myself in the AM.
Ben