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.
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.
01-28-2011 04:08 AM
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...
Solved! Go to Solution.
01-28-2011 04:58 AM - edited 01-28-2011 04:59 AM
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.
01-28-2011 05:05 AM - edited 01-28-2011 05:05 AM
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...
01-28-2011 05:10 AM
I dont understand what u means the command and values seperately.
01-28-2011 05:15 AM
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..
01-28-2011 07:09 AM
How should this file look when it has been processed. That way we can better understand what you need.
01-28-2011 07:18 AM
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
01-28-2011 07:19 AM
My .csv file..
Now it has just 14 rows(i.e 14 setting parameter) but it will 120
Thanks so much
01-28-2011 07:28 AM
It looks to me if you use the attached code it will give you what you want
01-28-2011 07:35 AM
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.