07-13-2011 06:45 AM
Hi Anjella,
so you want an array of digits of a number given as string? That's not possible with SpreadsheetstringToArray, but may be solved like this:
(I reverted the order of digits as usually this is suited better for further processing...)
07-13-2011 07:02 AM
Thank you!)) This is the most simple solution.
08-15-2011 08:05 PM
Ok i am trying to take data from a text file that consists of text and put it into an array. Then i want to be able to use the data to set some system settings. For example i am creating a text program that will connect with an lcr meter and take 22 points of measurements from the device im testing. so what im trying to do is create a file that will contain the name of the lcr meters and which gpib addresses belong to that machine. so my text file looks like this.
Handler, 5
LCR 1, 12
LCR 2, 13
LCR 3, 14
LCR 4, 15
What i want to do is load this info into the program and be able to set my settings based off the numbers. EX Handler uses address 5. Iam trying to use spreadsheet string to array to fill up an array with the data and its complaining about two different types of data. its saying that one is array of double and the other is array of string. How do i set it so the data from the file gets set as a string?
08-16-2011 01:54 AM
08-22-2011 03:19 PM
I dont have a VI built yet im in the process of converting it over to Lab View from Visual Basic. Where do i find the tags to change the datatype? even doing a google search on it i dont find much info on where and how to do this.
08-22-2011 03:45 PM
Hi Tod,
did you read the context help for "Read from spreadsheet file"? The first paragraph mentions "You must manually select the polymorphic instance you want to use."...
08-22-2011 03:50 PM
Im sorry i just realized what i was doing wrong i was trying to use read from text file and converting it to a spreadsheet. I did not realize that i could just use the read from spreadsheet and it will take the date from my text file... i got it work now
08-22-2011 04:08 PM - edited 08-22-2011 04:08 PM
Hi Tod,
you weren't "doing wrong". You should have read the context help for "convert spreadsheet string to array" - here you also have an "array type" input!
08-22-2011 04:08 PM
Ok so i have another problem. How can i take the data thats in the file and use it as a control to set gpib address for my devices.
For ex.
Array (Data taken from text file)
Handler (Tab) 6
LCR 1 (Tab) 3
LCR 2 (Tab) 4
I have this inputing into a indicator array on the main screen but what i need to do with the data is use it as the address control for write/read GPIB
08-22-2011 04:10 PM - edited 08-22-2011 04:11 PM
Hi Tod,
you could use IndexArray to get the GPIB address from the spreadsheet "cells". Then you should use a function to convert the string to a number - there are a lot of them in the string palette...
Btw.: You should use VISA functions instead of those "old" GPIB functions...