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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help in separating the all the data from .csv file

Solved!
Go to solution

Hello All,

I have one CSV file and at a time i hv to read just one row and then set those parameter to instrument. then again second row and so on... But i always get all the data as in one row... i was to seprate them so i can give separate value to separate parameter of instrument. 

Hope anyone can help me in this...

Thanks a lot...

 

Download All
0 Kudos
Message 1 of 11
(2,914 Views)

The Delimiter for reading the file in string format has an extra character other than comma, Right click delimiter constant and select code display to see /t, as your delimiter. Thats why you are getting all the values in the single row.

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 2 of 11
(2,908 Views)

Hi Balaji,

I have done that but still all values and commands i want to use separately... so i can set the instrument...

I am attaching the file again..

Thanks so much...

0 Kudos
Message 3 of 11
(2,905 Views)

I dont understand what u means the command and values seperately.

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 4 of 11
(2,897 Views)

Hello Balaji,

I am SCV file i have all the values , command which are needed to set the spectrum analyzer so i need them separately for each row and then after reading 1st row and setting the instrument again it should go to 2nd row read, set and so on...

Thanks a lot.. 

0 Kudos
Message 5 of 11
(2,894 Views)

How should this file look when it has been processed. That way we can better understand what you need.

Tim
GHSP
0 Kudos
Message 6 of 11
(2,879 Views)

Hello aeastet,

 I have one file (.CSV) in which i have 120 different values for setting the instrument(so in all 120 rows). So at each iteration i should read all the values(Which are listed in a row of .csv file) and then should be given to instrument. Then again my code should read second row of CSV file and then again it should be given to instrument.

 

Now my problem is i can read one row each time... i know how to send to instrument, but when i read this .csv file i read all values in a group, i want individual so i can set the instrument. I have used unbundle but still i cant...

 

Hope this time i am bit clear to my explanation...

Pals

0 Kudos
Message 7 of 11
(2,875 Views)

My .csv file..

Now it has just 14 rows(i.e 14 setting parameter) but it will 120 

Thanks so much

0 Kudos
Message 8 of 11
(2,871 Views)
Solution
Accepted by topic author Sim5

It looks to me if you use the attached code it will give you what you want

 

Example_BD.png

Tim
GHSP
0 Kudos
Message 9 of 11
(2,867 Views)

Have you ever looked at the contents of the file? You don't have a csv file. Use the ; delimiter that's actually there. Yoy can't just make things up.

0 Kudos
Message 10 of 11
(2,857 Views)