08-12-2015 02:43 PM
My program requires me to read certain values from Excel cells, which it is doing, and multiply them with each other. Unfortunatly when I read it from the cell and convert it to a numeric, it rounds to zero becuase it is a really small number like 3.86*10^-4. I dont want it to do that. how would i stop it from happenning.
Solved! Go to Solution.
08-12-2015 02:46 PM
Where are you seeing the zero values? In excel, or in LabVIEW? Most likely you're just seeing the rounding done by the indicator and the actual value is still 10^-4.
Right click your indicator and go to Properties to change the display format.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
08-12-2015 03:43 PM
How are you reading and converting the numbers in LabVIEW from Excel ?
is it really an excel file(xls) or just a text file(csv)?
08-12-2015 04:05 PM
It is really very difficult to help you when you do not provide data that we can use. You keep asking for answers, but are reluctant to show what effort you, yourself, are making.
At a minimum, we would need to see an example of the Excel file whose data you are trying to read. You should also include your own VIs that you are trying to develop (you aren't really asking us to do all the work, are you?). Note that you can bundle your various Excel and LabVIEW files into a folder, compress the folder with Windows (i.e. make a "Zip" file), and attach the single Zip file.
Bob Schor
08-12-2015 04:06 PM - edited 08-12-2015 04:43 PM
08-12-2015 09:13 PM
@James.M wrote:
Where are you seeing the zero values? In excel, or in LabVIEW? Most likely you're just seeing the rounding done by the indicator and the actual value is still 10^-4.
Right click your indicator and go to Properties to change the display format.
Or you could just really lengthen the size of the of the indicator.
08-13-2015 06:26 AM
@billko wrote:
@James.M wrote:
Where are you seeing the zero values? In excel, or in LabVIEW? Most likely you're just seeing the rounding done by the indicator and the actual value is still 10^-4.
Right click your indicator and go to Properties to change the display format.
Or you could just really lengthen the size of the of the indicator.
That works if you see the "0.00" in the indicator. Personally, I like to use the SI notation for indicators like this. And, yes, the indicator likely needs to be expanded to show all of the data.
08-13-2015 07:23 AM
@crossrulz wrote:
@billko wrote:
@James.M wrote:
Where are you seeing the zero values? In excel, or in LabVIEW? Most likely you're just seeing the rounding done by the indicator and the actual value is still 10^-4.
Right click your indicator and go to Properties to change the display format.
Or you could just really lengthen the size of the of the indicator.
That works if you see the "0.00" in the indicator. Personally, I like to use the SI notation for indicators like this. And, yes, the indicator likely needs to be expanded to show all of the data.
Ahhh, I think we were both assuming he was converting into a floating point number. But the whole thing falls apart if the usual suspect - bullet point number two in Altenbach's post - turns out to be the culprit. 🙂
08-13-2015 09:12 AM
I am using a VI that reads the values out of Excel, and I'll try using the fractional string to number.
08-13-2015 09:15 AM
@fghfghgfhfhg wrote:
I am using a VI that reads the values out of Excel, and I'll try using the fractional string to number.
...so what were you using up to this point?
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'