11-13-2009 12:35 PM
Hi,
In one of my classes, i need to compare two different data acquisitions card. In order to compare two differents cards ( USB-6008 & PCI-6221 ), I need to do the following : First of all, i generate a constant signal on the PCI-6221 (for example, 0 volts for 1 second, 1 volt for the following second, 2 volts , etc..) and then, read the signal that was sent to the USB-6008.
I have put both DAQ's in the same loop, and i have set the sample size in order to generate/read the signal for exactly one second (so far, that seems to be working). I am then using indexing in order to plot my graph at the end of the loop. But, i cannot put the two signals on the same graph.
Can anyone help me ?
Thank you!
First image : This is the block diagram.
Second image : This is the signal that is being generated from the PCI-6221. Now -- I just need to plot the signal of the USB-6008 on top of that.
11-13-2009 01:26 PM
Too much express vi for me... but you already have the Merge Signal placed. this can be resized (Pull the lower edge down), the simply wire the signal of the USB card there.
I don't know if it works when you aquire multiple samples via the USB device per call.
Felix
11-13-2009 01:58 PM
Thanks for the help, I've already tried that but it doesn't work. When i try merging the signal together, i get an error saying the two types are incoherent/invalid.
Basically what happens is :
For the PCI-6221, a constant value is being pushed out of the loop to the graph. But for the USB-6008, it comes out as an array of size [x,y], where x would be the number of iterations and y would be the number of data collected during that iteration.
What i'm trying to do, is be able to graph these two signals together, but i don't know how because of the output format of the USB-6008.
11-13-2009 02:08 PM
Try to use the normal data types (not dynamic data). That makes it more easy to read and you get some more control with everything. Most of the power users never use dynamic data and express vi's.
You can use waveform data type instead of the 1D array. The dt will differ in both. Use the append array function and feed the waveform array to a waveform graph.
Post back when you are stuck.
Felix
11-13-2009 02:24 PM
Something is wrong with the image of your code in the lower portion. You have a dynamic data type, you have a DDT to array Express VI. But the wire coming out of the other side is still the blue dynamic data. Where is the array? It seems like you don't have that side connected but have the Express VI just overlaying the wire. Try a block diagram cleanup. What happens then is that you autoindex that into a 1-D array of dynamic data and try to merge with a dynamic data, thus incompatible data types.
As was suggested, don't use Express VI's. Or at least convert all to simpler datatypes like waveforms or real arrays.