LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Table to cluster conversion

I'm trying to convert a table containing the scan results from an Agilent 34980A to a cluster containing two other level of embedded clusters (as the switch_init cluster in the attached vi). The problem is if I use an array of cluster it would not be possible to label each cluster with the signal name (table first column). Also I'm not sure but I think clusters can't be labelled dynamically.

 

The switch_init cluster is the format I would like to obtain.

 

note: some unused code is present in the diagram as remnant of some trials.

 

Ben64

 

 

0 Kudos
Message 1 of 5
(2,961 Views)

No need to use an array of cluster. Use a table control, available from your FP tools pallette. This allows you to label column header so on so forth... It is a 2d arrays that allow text column and row header (from off the top of my head)... You have to use a property node to setup row column headers.

0 Kudos
Message 2 of 5
(2,947 Views)

OK I finally got to what I want but going throught a lot of string manipulations. Any idea on how I could improve the code in the "Better way to do this ??" section of the block diagram?

 

Thanks

 

Ben64

0 Kudos
Message 3 of 5
(2,926 Views)

You use the "XML__JKI easyXML.vi" to create the schema, then that VI spits out clutter you clean up. You could try parsing the table into XML yourself... Who knows what in the JKI easyXML VI does? You may wind up with less code that does exactly what you layout.

0 Kudos
Message 4 of 5
(2,913 Views)

 


@richjoh wrote:

You use the "XML__JKI easyXML.vi" to create the schema, then that VI spits out clutter you clean up. You could try parsing the table into XML yourself... Who knows what in the JKI easyXML VI does? You may wind up with less code that does exactly what you layout.


 

> You could try parsing the table into XML yourself.

 

Yes, you can do that, but it's hard.

 

> Who knows what in the JKI easyXML VI does?

 

I do 🙂 -- I helped write EasyXML.  Basically, it traverses over the LabVIEW data and parses or generates XML based on that LabVIEW datatype.  It essentially lets you generate or parse any XML data by simply creating a cluster with a structure that's similar to the XML data structure.

 

Cheers,

 

-Jim

0 Kudos
Message 5 of 5
(2,880 Views)