06-27-2016 11:21 AM - edited 06-27-2016 11:41 AM
I DAQ two analogue values from a Helium leak detector: one signal is a step function indicating an exponent (between 1 and 10 Volts, 0.5 V steps) and the other signal indicates the mantissa in the 1-10 V range. I take the mantissa value as it is, and I convert the exponent step function into an integer value. This part is simple. So the leak rate can be constructed in the following way: AI0 * 10^Exponent.
I could just use a formula node, but I wonder if there is a neater solution to create a scientific format double? I know there is an inverse function:
Edit: Ok, I guess this is the possibly most simple way in LabVIEW, isn't it? -->
Solved! Go to Solution.
06-27-2016 11:50 AM
I would agree, taking a power of ten to the matissa is what you want.
Bob Schor
06-27-2016 11:52 AM
06-27-2016 12:15 PM
Well, there are plenty of slower ways to get the same answer ... I'd say that you, not I, deserve the "solution" (I only said "I agree") ...
BS
06-27-2016 12:19 PM
The agreement was the solution I was seeking 😉
03-10-2017 03:21 AM
Hi,
I was looking for a solution to this myself and found this post. However, the double should be mantissa x exponent ^ 2 - i.e. the Power of 2 vi should be used rather than Power of 10. At least this is what works on my machine / version of Labview - do some machines use Decimal32 IEEE-754?
03-10-2017 03:41 AM
@redfrank wrote:
Hi,
I was looking for a solution to this myself and found this post. However, the double should be mantissa x exponent ^ 2 - i.e. the Power of 2 vi should be used rather than Power of 10. At least this is what works on my machine / version of Labview - do some machines use Decimal32 IEEE-754?
Sorry, I do not understand why you would use a power of 2? Anyway, in my case the manual of the leak detector clearly states that the mantissa and the exponent to be used the usual way to form a double number:
Value = mantissa * 10^Exponent
03-10-2017 03:54 AM
Ahh, apologies, helps if I read the full post about- just skipped to the bit I was interested in which was the solution you had posted, and missed the whole reason you wanted to do it... Looks like the leak detector is using a Decimal32 representation. I am taking a 32 bit word from a message received by my test software and trying to convert this into a Floating point IEEE-754 number. Unfortunately it's not been specified whether it uses binary or decimal but was assuming binary as this seems to be the "standard" float convention. I proved my solution by converting it back using the Mantissa and Exponent vi, and it matched my original number, as Labview / the PC must be storing doubles as Binary32.
I thought you had done the same by running it through the Mantissa and Exponent vi - I assume you haven't as this uses Binary32?
Sorry for the confusion!
03-10-2017 04:12 AM
I see 🙂 Well, in my case I measure analogue signals, not digital values. So after some scaling I use them as floating point values to form the mantissa and the exponent.
03-11-2017 06:35 PM
Semantic nit pick: The thing being referred to as a "mantissa" is properly called a "significand". A mantissa is the fractional part of a logarithm.