06-01-2011 07:40 PM
Hi all ,
I'm trying to acquire finite amount of data which is triggered by a digital edge. I want this to be retriggerable. I tried modifying teh simple continuous acquisition using int clk VI from the examples. Im using a NI PCI-MIO-16XE-50 card. When I try acquiring data continuously , it works fine with the digital trigger. But When I try acquiring data in the retriggerable mode , the error tat pops up is :
Error -200452 occurred at Property Node DAQmx Trigger (arg 1) in MEMS ver1.1.vi
Possible reason(s):
Measurements: Specified property is not supported by the device or is not applicable to the task.
Property: Start.Retriggerable
Task Name: _unnamedTask<16>
I'm using the counter output to continuously generate a pulse and this goes to the trigger source which is my PFI0 line.
HELP!
06-02-2011 12:02 PM
LVGal,
You're card does not support retriggerable mode. It is only supported on some of our 63XX cards and above. This is why you are seeing error -200452. If you want a retriggerable application for you're card, you should take a look at this tutorial: How Can I Perform a Retriggerable Acquisition?. This article explains several options for triggering on devices that don't support the DAQmx Trigger - Start:Retriggerable property.
I would suggest that you follow the section that generates a digital pulse train with a counter and then trigger your analog acquisition off of that.
There is a NI-DAQmx Shipping Example for retriggerable analog input in LabVIEW called Multi-Function-Ctr Retrigg Pulse Train Generation for AI Sample Clock.vi. It is found in the NI Example Finder (Help»Find Examples) under Hardware Input and Output » DAQmx » Synchronization » Multi-function.
From this example, I was able to perform a "retriggerable" acquisition using a PCI-6251 M-series DAQ card (that does not support the Start:Retriggerable property).
Take a look at the attached screenshot of what terminals I used for this acquisition.
Physical Channel: The channel that you would like to acquire the analog data from.
Counter Channel: An unused counter on your card.
Clock Source: A pin that is connected to the counter out line on your card. You can determine this by going to Measurement & Automation Explorer » Devices and Interfaces » Right click your device (left side) » Device Pinouts. For your card, it looks like you will have to physically wire the counter output to a PFI line.
Trigger Source: The digital trigger that you would like to use.
I hope that helps!
Regards,
Aaron
06-02-2011 12:23 PM
Thank you. that explains it. Does NI-USB 6211 support retriggering? I'm just using this PCI card till I get the USB DAQ.
06-02-2011 12:33 PM
Also,
I just want to clarify : At the moment I have connected the counter output to PFI0 line and using that as the trigger source. so I am confused with the clock source and trigger source if I want the counter output to trigger my data acquisition.
If you could please explain.
Counter Channel: An unused counter on your card.
Clock Source: A pin that is connected to the counter out line on your card. You can determine this by going to Measurement & Automation Explorer » Devices and Interfaces » Right click your device (left side) » Device Pinouts. For your card, it looks like you will have to physically wire the counter output to a PFI line.
Trigger Source: The digital trigger that you would like to use.
06-02-2011 01:30 PM
LVgal,
On the previous example, the trigger source and the clock source will be different. The clock is source is the pulse train created by the counter and is used as the clock signal for the analog input task. The trigger source is a different digital source that is used to trigger the analog input. You would use something like an external digital trigger button or something similar.
If you don't need a user activatable trigger like that example that you can run the slightly less tricky example: Multi-Function-Ctr Pulse Train Generation for AI Sample Clock.vi. This only relies on the counter output and not a digital trigger.
To answer your question about the USB-6211: it doesn't support the retriggerable property either. You will have to do something similar to what I've explained previously. If you want to see what cards can use the retriggerable DAQmx trigger property, take a look at the Requirements box (lower right corner) in the NI Example Finder (Help»Find Examples) under Hardware Input and Output » DAQmx » Acq&Graph Voltage-Int Clk-Retriggerable example.
Regards,
Aaron
06-03-2011 12:56 PM
Aaron,
Thank you ! The second VI you suggested works fine. Was trying to modify it for using the counter with time pulses, but it seemed like there was some kind of timing issue. But working with frequency pulses sort of helps. How could I modify this VI so I can take 2 samples in the ON state and 2samples in the OFF state. Is it possible?
Thanks,
06-06-2011 12:07 PM
LVgal,
The example Multi-Function-Ctr Pulse Train Generation for AI Sample Clock.vi acquires a sample for every clock pulse of the counter. So if you would like to acquire a sample every 1ms, you would want to set the counter frequency to 1000Hz and record the samples as they come in. This example is limited to this functionality and can not do something exactly like what you describe in your question: How could I modify this VI so I can take 2 samples in the ON state and 2samples in the OFF state.
Something you can consider: If you would like to read 4 samples per clock cycle (which would be the closest you can get to a solution to your question), you could change the samples to read to 4. You can do this by changing the control Samples per Channel on the front panel of the above mentioned example.
Regards,
Aaron