LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

control reference on cluster element perverted in run time execution mode

Hi!

Evironnment:
------------
LabView 6.1 (english) under Win NT

Problem (bug?!) seen:
----------------------
I use the VI loader technique in run-time mode to distribute an application.
One on the vis of the application create references on cluster element of its front panel and passes them to sub-vis. The subvi uses the references labels and values to update parameters from .ini file.
In development environnement execution mode all works fine. In run time mode using VI loader technique, the references seem to be perverted: the label text value cannot be read by the subvi.
If references are made on simple controls instead of cluster element controls, all works fine.

files:

------
In the zip 2 vis to demonstrate the problem:
pere.vi creates a reference on a cluster element of its front panel and passes it to fils.vi that displays
reference.label.text and reference.caption.text.

Loader.exe is my vi loader. It needs the vi.lib to be present in its directory.

Loader.ini gives the target to be loaded (pere.vi)

Any comment, explanation wellcome
If it's a bug as i think it is, where should it be posted?
😉
0 Kudos
Message 1 of 17
(3,420 Views)
Probably its really small bug... Something wrong in block diagram in pere.vi. But your sample can be fixed - just open pere.vi, then run once (its important), then save it (asterick does not appear in title bar, just choose File->Save all). Now it works in Run-Time with loader.exe too. I have done with getting reference from Controls[] Propery Node and getting the same effect.
In attachmet I wrote my loader especially for pere.vi. Just unzip both archieves into different subdirectories and try run MyLoader.exe from both.
Download All
0 Kudos
Message 2 of 17
(3,420 Views)
Just small enhancement - I had maked these VIs as simple as possible. Now from MyLoader.exe I starting both "version" pere_bad.vi and pere_good.vi together. Both VIs absolutely same (visually), but property node in pere_bad.vi returned Error 1054 (The specified object was not found), and at the same time pere_good working correctly.
0 Kudos
Message 3 of 17
(3,420 Views)
Hi Andrey, thanks for your help.

1) I have also noticed that this behavioral problem in run time execution mode seems to be random: some of my vis using control references on cluster element show the problem whereas some others don't. This lead me to think that it is a kind of adresses overlapping in memory (so a LabView bug).

2) Your vi works fine in run-time mode but mine still does not work even if i do as you said (ie run once in dev mode then save all -> nothing seems to be saved).

3) I can't use your way of getting reference on cluster elements because the clusters I use in my application (not the exemple of course!) have controls of different types.

4) I'm surprised about the "save all" thing, are there any options for save/compilation wh
ich would explain that nothing's saved?.
0 Kudos
Message 4 of 17
(3,420 Views)
You wrote:
"2) Your vi works fine in run-time mode but mine still does not work even if i do as you said (ie run once in dev mode then save all -> nothing seems to be saved)."

Upps, sorry, it was incorrect. I had checked it. You must try to save vi _individually_, not with Save All. For example (in case, if behavior of my example the same with your) - I have following sequence:
1. Run MyLoader.exe. pere_bad reported about error.
2. Open pere_bad.vi in LabVIEW. Run. Stop. Save. Close.
3. Run MyLoader.exe again. pere_bad now OK.
Of course, it is not solution. Very interesting - what difference between pere_bad and pere_good? I think, only NI engineers can answer to this question...
0 Kudos
Message 5 of 17
(3,420 Views)
HI Guys,

I spotted a difference!

The good has the caption set equal to the label.

Bad does not have caption defined!

There is some fine print in the help about the caption being available in run time bu the label is not. Not sure what it means because it sounds wrong.

At least you have a bone to chase now.

Ben

I found this by doing a ctrl-H with the wiring tool.
Funny, when I compared the two VI's LV did not find any difference! Can't explain that either.
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 17
(3,420 Views)
There may be a bug in "Compare VI's".

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 17
(3,420 Views)
HI Ben!

Fine, that you found this. Making caption visible in "bad" vi immediately solved this problem. May be its some problems in compare. I was sure, that when I create new cluster (or other control), then caption created automatically, but initially hidden. In any case this behavior a little bit strange.

to thorgal:
may be this link a little bit help to you:
Write Label Text to Caption Text
http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B123AE0CB9DD111EE034080020E74861&p_node=DZ52041&p_submitted=N&p_rank=&p_answer=&p_source=External

About labels - I think its OK. Help said, that you can change caption in Run-Time, but you cannot change label of vi. Programmatically changing of labels available only in development mod
e.
0 Kudos
Message 8 of 17
(3,420 Views)
Showing a previously hidden caption will set it equal to the label (by default, I believe).

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 17
(3,420 Views)
Yes, this behavior reproducible.

1. Create new vi
2. Put empty cluster to the front panel.
3. Put numeric controls into cluster.
4. On block diagram create property node
5. Select Caption Property node
6. Create Label and Error Out indicators for this property node.
7. Make VI properties as top level application window (or enable show when called)
8. Save this VI as pere_bad.vi (where MyLoader.exe located)
9. Run this VI one time!
10 Save this VI as pere_good.vi
11. Close LabVIEW
12. Start MyLoader.exe

Now we have one "good" and one "bad" VIs.
0 Kudos
Message 10 of 17
(3,420 Views)