LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to multiply really small numbers that are to the degree of 10^-4

Solved!
Go to solution

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.

0 Kudos
Message 1 of 11
(4,494 Views)

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>   ---'


Message 2 of 11
(4,490 Views)

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)?

Message 3 of 11
(4,434 Views)

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

Message 4 of 11
(4,415 Views)
Solution
Accepted by fghfghgfhfhg
  • How do you get the data out of excel?
  • How are you converting to numerics? What do you use to convert?  (e.g. you should use "fractional string to number" instead of "decimal string to number")?
  • What is the datatype of the result? (Make sure it is orange and not blue).
  • What is the display format of the indicator?
Message 5 of 11
(4,410 Views)

@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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 6 of 11
(4,314 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 11
(4,226 Views)

@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.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 8 of 11
(4,206 Views)

I am using a VI that reads the values out of Excel, and I'll try using the fractional string to number.

0 Kudos
Message 9 of 11
(4,176 Views)

@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>   ---'


0 Kudos
Message 10 of 11
(4,170 Views)