LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create a list

How do I creat a list of records. I can't use an array because the groupings have different number of records and the records have different data types. For example
a record consists of a group, section, and a task/test. How do I create a list of these for me to process and report on downstream in my application?
0 Kudos
Message 1 of 3
(3,147 Views)
Mike,

At first glance, it sounds as if you just need to create a cluster (equivalent to a record in Pascal) and then use an array of that cluster type to store your information.

If you're a pretty new LabVIEW user and haven't worked with clusters, then check out the documentation on that topic and see the little example snippet I attach below.

If you already know all about clusters and your problem lies with the "different number of records"/"different data types" point you made, then we may need more information to help.

Regards,
John Lum
National Instruments
0 Kudos
Message 2 of 3
(3,147 Views)
"mike.mccollough@raytheon.com" wrote in message news:<506500000008000000B6610000-1031838699000@exchange.ni.com>...
> How do I creat a list of records. I can't use an array because the
> groupings have different number of records and the records have
> different data types. For example
> a record consists of a group, section, and a task/test. How do I
> create a list of these for me to process and report on downstream in
> my application?
Make an array of clusters. (This is going to get complicated, so I am
making a list)
On the FRONT PANEL:
1.Make a cluster
2.Make 3 arrays of strings labeled group array, section array, and
task/test array, then drag these arrays into the cluster listed
above.(I suggest strings because they can pass text and numbers

easily)
3.Make an array, then drag the cluster listed above into this array.
This will now make n copies of your cluster, each one having it's own
trio of arrays inside.

If for intance, a particular case has more than 1 task/test, start
listing the tasks in task/test array. Then when you finally unbundle
the arrays, do whatever you need to do until each array is empty.

Remember that making arrays and clusters eats up large amounts of
memory quickly, so this will probably slow the computer down.
0 Kudos
Message 3 of 3
(3,147 Views)