High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get my 6224 and 5122 to sync up?

I am currently running a PCI-5122 high speed digitizer and a PCI-6224 data acquisition card with the PCI-6224  connected to a BNC-2090 BNC block. On channels 2, 3, and 4 on the BNC block I am mesuring voltage (channels 2 and 3 are basically measuring pressure) using NI-DAQmx Assistant (This is probably not the most efficient way). I am capturing 10,000 waveforms at 100 MS/s and a record length of 5,000. My 5122 cannot handle this amount of data on its own so I used some NI Scope example code (the example code had something to do with capturing more than available memory) to build upon. What I want to do is setup each card so that both of them wait for a trigger that comes in on PFI 0 (rising edge). When these cards are triggered, they start taking data at the same time. In other words, when channels 2 and 3 measure pressure the corresponding waveform is taken. With my current setup, the cards take different times to setup. This causes the first waveform to be taken when the (let's say) 5th pressure measurement is taken making the two measurements out of phase by five units. I need some guidance on how to accomplish this. If more explanation is needed, please let me know what is unclear. I imagine that this explination might not conviegh exactly what I am talking about. Also, I am writing this post from my home computer and cannot remote into my work computer so I cannot attach my code. If need be, I will post it as soon as possible.
0 Kudos
Message 1 of 8
(7,685 Views)
There are a couple of things that may be happening.
  1. Scope cards, such as the 5122, start taking data as soon as you initialize them and keep taking data until their trigger conditions and acquisition length are satisfied.  DAQ cards, such as the 6224, have two triggers - a start and a reference.  The start trigger starts the acquisition engine.  The reference trigger determines when to start acquiring to satisfy the acquisition length.  Both devices need enough time after initialization or start trigger to acquire any pretrigger points that may have been configured.  Set your DAQ card start trigger to None and the reference trigger to PFI 0 and it may help.  You will probably still get some skew, since the cards are different.  You can eliminate this by using pretrigger points on one or the other of the devices.
  2. At 100MS/s, cable length is important.  Make sure your cables are all the same length, or as close to it as possible.  This should be a constant, so you can compensate with pretrigger points and some calibration with known signals.
  3. Don't believe the absolute timestamps.  If you take the same signal on both cards and use relative timestamps, they will line up perfectly, once you calibrate the delays due to setup and line length.  If you are using a Windows variant to run your system, the absolute timestamps will have a 100ms to 200ms random walk around reality.
Let us know if you need more help.
0 Kudos
Message 2 of 8
(7,681 Views)
In number one, for my application, it shouldn't matter if I use reference or start trigger. The DAQ Assistant does what it is supposed to. It waits for the event coming off PFI 0. My problem is that I can't get the 5122 to wait for the start trigger on PFI 0 and then use the trigger on External Trig on the 5122. I don't know if it is even possible because PFI 0 is on the 6224 card. I have been playing around with the property node after niScope Initialization to try and make it do what I want, but with no good results. I have tired Start Trigger (Acq. Arm) Source by itself and with Advance Trigger. I have also tried Arm Reference Trigger Source by itself and with Advance Trigger, but also nothing good came out of it. The front panel told me that it had not acquired any data but was slowly incrementing how many it had fetched. I have attached my code (Example Code for NI) so you can see what my code actually looks like. And thank you for your last post.
0 Kudos
Message 3 of 8
(7,672 Views)
To synchronize two boards tightly, some sort of synchronization wiring is needed between them.  Options:
  1. EASY: Wire the PFI0 or PFI1 input on the scope card to the same signal you wired the PFI input on the DAQ card to.  Change the trigger type of the scope from analog to digital and set the source to the appropriate input.  Both boards will now trigger at the same time (plus/minus any differences due to cable length and setup time)
  2. HARDER: Use one of the PFI outputs on one of the boards as a trigger out.  Use this trigger out as a digital trigger in for the other board.  I believe this will work either way.  In software, you will need to export the trigger from one device and import it on the other.  I have always done this SCOPE to DAQ.
  3. HARDER: Connect the RTSI connectors between the two boards and use these lines for synchronization.  It is essentially the same as option 2, but also gives you the option to synchronize their onboard clock frequencies.  You will need a RTSI cable for this.
You can find examples of how to program the second two in the NI Example Finder (in LabVIEW 8, click Help->Find Examples... wait for it to load).  Let us know if you need more help.
0 Kudos
Message 4 of 8
(7,664 Views)
Okay I left out a major part of my setup. I'm about that. Let me maybe clear something up that I didn't specify. What I need to do is set up the 6224 DAQ card and the 5122 high speed digitizer to both wait for the same start trigger on PFI 0. Once they see this trigger, the 6224 then starts clocking off of an external clock that comes from PFI 4 and the 5122 starts to "clock" (I think it actually is triggering) off of External TRIG on the back of the Card. Once again, I don't know if this is even possible, but it would be great if it could.
0 Kudos
Message 5 of 8
(7,658 Views)
I mean I'm sorry about that.
0 Kudos
Message 6 of 8
(7,655 Views)
Easy enough.  Wire the same trigger you wired to PFI0 on the DAQ card to PFI0 or PFI1 on the scope card.  Set this input up as the start trigger for the scope (Start Trigger (Acq. Arm)->Source property), and use the analog trigger normally.

There are also ways you can do this connecting wires from the DAQ card to the scope.  See previous post and substitute start trigger for reference trigger.

So far as I know, there is no way to route the PFI0 from a PCI DAQ card to a PCI NI-SCOPE card without a physical wire, be it PFI to PFI or a RTSI cable.  PXI makes this easy, since the RTSI lines are built into the backplane.

Good luck.
0 Kudos
Message 7 of 8
(7,645 Views)
I had been trying that with no success. What I had to do was convert my NI-DAQmx Assistant to NI code. Then, after it was converted, after the task.vi I inserted a triggering property node. I made one property a Start.DigEdge.Src and outputted (I think that's a word) or wired that to the niScope property node property called Start Trigger (Arm Acq.)  Source. This has made them sync up. Thank you for all your help and patience. If a copy of this code is needed by you or anyone else, just post a reply and it will notify me.
0 Kudos
Message 8 of 8
(7,627 Views)