06-06-2020 03:15 PM
I sure could use some help with a subpanel issue. I have 2 user interface VI's that I need to "duplicate, hosting 4 total subpanels. I saved the VI's as templates, and when I created the VI references, I used option flags 0x40 (Enable simultaneous calls on reentrant VIs) & 0x80 (Prepare to call and forget). I then start the four VI clones using "Start Asynchronous Call".
2 things go terribly wrong:
1) As expected the subpanels get "populated" with the target VI's, but they are "missing individual data in their indicators". By that I mean that there are string indicators that display their "controller name" (given to the VI in class data) that are "missing" (not visible). The "Should look like.png" picture shows these strings, and also the fact that on the lower subpanels, some FP objects are shown or not depending on their class data, this is my intended behavior. So the displayed FP's in the subpanels have "lost their individual identity" so to speak. Now, what's strange is that I put in a dialog box in them to display for me the "controller name", and the dialog does show the correct, separate/individual data from both. So the VI clones both "know who they are" - they're just showing! Bizarre! Yes, I think so too!
2) Perhaps out of guilt, LabVIEW also gives me 4 "bonus" VI's displayed - the 2 pairs of VI's also appear as separate windows (see the picture "Bonus CLones.png"). These 4 separate clones properly display their individual class-defined data - they "know who they are".
I've attached a couple of snippets also - how I'm creating their VI references, and how I'm starting the async calls.
So confused!! Any ideas, anybody? Thanks in advance, paul
Solved! Go to Solution.
06-06-2020 03:33 PM
Hard to tell from just pictures.
I suggest trying to use normal VIs, not sure why you need VITs.
mcduff
06-06-2020 04:03 PM
Good to hear from you McDuff. I thought I had to use templates because I'm "populating" 2 subpanels with the same VI, see
http://zone.ni.com/reference/en-XX/help/372614J-01/lvhowto/acbr_call_clones/
I have 2 "pairs" of subpanels, using 2 VI's. But hey, if I can kill the template thing that would be great. Thanks, I'll try it! paul
06-06-2020 04:13 PM
Below is an rentrant VI, two separate instances, running in a subpanel. (The pop-up window has a subpanel in it.)
mcduff
06-06-2020 04:17 PM
I definitely gotta try it without the template business (wonder why they say you need to that? I'm creating separate distinct references...)
06-06-2020 04:19 PM
I didn't see VIT in the link you sent.
The key is setting the properties to reentrant in the VI Properties dialog, otherwise, your VIs won't run concurrently.
mcduff
06-06-2020 04:23 PM
Mucho thanko as always McDuff!
06-06-2020 09:21 PM
Ruh-roh - So I created references with strict typing as in the attached snippet, with option 0x80. Not quite exactly as McDuff did, but it seems equivalent. Now I get error 1576 for every Async call - "A Start Asynchronous Call node received a reference input that was not configured to allow asynchronous calls. To fix this error, include either the 0x80 option flag or the 0x100 option flag when you open the reference with the Open VI Reference function." But but I did use 0x80! All 4 of of vi's are "Preallocated Clone" execution. Ideas? thanks, paul
06-06-2020 09:40 PM
@PaulOfElora wrote:
Ruh-roh - So I created references with strict typing as in the attached snippet, with option 0x80. Not quite exactly as McDuff did, but it seems equivalent. Now I get error 1576 for every Async call - "A Start Asynchronous Call node received a reference input that was not configured to allow asynchronous calls. To fix this error, include either the 0x80 option flag or the 0x100 option flag when you open the reference with the Open VI Reference function." But but I did use 0x80! All 4 of of vi's are "Preallocated Clone" execution. Ideas? thanks, paul
For some reason I can't insert pictures into the response.
See this thread
mcduff
06-07-2020 09:31 AM
That worked, McDuff, thanks very much again. I need to learn more about these VI references - lots going on under the hood - paul