bits to word Conversion
please suggest in creating a Function Block for 16 bits to word conversion.
i searched in some previous Blogs i didnt understand that can any one please Suggest
Build the function block using the below equation.
Using Structure Text to implement this equation takes the least amount of time to build the user defined function block.
Word_Value= (Bit_15_Value*32768) + (Bit_14_Value*16384) + (Bit_13_Value*8192) + (Bit_12_Value*4096) + (Bit_11_Value*2048) + (Bit_10_Value*1024) + (Bit_9_Value*512) + (Bit_8_Value*256) + (Bit_7_Value*128) + (Bit_6_Value*64) + (Bit_5_Value*32) + (Bit_4_Value*16) + (Bit_3_Value*8) + (Bit_2_Value*4) + (Bit_1_Value*2) + (Bit_0_Value*1)