01-09-2008 06:40 PM
01-10-2008 06:13 PM
Hi JPNaidu,
The DAQ Assistant is a great starting point for data acquisition/generation in LabVIEW, however, it does not offer the full functionality of the DAQmx API. For more complicated tasks, such as triggering or terminal selection, you will have to program with the DAQmx API. There are several excellent resources for beginning with the API. I recommend checking out the Developer Zone Tutorial: Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisiti... and also the DAQ Support page.
Another great resource ships with LabVIEW: the Example Finder (Help » Find Examples…). Browse by Task to Hardware Input and Output » DAQmx. There are several examples that will prove to be useful.
As for toggling your output, check out the example called Acq&Graph Voltage-Int Clk-SW Trig Restarts.vi under the Analog Measurements » Voltage directory. This example shows how you can toggle a task though software. Finally, to change the output terminal of your pulse generation task, you will need to use a DAQmx Channel Node and select Counter Output » Pulse » Output Terminal.
Please post if you have any questions. Have a great day!
07-17-2012 09:08 PM
Hi,
I’m using NIUSB 6218 to acquire measurements from 16 (Ai16-Ai31) displacement sensors and 16 (Ai0-ai15) from ultrasonic sensors. These sensors are activated alternately which means when acquiring data from the ultrasonic sensors the displacement sensors are deactivated. For ultrasonic scan contains 16 channel x 16 samples then it will followed by displacement sensors also 16 channels x 16 samples. The acquisition samples are controlled by the trigger signal (rising edge) from the PIC. The whole system is using external clock from the PIC 20MHz. I’m planning to insert START and STOP button on the front panel. The assignment of the pin is as follows:
PFI0- Trigger signal (acquiring data) from PIC.
PFI1- BURST signal from PIC (send all (16x16) acquired data to be displayed/save into spreadsheet file.
PFI4- START signal to PIC
PFI5- STOP signal to PIC
So far my VI works when I applied external trigger signal at PFI0. The VI can sample the data but how to inform the PIC that the 16 sample data has been acquired? My problem is I do not know how to combine all these functions (START/STOP/BURST) into my VI. Attached is my sample of the VI which I’m working on. Please advice.
TQ