From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How make a cluster or typedef from excell file

Solved!
Go to solution

Hi all,

I've a problem, i wold build a Ethernet sub-payload starting from excel file .

Let me better explain:

1) I've the a file (excel) where I've information as offset in the frame, data dimension (number of bits), type of data (signed, unsigned,...), signal name,.....

2) The file can change from project to project.

3) So I would make programmatic ally the payload from the data in the file.

 

Someone has an idea? Suggestion?

 

Thanks

0 Kudos
Message 1 of 3
(865 Views)

Hi zundap,

 


@zundap1970 wrote:

1) I've the a file (excel) where I've information as offset in the frame, data dimension (number of bits), type of data (signed, unsigned,...), signal name,.....

2) The file can change from project to project.

3) So I would make programmatic ally the payload from the data in the file.

Someone has an idea? Suggestion?


Read the file, parse its content and create your payload as needed.

What exactly is your problem?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(803 Views)
Solution
Accepted by topic author zundap1970

I did something like this about 8 years ago.  We had a big spreadsheet that we used to control a behavioral study, with three Worksheets, two having multiple rows of named parameters (e.g. "Subject Name") and their values (e.g. "John Smith"), while the third was a 2D "Trial" array, each row being a "Trial" (or "Test") with something like 150 parameters that characterize the timing and sequence of the test.

 

With a model Workbook, you can use LabVIEW Scripting to parse the Workbook, using row and column identifiers (contents of Column 1 in the 2-column "Name" Worksheets and contents of Row 1 on the 2D "Trial" Worksheet) to create a TypeDef (for a Cluster).  Once you have the Cluster, you can use similar Parsing routines (at run-time) to interpret the Rows and Columns of a Template Workbook (that is, one where the Rows and Columns with Identifiers that match the identifiers in the Cluster) with the respective data that you either read from the Workbook or "fill in the Blanks" at Run Time from the data you are collecting.

 

This was not a trivial undertaking!

 

Bob Schor

0 Kudos
Message 3 of 3
(795 Views)