LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help Synchronizing Analog Outputs

I am trying to simulate signals using PXI-6733 cards and reading them using PXI-4462 cards to see the signal. The issue is I need all of my signals despite possibly coming from different cards to be perfectly syncronized with oneanother. I found some code online which I have modified to fit my neeeds which gets me most of the way there. If you look at the attached photos, I created a simple scope of sorts by using the Labview provided Daq Assist looking at channels 0 and 1 on my 4462 card. Then I used the attached program to generate a signal that had a 10000hz sample rate and a sine wave that was 20V peak to peak at a frequency of 1000hz. As can be seen in the images the overlay is pretty good on the start times but for some reason the scaling on the start between the master and the slave isn't quite right until about .25 seconds in where it than starts to overlay perfectly.

 

Anyone have any idea what is causing this phenomenon?

 

I am surprised when searching for topics on this issue that there don't appear to be far more discussions on syncing up a bunch of analog outputs for dynamic signal simulation of multiple card/channel counts. Can anyone point me in a direction to read more on doing this too?

0 Kudos
Message 1 of 5
(2,632 Views)

Just a few more photos to show the improvement in the overlay of the two signals with time;

 

Chart 3 appears to have almost perfect overlay a little more than 1second into the simulation, while chart #4 shows it holds till I stop the signal.

 

Any idea why this is occuring?

Download All
0 Kudos
Message 2 of 5
(2,629 Views)

Just was wondering if anyone had any ideas here or am I pretty much doing as best as the cards can do?

0 Kudos
Message 3 of 5
(2,602 Views)

HI adamsdaq,

 

It looks like your synchronization is working well, the 2nd channel (red) just appears has a negative offset once the start trigger is received.  I'd recommend trying a couple of things:

 

1)  Test the 2nd channel by itself.  Verify that the offset only occurs when trying to use both channels.

2)  Measure using a non-DSA device.  Do you have a multi-function DAQ card?

3)  Try outputting a sinusoidal waveform instead of a custom waveform.  Does it still have the offset error?

 

Best of luck,

 

David B

National Instruments

Applications Engineer

0 Kudos
Message 4 of 5
(2,582 Views)

Hi David,

 

Thanks for the reply, as far as your suggestions, see my responses in red below;

 

1)  Test the 2nd channel by itself.  Verify that the offset only occurs when trying to use both channels.

I will have to try this on Monday as I am no longer in the lab, but I do believe it is only when trying to use both channels. I am basically using 2 out of 5 PXI-6733 cards to try this out.

2)  Measure using a non-DSA device.  Do you have a multi-function DAQ card?

I have to apologize here for my lack of knowledge I am primarily a mechanical engineer who is picking this up as a side project, but what would a non-DSA card do for me here? I am currently reading with a PXI-4461 card. On this system I have PXI-6733's 4461, 4462, and 6704, other than the 2 on the 4461, and the 4 on the 4462's I don't have any other AI to measure with. I could call in a 4496 card, but I believe that that would be a DSA also, what would a multi-function DAQ bring to the table?

 

3)  Try outputting a sinusoidal waveform instead of a custom waveform.  Does it still have the offset error?

 I believe that it was a Sine wave I was using but my sampling rate was rather low relative to the frequency hence the steps in it. I have found that the issue is worse and worse the higher the frequency.

 

All and all I guess at this point the key goal is how good can I actually get the playback synchronization between the 2 signals. This is actually just the start of the challenge for me, as eventually I want the system to accept multiple waveforms 30-40seconds long, on mutiple cards, and play them all out at the same synch time. Other wish list items for me would be to programmatically scale the system. So that I could start with a config file that has a array of waves coming in, then have another array giving card/channel of each wave. Then the system automatically should route them out and if it needs 2 cards, than it need 2 cards, if 4 than it needs 4 cards. I have some ideas on how to set this up but it is certainly rather advanced. Any ideas if there is literature out there to give me a little more basis on how to do what is described above? I am actually rather surpised there aren't many posted cases like this as I would think that playing back data on multiple channels is rather common when using 6733 cards.

 

Thanks for the help.

 

Adam

0 Kudos
Message 5 of 5
(2,567 Views)