LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulated Device Signal

Hi,
 
I'm trying to build a VI that would read the pressuers from 8 different microphones. I haven't connected the microphone to my PCI 6229 device. But I wanted to know how my VI works with a simulated device. I thought that the simulated device will just output 8 sine waves (corresponding to each input channel I selected). However, the waveform I obtain looks nothing like a sine wave.
 
I'm wondering whether this is a characteristic of this particular device (PCI 6229) or whether there's something wrong with my block diagram. Any help on how the simulated device generates these simulated signals would be greatly appreciated.
 
Ruf.
0 Kudos
Message 1 of 4
(3,167 Views)
imperial-aero,

I was a bit unclear about what signal you were looking at, do you a different simulated device or are you taking reading from your physical PCI-6229 without anything connected? To simulate the device you have to make a simulated device separate from your physical card, I tired simulating the device on my system and it generated a sine wave, albeit rather slow. If you are using the physical card, your signal will likely be drifting all over the place, this is expected since the card is not characterized to behave in a certain way with nothing connected.

If you are getting an odd signal when you run your VI on the simulated device, I would go into Measurement and Automation Explorer and look at the test panel to see what kind of signal you should expect from your simulated device. Please post back if you continue to have problems.
-Marshall R
0 Kudos
Message 2 of 4
(3,151 Views)

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.

Download All
0 Kudos
Message 3 of 4
(3,137 Views)
The problem is the indexing in the arrays is incorrect, so instead of getting 5000 elements, you get 8.  Once you build the array back up you now have an 8x8.

The array handling is not necessary.  Use the attached code and you will see the slow sine wave.
0 Kudos
Message 4 of 4
(3,114 Views)