04-28-2011 01:16 PM
Hi,
I am trying to get a signal from digital input and have a graphical indicator with time as x-axis and the DI signal as the y-axis. It would be great if I can have another (analog) signal in the same graph, since I want to compare them and see the phase shift between the two.
I tried to use the xy graph and use tick count as the x axis, but it looks like it doesn't give me the time of the test.
I was also wondering if I should use line-input or port-input? I see in the tutorials they use line input but don't know the differences between them.
Is there any difference between having 1-sample on demand and put it in the while loop and continuous sampling?
Thanks.
04-28-2011 03:24 PM
First check out the Mixed Signal Graph. the A and D signals will share a common time axis although, they are in different plot areas.
Line input vs port input: Line input generates a boolean for each line in the task (and for each sample) so you get a 1 or 2D array of booleans depending on nSamples and nChannels. You can put the lines in any order in the array i.e Port0.0, Port1.7, Port1.6... Port input generates a integer for each port in the task where the LSB of the integer is bit0 of the port and eact bit of the integer represents the next bit of the port. ports are usually 8 bits but many devices can support ports that are wider in multiples of 8 (8, 16, 24 and 32 bits wide)
And yes- with 1sample on demand in the while loop the sample rate is set by the loop speed. with continious sampling the task controls the sample rate
04-28-2011 04:14 PM
Thanks. That was pretty useful information.
Now I tried to check the mixed signal graph, but I cannot connect them together to the graph. I am trying to have N-sample with the same sampling rate. But I cannot connect the digital line. Please see the attached file.
Also when I am using both Digital and analog DAQ with different graphs, it gives me an error which I attached.
Thanks.