LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

binary number with changing base

Hi all,
 
I am needing to work with communicating with an instrument through binary and I am having a bit of trouble.  I am working with a specific number of bits (bit 0 - bit 14) but I need to be able to change the step size.  For example say my step size is 0.05 my bits would be as follows:
bit 14 - 819.20
bit 13 - 409.60
bit 12 - 204.80
bit 11 - 102.40
bit 10 - 51.20
bit 9 - 25.60
bit 8 - 12.80
bit 7 - 6.40
bit 6 - 3.20
bit 5 - 1.60
bit 4 - 0.80
bit 3 - 0.40
bit 2 - 0.20
bit 1 - 0.10
bit 0 - 0.05
 
Using this I need to be able to convert a decimal number to binary, such that 486.6 would become 010011000000100 and then lastly I need to be able to invert the binary to 101100111111011
 
any help on this matter would be greatly appreciated.
0 Kudos
Message 1 of 3
(2,738 Views)
I made a LabVIEW vi to do what you want.  See what you think
0 Kudos
Message 2 of 3
(2,729 Views)
I'm a bit slow, but anyway, my solution looks like this...



Greets, dave

Message Edited by daveTW on 02-20-2007 06:49 PM

Greets, Dave
Download All
0 Kudos
Message 3 of 3
(2,726 Views)