02-18-2008 10:45 AM
02-18-2008 02:29 PM
02-18-2008 04:01 PM
Hi Marshall R,
Thank you for the quick reply. Sorry for not being clear in my previous post. I actually created a simulated device and used the simulated device to obtain the signals. I checked the signal from MAX and it did form a sine wave (took a while like you said). So, I believe the simulated signal is correct, but something is going wrong within the VI.
I was wondering whether you could have a look at the data acquisition part of the VI (attached). I'm really sorry for the bad VI design (got told to change the whole thing the last time I posted it on here, so I've tried to clean it up now) unfortunately it was written by a PhD student at Cambridge and I have to use it for my project. Here I am just attaching the data acquisition bit of his VI.
I think there's an error in the manipulation of the arrays within the While Loop but I can't quite figure out how to solve it. Basically when I input 5000 as the number of samples per channel I expect to get 5000 samples for each of the 8 input channels, i.e. a 8x5000 array for each sampling time. The While Loop does give me a 8x5000 array in the first iteration. However, in the second iteration and onwards it only gives me an 8x8 array. And I think that's where the problem lies, because such a small number of samples results in a wierd looking waveform, possibly due to the noise in the simulated waveform. But I can't quite figure out how to obtain an 8x5000 array in subsequent iterations, which would hopefully give me the sine wave I require.
Also, I've printed out a screenshot of the front panel that shows the sample input data I used.
02-18-2008 04:54 PM