05-02-2006 02:54 PM
05-03-2006 06:36 PM
Hi Frenk,
It sounds like you are using the Traditional NI-DAQ (Legacy) driver. However, you have all of the necessary hardware to use the DAQmx driver. This driver is newer, more powerful, and easier to use than Traditional NI-DAQ (Legacy). Here are some links with more information about DAQmx:
Learn 10 Functions in NI-DAQmx and Solve 80% of Data Acquisition Applications
As for your triggering question: I recommend that you use a reference trigger. You must acquire at least 2 pre-trigger samples with a reference trigger. I understand that you only want one pretrigger sample and you can get rid of the unwanted data in post processing. There is a great example for using a reference trigger in DAQmx in the LabVIEW Example Finder. Go to Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Analog Measurements >> Voltage >> Acquire & Graph Voltage - Internal Clock - Digital Reference. I hope that you find this information helpful.
Regards,
Hal L.
05-04-2006 07:55 PM
Hello,
Thank you for the suggestions.
I wrote this program 2.5 years ago when DAQmx wasn't available for real-time. I'd prefer to not rewrite it with DAQmx at this time, because I suspect a minor tweak to the traditional DAQ functions would do what I need.
Can anyone suggest how to approach it with traditional DAQ?
Thank you again,
Frenk
05-05-2006 03:39 PM
Hi Frenk,
I'm not 100% clear on what you mean when you want to wait once before starting the application. Do you want to ignore a trigger pulse once before accepting it or do you want to ignore the immediate data before acquiring your signal? With your hardware, you are not going to be able to ignore the trigger signal, but you can acquire pre and post trigger data for an analog input application. There is an example in the LabVIEW Example Finder that demonstrates this. Go to Help >> Find Examples >> Hardware Input and Output >> Traditional DAQ >> Analog Input >> General >> Acquire and Process N Scans - Trig.VI.
Also, if you want more information about triggering in Traditional NI-DAQ (Legacy), I recommend looking at the Traditional NI-DAQ Reference Help. This is located in Start >> All Programs >> National Instruments >> NI-DAQ. If you go to the search tab and enter "trigger," the first few options will have more information for you.
Regards,
Hal L.
05-08-2006 03:41 PM
Hello,
(Aside: thanks for the links to the examples).
To clarify, I don't want to ignore any digital triggers. I would like to set up the real-time analogue data aquisition, but then have it wait until the digital trigger before the first analogue points are input/output. Thereafter, the analogue I/O continues for N points in a FOR loop. I would like minimum time between getting the digital trigger and the first analogue input/output operations.
Thanks for your help,
Frenk
05-09-2006 05:46 PM
Hi Frenk,
I'm glad that you liked the examples. So if you just want to acquire data after the trigger, then all you need is a start trigger. Once the trigger is received, the driver immediately sends the signal to start acquiring data. The driver optimizes the timing for you.
One thing that I noticed is that you mentioned using a for loop. I recommend using a while loop for your program. Since you are performing a finite acquisition, the while loop will stop executing once the samples have been acquired. The example that I mentioned in my previous post will work for your application. You can also take a look at the Acquire N Scans Dig Trigger example which is in the same location.
Finally, since your acquisition is finite, the data will be acquired and then sent to LabVIEW once the acquisition is complete. If you want to display parts of the acquisition as the data is acquired, then you can set the number of scans to read at a time to be lower than the total number of scans to acquire. This way, the scans read at a time will be displayed as they are acquired. The Acquire and Process N Scans - Trig example is a good example to see this feature.
Regards,
Hal L.
10-19-2011 10:32 AM
Hi Hal L,
Sorry to bother you. Now I have 2 trigger sources and I want to use BNC-2110 to convert them to digital signal before they are inputed to the LabVIEW. The thing is now I can't use 2 analogue in channels to sample them by using DAQ assistant since when I did this, LabVIEW just told me some resources are reserved. Do you know how can I do this?
Thanks very much!
Regards,
Henry