Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
2 ratings:
 2.5 out of 5     Rate this Document

Output a Pulse Upon a Certain Count With NI-DAQ Function Calls or LabVIEW

Primary Software: Driver Software>>NI-DAQ
Primary Software Version: 7.2
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: Counter/Timers (TIO)>>Devices>>PCI-6602

Problem: I have a PCI-6602. Does the counter have the capability to output a pulse upon a certain count? If it does have the capability, how would program this with using NI-DAQ function calls or LabVIEW?

Solution: The counter does have the ability to output a pulse upon the terminal count of the counter. For the PCI-6602, the value is (2^32) -1. Thus, you could choose your initial count, and the different between the terminal count and the initial count would be the desired value upon which you want the pulse. The way to do this using NI-DAQ function calls and LabVIEW follows.

NI-DAQ Function Calls
The parameter that you set is called output mode. Output mode sets how the counter changes its output upon a terminal count (TC). You can choose that output mode to be toggle or pulse. Toggle mode causes the output to invert itself. Pulse mode sends a pulse of one clock cycle out of the counter output. If that pulse doesn't have the pulse width and delay that you want, you can use that pulse as a trigger for another counter which can produce your desired pulse.

With NI-DAQ function calls, you use Select_Signal to activate the output of the counter first. Then, you use the GPCTR_Change_Parameter. For example, if x is the number of the PFI line, device represents the device number, and counter represents the counter number:

    Select_Signal (device, ND_PFI_x, ND_GPCTRx_OUTPUT, ND_DONT_CARE)
    GPCTR_Change_Parameter (device, counter, ND_OUTPUT_MODE, ND_PULSE)
LabVIEW
In LabVIEW, use the Counter Set Attribute.vi with Attribute ID as output mode and Attribute Value Type as pulse.

Related Links:

Attachments:





Report Date: 09/08/2001
Last Updated: 05/26/2004
Document ID: 2D7HK6YF

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit