Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

saving read string in a table

Hi,  i hope someone can point me in the right direction. I have set up rs 232 communication with my serial device and now have a string consisting of Date, time and test result.

 

I want to split this string into each component and save them in a table on the screen so the user can see it. Then when my test is complete i want to hit a save button and save this data into seperate columns in an excel data file.

It sounds simple but i am really struggling! Any non-too- complex help will be appreciated.

 

 

Thanks

0 Kudos
Message 1 of 4
(3,501 Views)

Hi

 

You probably know exactly how long each string element should be. Use substring to split the received string and build an array of strings

Add this array to a table (or build first a 2D array of strings.

 

Use any of the tools for saving to excel (activeX or office toolkit)

greetings from the Netherlands
0 Kudos
Message 2 of 4
(3,493 Views)

Hi thanks for your help. Its very much appreciated! 

 

I can now split the string into its different components and see this on the screen. My next problem is a want to save numerous results in a table on the screen and once i've finished my testing save that as a batch of data in excel. At the moment it just flashes the string on the screen and then disappears. 

 

Could someone give me some pointers on how to save test data into a table to batch it and then save it.??

 

Thanks.

0 Kudos
Message 3 of 4
(3,467 Views)

Show below is a basic way to update a table. Your string array will be different each time, of course. A table is nothing more than a 2D string array. The shift register contains this 2D string array and with each iteration, a new row is appended by the Build Array function. When the loop finishes, the data is passed to the Write to Spreadsheet File function.

 

 

Most of this is pretty basic. You should check into the free LabVIEW training.

Message Edited by Dennis Knutson on 02-02-2009 11:55 AM
0 Kudos
Message 4 of 4
(3,459 Views)