LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting spreadsheet rows to expand by columb information

Hello everyone,

 

I am writing a number of rows of test data to a spreadsheet with a unique serial number in columb 1.  I need to revisit each row at a later stage to add additional test data to that row using the serial number as the reference. I also need to be able to extract test data from the spreadsheet by the serial number and columb number for further calculations.

 

I am pretty new to Labview and would appreciate any help. Ideally the help would be in the form of a simple VI.

 

Best regards,

 

Maiz

0 Kudos
Message 1 of 8
(2,886 Views)

@Maiz wrote:

I am writing a number of rows of test data to a spreadsheet with a unique serial number in columb 1


How exactly are you writing the test data to the spreadsheet... manually or programmatically...?? You can share your code, make sure its saved in LabVIEW 2012 or any earlier version.

 


@Maiz wrote:

I also need to be able to extract test data from the spreadsheet by the serial number and columb number for further calculations.


You can read the entire data in 2D array of string format and then using Array functions can extract the data of interest.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 2 of 8
(2,881 Views)

Hello Moderator 1983,

 

Thank you for your reply.

 

The test information will be read in from a digital scale via RS232. The scales will measure the weight of motor stators before and after the varnishing process. I have started on a simple program, please find attached. The knob is simulating the digital scale. As I mentioned I a beginner so my VI might not be the way forward.

 

Best regards,

 

Maiz

 

 

 

 

0 Kudos
Message 3 of 8
(2,869 Views)

Ok, so after you are finished with data logging, you can use Read From Spreadsheet File VI and use its all rows output to access complete data.

Now in this data, each row is individual record (corresponding to the serial number) and different columns (tab delimited) are different parameters (date, time, serial number etc)

 

Now. as I already mentioned, its just by using different Array functions use should be able to access the data.

 

What specifically, you are finding difficult to implement...??


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 4 of 8
(2,860 Views)

Currently I am having difficulty in expanding my VI to add the post varnish data to an existing row of data with reference to the serial number.

 

I will read up more on arrays to get more familiar with them.

 

Best regards,

 

Maiz

0 Kudos
Message 5 of 8
(2,855 Views)
This sort of operation would be simpler if you used a database instead of a text file. Besides the Database Toolkit from NI,there are free options available.
0 Kudos
Message 6 of 8
(2,830 Views)

You guys make it sound really simpleSmiley Happy but I am struggling to find the write function blocks. Can one of you please help me by writing a simple VI that reads in a row of data by using  the first number in the row as the reference and writes the numbers in that row to another .csv file

 

e.g. CSV file contains:

 

111,65,34,75,98

112,87,55,34,22

113,85,85,34,21

 

By typing in say 112 I want 112,87,55,34,22 written into another .csv file.

0 Kudos
Message 7 of 8
(2,811 Views)
You should read in the entire file as already mentioned. Use index array to get the column with the serial number. Search this array for the serial number. Use the returned index to get the entire row.

As I said, doing this sort of operation with text files is pretty crude.
0 Kudos
Message 8 of 8
(2,806 Views)