LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help filling in a cluster of clusters - Bug?

Hi,

I am using LabView 5.1 and am attempting to sequentially fill a data
structure. I am reading a config file and one-by-one filling the
entries of a cluster of clusters (called Data).

Data is global and I am using Bundle-By-Name to load up one of the
sub-clusters (Bundle-By-Name is wired to a read version of Data and a
write version of Data). At each load operation, I provide
Bundle-By-Name with only the element being filled. However, when the
second or third fill operation occurs, the previously filled entries
of Data are zeroed out.

I can workaround this by filling the cluster in all at once - for a
bit. The next set of entries to be loaded is a dynamically-sized
array that *must* be filled sequenti
ally at run-time.

I need a method of writing to a single element in the sub-cluster
without disturbing the contents of any of the other data elements.

Any ideas or better ways? Thanks in advance!

Brett
0 Kudos
Message 1 of 4
(3,143 Views)
Hi Brett,

could it be, that you wired the "source element" of all "bundle by name"
VIs with only ONE source? In this case all bundles take the same source
cluster and write only the new elements in relation to this source. I
think this is what you see.

To avoid this, just take the output of the first "bundle by name" as
input for "source element" of the second bundle and so on.

I hope I understood you right.

Hans Joerg




"Brett L. Moore" schrieb:
>
> Hi,
>
> I am using LabView 5.1 and am attempting to sequentially fill a data
> structure. I am reading a config file and one-by-one filling the
> entries of a cluster of clusters (called Data).
>
> Data is global and I am using Bundle-By-Name to load up one of the
> sub-clusters (Bundle-By-Name is
wired to a read version of Data and a
> write version of Data). At each load operation, I provide
> Bundle-By-Name with only the element being filled. However, when the
> second or third fill operation occurs, the previously filled entries
> of Data are zeroed out.
>
> I can workaround this by filling the cluster in all at once - for a
> bit. The next set of entries to be loaded is a dynamically-sized
> array that *must* be filled sequentially at run-time.
>
> I need a method of writing to a single element in the sub-cluster
> without disturbing the contents of any of the other data elements.
>
> Any ideas or better ways? Thanks in advance!
>
> Brett
0 Kudos
Message 2 of 4
(3,143 Views)
"H.J. Beestermoeller" wrote:
>
> Hi Brett,
>
> could it be, that you wired the "source element" of all "bundle by name"
> VIs with only ONE source? In this case all bundles take the same source
> cluster and write only the new elements in relation to this source. I
> think this is what you see.
>
> To avoid this, just take the output of the first "bundle by name" as
> input for "source element" of the second bundle and so on.
>
> I hope I understood you right.
>
> Hans Joerg
>
> "Brett L. Moore" schrieb:
> >
> > Hi,
> >
> > I am using LabView 5.1 and am attempting to sequentially fill a data
> > structure. I am reading a config file and one-by-one filling the
> > entries of a cluster of clusters (called Data).
> >
> > Data is global and I am usin
g Bundle-By-Name to load up one of the
> > sub-clusters (Bundle-By-Name is wired to a read version of Data and a
> > write version of Data). At each load operation, I provide
> > Bundle-By-Name with only the element being filled. However, when the
> > second or third fill operation occurs, the previously filled entries
> > of Data are zeroed out.
> >
> > I can workaround this by filling the cluster in all at once - for a
> > bit. The next set of entries to be loaded is a dynamically-sized
> > array that *must* be filled sequentially at run-time.
> >
> > I need a method of writing to a single element in the sub-cluster
> > without disturbing the contents of any of the other data elements.
> >
> > Any ideas or better ways? Thanks in advance!
> >
> > Brett

The possible way , is to study LabVIEW data storage format, flatten your
"DATA" structure and replace/fill the part of desired flattened binary
string. Rather fast and effective. You just need a pointer to your value
in a data stru
cture and it's length.

--
Sergey Krasnishov
____________________________________
Automated Control Systems
National Instruments Alliance Member
Moscow, Russia
sergey_acs@levsha.ru
http://acs.levsha.ru
0 Kudos
Message 3 of 4
(3,143 Views)
Brett,

Peruse our web site and see if our configuration file scheme would not help.
With the Ultimate Global and Encoder you can save a lot of work dealing with
configuration files. The Global also provides a dynamic array interface.
See our web site for details.

Bundle-by-name uses the left-side input terminal(s) plus the middle terminal
to create the data structure. Elements that are not bundled by name are
assigned from the middle terminal, which is the type-definition terminal for
the bundle operation. This is true of both bundle-by-name and bundle. So if
you are doing sequential bundling to build up a data structure, you must wire
the output of the previous bundle to the middle terminal of the next.

Sincerely,

Mark Evans
Ultimate G - Power tools for LabV
IEW
http://www.UltimateG.com



Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 4 of 4
(3,143 Views)