LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiplexing

Hi all.

 

I am attempting to multiplex 3 different Analogue inputs into a MyDaq board via Labview. I am using the following MUX board;

 

https://www.sparkfun.com/products/9056

 

I have a VI I am happy counts a 2bit counter to create the correct sequence firing the first 4 levels of the truth table using s0 and s1 selectors. However, the 4 readings I get back are confused and inconsistent. One channel will read a value meant for the others occasionally. I have tried several different variations and have now run out of ideas. There is no observable pattern in when the errors occur. Also, on this variation of the VI, the channel 0 seems to read wildly, whereas in different variations it brings much more sensible readings. 

 

My original thoughts were that this was a timing issue, with the DOs being sent at a slightly out of sync time with when the Ains are being read back.

 

Can anyone have a look over my VI and see if there is a blatant problem. I am aware without the hardware it will be difficult to troubleshoot properly. 


Please note I have attached 2 different methods - "different loops" channel 0 tends to vary wildly, "while3" has more sensible channel 0 readings but more random misreadings. I'm not sure which I prefer.

 

TIA

Download All
0 Kudos
Message 1 of 2
(985 Views)

That code makes my eyes bleed there are enough think wrong that I'll surely miss something

  • DO NOT use the abort button to stop your vi create a control
  • the for loop is not needed
  • the math is very obfuscated
  • the case structures should be combined into one
  • exactly 0 local variables are needed just write to the terminals

See if this helps spark some rethinking

jjb.png

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 2
(955 Views)