From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to import data from excel to TestStand and Labview?

Dear TestStand/Labview experts,
1)I am using Labview 7.1 with TestStand 3.0. What is the best way to import 2 columns of hex data into a Labview array in Teststand. Where do I find samples on importing/exporting properties from/to exel files ("Using Labview with TestStand" manual only provides sample with .txt file)?
2)I have some sequences files created in TestExecutive 5.1.1. After being converted to TestStand seq files, the input buffer data can not be passed to the labview vi via the shell vi anymore. Does a TestExecutive seq file suppose to work as it was after converting to TestStand?

Thank you.
0 Kudos
Message 1 of 4
(4,018 Views)
With TestStand 3.0, you do not have to use the InputBuffer or TestData structures anymore. You do not even use the Sequence Context. Wire whatever you need to pass by using the connector pane in labview. When specifying the called vi in TestStand, whatever is in the vi's connector pane will show up in a list in TestStand. You can select the TestStand variable that you want to be associated with each item in the connector pane. Create a simple vi using Error In/Out clusters, wire them to the connector. Then create a TestStand step to call that vi. You will see TestStand's error structure listed in the column next to the Error In and Error Out rows. Add some controls and indicators to the vi, relink to TestStand, and you will see your new additions in the list.
You can link these to any TestStand variables. Of course the type has to match. This is much better than using the old TestData structures because you can run your vi alone without having to use TestStand for debugging purposes. And it makes it much simpler to pass any type and any amount of variables back and forth between TestStand and Labview.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 4
(4,018 Views)
Hi,

In the TestStand Docs folder is a LVTECompatibility help file. This spells out whats directly compatible and whats not compatible.

It's highly unlikely that the sequencefile will work correctly without some minor modifications.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 3 of 4
(4,018 Views)
As for opening excel files, it depends on whether you are talking about tab delimited spreadsheet files (which Excel can open, and save data into), or whether you are talking about actual .xls files. XLS files are binary files (as opposed to .txt files which are ASCII) so it would be a very different process. If you wanted to open them directly you'd have to know the actual binary format (which Microsoft may or may not publish) and you'd have to write a program to decipher them, which would be a very large undertaking. So your best bet would be to save them as a tab delimited ASCII file which you can then open and parse in the same way as any text file. If you really need to open XLS files then the best way would be by calling Excel through ActiveX. This would mean th
at Excel would have to be installed on whatever computer you are running it on. If you decide to go this route, then there are plenty of examples on the web site about accessing Excel via ActiveX.

Regards,
Ryan K.
0 Kudos
Message 4 of 4
(4,018 Views)