LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

start button for DAQ Assistant doing pulse generation

Hi,
I am new to Labview, and I got the USB 6210.
I used the DAQ assistant and selected ctr0 to create a pulse.
This works fine, but the pulse is generated when you run the program.
I want it so that when you press a button, the pulse generation starts. Then when you press the button again, it offs.
How would you do this, I dont see any 'data' input anywhere on the DAQ Assistant. Please help.

Also, I was wondering how to change the digital output line where the pulse will output. Currently it comes out the first D/O line. USB6210 has 4 digital outs, how do I change the output line.
In DAQ assistant, all i see are two choices for pulse, crt0 and crt1 (USB 6210 has 2 counters).

Again I am just learning, thanks for any replies:D
0 Kudos
Message 1 of 3
(3,996 Views)

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!

Ryan D.
District Sales Manager for Boston & Northern New England
National Instruments
0 Kudos
Message 2 of 3
(3,973 Views)

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

0 Kudos
Message 3 of 3
(3,107 Views)