We have implemented the SN74LV4051 Mux for our data acquisition setup. During testing, it was observed that when the channel output configuration is changed, the mux gives an erroneous output and copies the data of channel 8 when channels 5,6, or 7 are required to be read. But, when the mux configuration is hard-coded for any channel, the mux output is correct. This error only occurs when the setup changes the mux output configuration while operation. Please help in understanding the issue, and provide some guidance on how to resolve it.