02-12-2013 03:18 PM
Hi,
I know there are already a lot of posts about pretrigger samples but I couldn't figure out this problem.
I have this attached vi that is measuring across 3 analog input channels of a PXI-6133 cards in a PXI-1042Q.
I want to acquire the pretrigger and posttrigger signals when I see a rise on the channel labeled current. The VI runs without error but I don't see any pretrigger signals on the waveform graphs. There seems to be no change when I change the pretrigger sample input into the reference trigger DAQmx VI.
Thank you!
Solved! Go to Solution.
02-13-2013 02:15 PM
Hi pulsed_power,
I have attached a VI that you should attempt to use as a standalone VI while you send an analog signal to the card. There is also a screenshot of what you should be seeing with pretriggered samples. Let me know if this works for you.
Best,
02-13-2013 03:28 PM
Thanks Jason.
Your Vi works for one channel. I can see the pretrigger samples as shown in your diagram.docx.
But when I modify your vi slightly to sample 2 channels the pretrigger samples are not there.
Is it possible to sample 2 or more channels with a trigger on one of them and collect some pretrigger samples?
I attached my modification.
02-14-2013 11:07 AM
Hi pulsed_power,
In the initial question, you mentioned that you were attempting to read multiple channels from the same device. In the supplied code, there are two devices present. The protocol for analog triggering on multiple cards is different than that for multiple channels. I have attached a VI that will look at the first channel of your device and show you the pretriggered samples. Let me know if this is what you are looking for and if this works for you.
Best,
02-14-2013 02:18 PM - edited 02-14-2013 02:19 PM
Hi Jason,
Yes I wasn’t clear in my first post. I would like to be able to get pretrigger samples from analog Input channels on 2 NI-6133 cards in a PXI-1042Q.
From your attached example I learned that it is easy to do it for channels in the same device.
I searched a bit in the Labview examples and I found this vi I could try to adapt to my situation.
The vi is in Examples->Daqmx->Multi-Device.llb->Multi-Device Synch-Analog Input-Ref Trig-Multi Rate-Trig Skew Correction.vi
Do you think it is a good starting point? Why is a sequence structure needed to have one "startdaqmx.vi" start after the other?
I don't really understand the sync tasks-Trig Skew Correction.vi block diagram. What is done there? Is it necessary?
I also searched for references and I found this http://www.ni.com/white-paper/11549/en. Do you know of any other references for multi device pretrigger sampling or synchronization?
Thanks!
02-15-2013 08:55 AM
Hi pulsed_power,
While those are definitely good starting points, and understanding synchronization will ultimately make you a much better LabVIEW programmer, our DAQmx driver makes it easy to synch multiple devices, and in some cases, channel expansion is the better way to go. The reason you may be running into trouble with the example is the "Multi Rate-Trig Skew Correction" aspect of the example. If you try the code that I supplied a screenshot of in the below diagram, are you able to get the results you would like to see?
Best,
02-15-2013 12:11 PM - edited 02-15-2013 12:12 PM
Hi Jason,
I attached this 2 page document that shows my problem. When the AI channels are on the same device I get the pretrigger samples. When I select two AI channels on two different cards I don't get the pretrigger samples.
02-15-2013 01:00 PM
Hi pulsed_power,
It turns out that this is a known bug that was solved in the newest few versions of DAQmx (must be later than DAQmx 9.5). If you do not have the newest version of DAQmx, please upgrade to the newest version compatible with your system. If you are still seeing this issue, please let me know, as we will have to update R&D. The Corrective Action Report Number is 332364, for your reference.
Best,
02-18-2013 09:43 PM
Thanks Jason.
Over the weekend I updated DAQmx and all other Labview packages to the newest version. Now the pretrigger samples are correctly displayed and saved.
Thank you very much for your time!