I am trying to convert an analog value to a digital value (8 bit A/D converter, input range 0-5V ).
I have used the formula (input*255/5) to convert to digital, then i have used digital to binary vi to convert this digital value to 8 bits.
The problem here is the data type mismatch between my output from the formula, which is a double data type and the input of the vi which is a digital data type, so how to solve this problem ? Thank you in advance
The digital data you mention is On/OFF. The example below illustrates the type of data that is entered and output from digital to binary.vi
On the left hand side is three samples of digital data in continuous signal format from three separate sources, (signal 0, signal 1, signal 2).
The first sample gives binary 2 (010). As you can see this would be not be of any use for a single signal.
If you still want to do the above, you could use DWDT Boolean Array to Digital as illustrated below: