06-18-2007 07:22 AM
Hi Paul,
I am looking to simultaneously collect three analog input channels while changing the voltage to my analog output channel when the program is running. This voltage controls a MOSFET which itself controls a motor. This program will help me discover where the optimal voltage occurs in a cycle. Therefore, it is important for me to have a spreadsheet that is updated at the same rate across all channels.
After my data is collected, I can see that my three analog input channels update every 0.01 s, but that when 1 s passes, the x axis values return to 0 s. This is fairly insignificant as it would be simple to change the axis in the spreadsheet. However, I need the analog output channel to update every 0.01 s as well. Right now it only updates every second, regardless of whether I choose 1 or 100 samples in the properties section of the simulate signals express VI.
I am thinking about looking into using a buffer for my data to output the results to the spreadsheet after they are collected but I'm not familiar with exactly how this works.
Jenna
06-18-2007 07:44 AM
06-18-2007 08:17 AM
Hi Paul,
With 100 samples in the simulate signal VI I get 100 samples out... but they are the same value even if I have been changing it throughout that second. I only see changes in the voltage offset value at every second... almost as if the program is writing updates only once every second. For example if I changed the voltage from 2.2 V to 3.0 V at 1.85 seconds, I would only see that change in the spreadsheet at 2 s.
When I try a program with only my analog output set up, I see the changing voltages in the spreadsheet as they changed while I was performing my experiment. This problem might have more to do with conserving CPU since it seems as though the analog output channel can update in the absence of the analog input channels.
Thanks,
Jenna
06-18-2007 08:35 AM
06-18-2007 09:18 AM
06-18-2007 09:28 AM
06-18-2007 09:43 AM
Ideally I would like to change my AO between 1.75 and 2.2V with 0.01 seconds of measure at each point. I'm not sure if there is a settling time involved... but if there is, it is most definitely less than 1 second (because I can hear the changes in the motor almost instantly). Is there any way to separate what the AI and AO channels are doing so that I am not waiting on the values from my AI channels?
I think you understand what's going on correctly. I will be changing the voltages from between 1.75 and 2.2V randomly while the program is running.
06-18-2007 10:10 AM
06-18-2007 10:20 AM
06-18-2007 10:49 AM
Ok so I've tried it. The good news is that it appears to be updating every 0.01 seconds... the bad news is that my change in voltage only takes effect every 1 s. Maybe the settling time is longer than I thought.
You said something about my AOut waiting for the AIn channel values? I think I'm still running into that problem because my newest analog input channel is reading from the AOut channel on my circuit board. So the analog in is waiting for the analog out which is also waiting for the 3 other analog inputs (if this makes any sense!).
Jenna