05-09-2017 02:55 AM
Hii
I am trying to convert DBL(voltage) to Digital (16 Bit).
can someone please help me with that??
Solved! Go to Solution.
05-09-2017 03:11 AM
You have to define rules before being able to do so.
Digital patterns are easily converted to integer numbers ('binary pattern'), but floating point numbers (like a DBL) have a decimal sign and post-decimal numbers. What about those?
05-09-2017 07:49 AM
as norbert said, you should be more specific in what you want to accomplish,
especially if you'd like ppl helping you out, otherwise you will get answers like this:
05-09-2017 08:31 AM
/Y
05-09-2017 09:51 AM
@yamaeda reverse code golfing? ... i liked the red coercion point
05-09-2017 10:02 AM
@jwscs wrote:
@Yamaeda reverse code golfing? ... i liked the red coercion point
I can offer a couple of thoughts...
The implicit conversion posted by yamaeda shows how to do the conversion in a block diagram. You r version would require using your code as a sub-VI.
On the other hand...
At one time I discovered in one version of LV the implied coercion was actually faster than the implicit.
Choose your poison,
Ben
05-09-2017 11:02 AM
@ben .. i suppose you mean explicit (yamaeda's code)
but why would mine need to be a subvi?
regarding speed/memory i read some post from altenbach, where the implicit coercion was faster, bc it didn't need to create a new buffer (or somesuch).
regards
05-09-2017 11:14 AM
@jwscs wrote:
@Ben .. i suppose you mean explicit (yamaeda's code)
but why would mine need to be a subvi?
regarding speed/memory i read some post from altenbach, where the implicit coercion was faster, bc it didn't need to create a new buffer (or somesuch).
regards
That is correct. Yours would have to be made into a sub-VI because the only numeric wire on your diagram was still a float. It was only when it was put in the indicators did it become a I32.
Ben
05-09-2017 11:27 AM
that is totally right, i didn't look at it that way 😉