08-28-2013 07:42 AM
I am measuring some parameters from oscillsocpe. i need to write these values to text file for which i am using write to spreadsheet, but what is happening is it is always writing zero value to file, on debugging i found that while converting from number to string it is always writng zero to string indicator, then separately i used that number to fractional string indicator and it is always showing zero in string output , i dont why it is happening.
Attached below is the code.
Solved! Go to Solution.
08-28-2013 07:58 AM
It should
08-28-2013 08:02 AM
I dont understand that code as it converts a numeric string into a number and then back to string. That seems to be Rube Goldberg code.
Are you sure that you read valid values from the VISA interface?
Norbert
08-28-2013 08:21 AM
Ranjeet Singh and Norbert_B
Thanks for ther reply
Ranjeet singh,
number to fractional string is working correctly, there is some other problem, because inly when i am executing this code converting this rise time value to string then only it is showing zero, otherwise for any random number if i am checking this number to fractional string is working correctly.
Norbert_B
i dont need to convert it back to string that i am doing only to check why it is showing zero value on converting number to string , because when i was writing to spreadsheet file it was always writing zero value, so when checked that code it was observed that while converting from array of numbers to spreadsheet string it is always writing zero value that's why i am doing it here just to check why it is not converting to string, but your suggestion helped in focussing the string that i am gettong from VISA read, i can use that in last case if i wont be able to find the solution but main problem is that why i am not able to convert it back to string, why it is showing zero because it is because of this only write to spreadsheet is always showing zero value .
08-28-2013 08:26 AM
If you want help, you need to provide the data. First, create an indicator on the output of the VISA Read. Run the VI. Go to Edit>Make Current Values Default. Save the VI. Attach that. Until you do that, everyone would just be guessing what is wrong with your conversion.
08-28-2013 08:34 AM
Thanks Dennis knutson for the reply,
Below i am attaching the code with all the valuees.
08-28-2013 08:42 AM
That was simple. When you are converting a nsec reading, you would of course need greater precision than 2 decimal places. Why don't you use Number to Exponential or Number to Engineering.