07-14-2007 12:49 AM
07-14-2007 12:59 AM
07-19-2007 09:18 AM
07-23-2007 11:51 PM
Thanks for the reply Mickey - I have updated the code to reflect your suggested changes (de-queueing the elements instead of just reading them). I've also included an additional loop that ensures all elements are de-queued before moving on. However, I'm still having the same problem - see attached for a picture of the updated code. This version of the code is behaving exactly like the last version - the chart is displaying approximately 1.4-1.5VDC where the multimeter and MAX are displaying 0.8VDC. The correct reading should be 0.8VDC...
Something interesting to note - when I configure the card for a single channel (using DAQmx Create Channel - just channel 2 in this case) and change the DAQmx Read to single channel, single sample, double it appears to work. It still gives me a strange spike to 1.4 volts when I first turn the relay on (actuating a valve) but promptly smoothes out to a steady state value of 0.8VDC. When I change it back to multiple channel, single sample, 1D double (like the picture I've attached) it again gives me the wrong voltage (1.4VDC).
I've played around with the sample rate changing it from 100Hz to 10,000Hz and that doesn't appear to have any affect.
Any other suggestions on what might be going on here? I'm completely baffled. I would "cheat" and configure a single channel but the fact that it still spikes to 1.4V (which is oddly the same steady state voltage when multiple channels are configured) makes me suspicious that the data may still be skewed.
Thanks for all your help!
07-23-2007 11:53 PM - edited 07-23-2007 11:53 PM
Oh, I also wanted to note that a probe after the index array displays 1.4VDC as well when the code is running.
Message Edited by Erik_1 on 07-23-2007 09:53 PM