Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Pre-triggering multiple PXI-6133 cards using a PXI-6651

Hi,

 

I would like to trigger 41 channels (over 6 PXI-6133 cards) using 2 triggers.

 

One trigger is like a pre trigger, and the second a start trigger. So I would like to acquire data starting from the start trigger only if the pre-trigger was present.

 

Would a reference trigger produce the required outcome? So I use the pre-trigger as a start trigger then the second trigger as a reference with the 'pre trigger samples per channel' set to 0? (As in attached vis).

 

Also, I would like to use the PXI_Star lines. I have found examples about how to route the PXI_Star trigger lines to PFI0 or PFI1 on my PXI-6651, but I'm not sure what to put as the 'Source' of the DAQmx Start Trigger.vi. PXI_Star doesn't seem to be an option, only \PXI1Slotx\PXI_Star, and presumably i don't want all the cards triggering off the same Star line?

 

Any suggestions welcome!

 

Many thanks,

 

Sarah

Download All
0 Kudos
Message 1 of 9
(4,480 Views)

You are on the right track with the start and reference trigger, but I think you need to use the ni-sync driver to route the signals from the 6651 to the right pfi lines on your backplane.  The ni-sync configuration can happen in parallel with your DAQmx configuration, but the routing has to be done before the DAQmx Start Task vi.  The following example should show what I mean.  The example is more complicated than what you are trying to do, assuming all your PXI-6133 cards are in the same chassis.

 

You need to open an ni-sync session and route your trigger lines before the DAQmx start, and close the ni-sync session at the same place you close your DAQmx task.

 

Multi-chassis Synchronization of High-Speed Digitizers:

http://zone.ni.com/devzone/cda/epd/p/id/4556

 

What you are describing you want only triggers all of the 6133 boards together, it does not sync their clocks.  If you want to sync clocks you can do that with ni-sync too, just FYI.

 

 

Message 2 of 9
(4,471 Views)

Thanks for the response.

 

I do route the trigger earlier on.

 

The attached VI is my route trigger, setup read and read VIs merged into one.

 

I get:

Error -89129 occurred at DAQmx Start Task.vi:1

Possible reason(s):

Terminal for the device is invalid.

Terminal: PXI_Star

Task Name: _unnamedTask<5753>

 

I guess I'm doing something wrong with the star trigger?

 

and I'm still not 100% sure this will give my required behaviour once I get it working?

 

Many thanks,

 

Sarah

0 Kudos
Message 3 of 9
(4,464 Views)

Your trigger routing looks logically correct to me.  The PXI-6133 accepts PXI_Star and PXI_Trig0 as a directly routed start or reference trigger.

You want to create seperate parallel DAQmx tasks for each PXI-6133 (only need one ni-sync setup though).  Did you try the same code with only one PXI-6133 referenced in the task (see attached image)?  By the way, you don't need to explicitly create a task like that, you can just reference the channels in the DAQmx Create Channel vi.

I found another example you can reference that uses a software trigger (front panel button) to trigger multiple M-series boards with a Star Trigger.

Synchronizing Multiple M-Series Devices With PXI Star Trigger:
http://zone.ni.com/devzone/cda/epd/p/id/3609#0requirements

What chassis are you using?  If it is larger than 8-slot, have look at this:
http://digital.ni.com/public.nsf/websearch/CA9A49FA50393C4186256DC200774E2B?OpenDocument

Message 4 of 9
(4,454 Views)

Thanks!

 

I think it works now (attached). I am using a PXI-1045 chassis so did also need to share Trig0 across buses.

 

Just one question, in the attached VI can you assume that all the DAQmx Read tasks start at the same time, and therefore trigger off the same pulse (my trigger is 50Hz in normal operation)? I didn't think you could make that kind of assumption??

 

Thanks again,

 

Sarah

0 Kudos
Message 5 of 9
(4,434 Views)

Looks good as far as the triggering goes, but I did notice that you are stopping the DAQmx task inside a loop and have a loop for a finite acquisition.  You have space on each 6133's onboard buffer for 4,194,302 U32 samples, which is plenty for your 500 samples x 8 channels.  You can find out the onboard input buffer size by using the buffer property node: http://digital.ni.com/public.nsf/allkb/0C639C970487D4D2862572F200043B97 

 

So you don't need a loop to get all 500 samples for each channel for each board.  You can set it up like what I have shown (see attached).  Then use the Clear Task VI at the end, so the task is not still in memory after the task is complete.  It also releases the resources so other programs can use the 6133's if necessary (just good practice).

 

Assuming all the Trigger VIs and Start VIs are called before the trigger comes (a few ms after pushing the run button depending on PC speed), the boards will all start acquiring at the same time.  The trigger arming happens on the boards, and the data starts being collected on the boards at the instant the triggers are received.  The reference trigger is the PXI star trigger, correct?  This is ideal because the star triggers are all trace length matched, so there is virtually no propogation delay between boards. There is very little delay for the PXI Trig lines, but if we are splitting hairs, the PXI star is designed to be more precise, "specifically a propagation delay of no more than 5 ns and skew of no more than 1 ns." ( http://zone.ni.com/reference/en-XX/help/371025M-01/rfsg/integration_pxi_star_trigger/ )

 

 

 

0 Kudos
Message 6 of 9
(4,425 Views)

It's in a loop because I'm going to want to average the data, and eventually may want to read 500 samples on every 50Hz trigger pulse, so I obviously don't want to do the setup every time.

 

I've put some test signals into my parallel tasks, it's a sine wave which changes amplitude. All 41 channels are connected to the same signal, so if the cards are triggering together they should all see the same sine wave, but you can see from the attached pictures that sometimes they do and sometimes they don't?

 

I tried taking the stop task out, but that gives you an error.

 

Thanks,

 

Sarah

Download All
0 Kudos
Message 7 of 9
(4,397 Views)

I somehow missed that you had responded.  What error are you getting?  A timeout error?  This could be because you are set up to only receive the triggering once, then the system would no longer look for a trigger.  One thing you could try is setting up the acquisition as "retriggerable". See attached. 

0 Kudos
Message 8 of 9
(4,230 Views)

Many thanks for your reply, this is now with an applications engineer at NI so hopefully I will have it resolved soon!

 

Thanks,

 

Sarah

0 Kudos
Message 9 of 9
(4,159 Views)