LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DBL to digital conversion

Solved!
Go to solution

Hii

I am trying to convert DBL(voltage) to Digital (16 Bit).

can someone please help me with that??

0 Kudos
Message 1 of 9
(3,638 Views)

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?

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 9
(3,626 Views)

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:

 

fun.png


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 3 of 9
(3,579 Views)
Solution
Accepted by topic author Chirag_Vekariya

DBL to digital.png/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 4 of 9
(3,571 Views)

@yamaeda reverse code golfing? ... i liked the red coercion point


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
Message 5 of 9
(3,556 Views)

@jwscs wrote:

@Yamaeda reverse code golfing? ... i liked the red coercion point


 

 

Reverse_Golf.png

 

Smiley Tongue

 

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 9
(3,548 Views)

@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

 


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 7 of 9
(3,540 Views)

@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 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 9
(3,537 Views)

that is totally right, i didn't look at it that way 😉


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 9 of 9
(3,533 Views)