LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cluster does not populate in sub-vi unless front panel is opened

I have a sub-vi that saves my data to a database and the cluster containing the data will not populate unless I open the front panel when it executes.  What could possibly cause this?

0 Kudos
Message 1 of 15
(3,042 Views)
You should post the VI and subVI so that we can see what is happening.

I can think of two possiblities: The connector pane is not wired to the control or indicator or the subVI is reentrant. I am not highly confident of either without seeing your VIs.

Lynn
0 Kudos
Message 2 of 15
(3,027 Views)
Here is the vi.

0 Kudos
Message 3 of 15
(3,023 Views)
Hi Lynn, Landauer,
      On the hunch it's a compiler-optimization issue, I'd try accessing a cluster-element via local variable, after the bundle-by-name, but before mining the control-references.  Yet I'm unable to reproduce Landauer's results!
I'm missing a bunch of Save_Readings sub-VIs, so built this test VI - but like I said, no-can-reproduce.
 
tbd
 

Message Edited by tbd on 07-07-2006 01:32 AM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 4 of 15
(3,005 Views)
Which cluster exhibits the problem? And which VI? As tbd pointed out, many of the subVIs are missing, making it difficult to tell what is happening.

The use of local variables and property nodes to pass values around may lead to the possibility of a race condition. The Dosimeter Readings local connected to the Bundle by Name block is of some concern: What value does it contain the first time the program executes? Some value must occur for the local before the indicator is written the first time due to dataflow. I am not sure what value is used. Probably the default values. Similarly, the globals feeding into the Bundle by Name have not been written prior to being read unless they are written outside this VI before it is called.

Lynn
0 Kudos
Message 5 of 15
(2,992 Views)
It is the readings cluster that does not populate.  That is the input cluster for the vi.  When I run in the development environment the program saves correctly without opening "Save Readings.vi".  However after the complete program is compiled the data will not save unless "Save Readings.vi" is opened when it executes.  I have attached the missing vis
Download All
0 Kudos
Message 6 of 15
(2,967 Views)
How are you calling this subVI? Is the connector pane wired or are you using dynamic methods?

I still cannot run your subVI because I so not have the DB addon and the globals are missing.

Lynn
0 Kudos
Message 7 of 15
(2,958 Views)
The connector pane is wired.  The globals are just misc data.  The global in "Connect SQL Server.vi" is the database name.  I think the DB calls are not part of the problem.  I used the SQL log to record the string format all the time and when the "Save Readings.vi" is not opened the values in the query are all zero or blank.
0 Kudos
Message 8 of 15
(2,956 Views)
What does highlight execution reveal? If you probe the wire connecting to your subvi, is the data in it correct?
 
Chris C
0 Kudos
Message 9 of 15
(2,949 Views)
Yes, when I run in the development environment there is no problem.  If I compile the main program and force "Save Readings.vi" to open when called there is no problem.  But, if "Save Readings.vi" does not open when called the data never appears in the query.
0 Kudos
Message 10 of 15
(2,940 Views)