Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

pretrigger, delay problems with AI using AO master

I have a PCI-6733 AO board and a PCI-16XE-50 AI board and I wand to trigger a set of scans on the AI board from the AO board, using a pretrigger and delay.

Attached is a VI that has the features I want but doesn't work. I made it starting from a 2 AI board pretrig example on the NI site.

1) with pretrig to 0, the VI won't take data unless I set "relative to trigger point" to "relative to start of buffer" in the block diagram.

2) when I try to set pretrig to something other than zero, I get a 10081 pretrigger sample count error.

3) trigger delay doesn't work. This must be related to #1 in this list.
0 Kudos
Message 1 of 5
(2,861 Views)
Hi Kevin,

I would start with something simpler and slowly build up to your application. The first thing I would do is perform AO on your 6733 board and connect the signal tothe E Series board. I would use all shipping examples initially. The two examples I would use first are Generate Continuous Sinewave.vi for output and then use Acquire N Scans Digital Trig.vi for your input. What I would do is start the output VI and then start the input VI. If you successfully acquire data with a pretrigger, you can slowly add customization.

What I would do next is add the trigger code to the analog output (or use a corresponding shipping example). When that works, I would route the AO trigger through the RTSI bus and configure your AI to start on that RTSI. Fin
ally, you can share the board clock of both boards using the same method.

By taking it one step at a time you will be able to see where it fails or no longer responds as expected. From looking at your code, I also believe that if you are getting pre-trigger scans (samples) based on the start of your analog output, you might not have values on your analog input (if you are connecting the two).

Anyway, hope that helps. Have a good day.

Ron
0 Kudos
Message 2 of 5
(2,861 Views)
Hi Ron,

Those VI's you've mentioned work. Now I've built up a VI that is triggering the AI from the AO board over the RTSI cable. It seems to work fine. When I try to add pretrigger scans or a delay, I have problems.

When I set pretrigger to 1 (from 0), I get a 10081 error: number of pretrigger scans invalid.

If I set the delay to e.g. 0.1 s (from 0), I see no change in the measured data, as if there is no delay.

I am using a PCI-6733 output board and a PCI-16XE-50 input board.
-Kevin
0 Kudos
Message 3 of 5
(2,861 Views)
Hi Kevin,

I found an example that might help you out. Here is the description it had...

"This virtual instrument (VI) performs a digitally triggered analog input (AI) acquisition and synchronizes the device clocks of two E Series or NI 61XX devices to simultaneously acquire data into separate single buffers. If no pretrigger scans are specified, the master device sends the AI start trigger signal to the slave over the Real-Time System Integration (RTSI) bus once the master receives the external digital trigger for which it is set. If pretrigger scans are specified, the master sends the AI stop trigger to the slave instead. To synchronize the devices, the RTSI clock routes the clock on the master device to the clock on the slave devi
ce. Each device uses a common scan rate to acquire data with its own clock, which is synchronized to the clock on the other device. Note that this method of synchronization must be used for the slave to be able to acquire pretrigger scans. The AI scan start signal reflects the actual start pulse that initiates a scan. If the AI scan start signal on the master is routed to the scan clock on the slave, the slave does not see a signal on its clock line until after the master device is triggered, and the slave has no clock with which to acquire pretrigger scans."

Hope it helps out. Have a good day.

Ron
0 Kudos
Message 4 of 5
(2,861 Views)
Do you get an example which performs pretriggering with your board to work?

Ron
0 Kudos
Message 5 of 5
(2,861 Views)