Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

using TWO counters of 6025E DAQ

I intend to use BOTH counters of my DAQ-6025E card. Counter 0 to give out a digital PWM signal. Counter 1 to recieve a digital signal from a frequecy VI. Thus GPCTRO_OUT to the DC motor circuit. And the return path to the DGND. GPCTRO_SOURCE to the frequency circuit and the return path to the DGND. I understand I need to connect the GPCTR1_OUT to the GPCTRO_GATE. That leaves out GPCTR1_SOURCE and GPCTR1_GATE.

GPCTR1_SOURCE - not in use
GPCTR1_OUT - connected to GPCTR0_GATE
GPCTR1-GATE - not in use


GPCTR0_SOURCE - connected to find frequency circuit
GPCTR0_OUT - connected to DC motor circuit
GPCTR0-GATE - connected to GPCTR1_OUT

IS this OKAY? Will it damage anything?
0 Kudos
Message 1 of 7
(4,358 Views)
Hello,

Are you using Traditional NI-DAQ, or NI-DAQmx?

You can only use one counter at a time for a specific measurement. Depending on the type of measurement you are making (period, pulse width, counting), your task could use 2 counters.

Do you want Counter0 to output a finite or continuous pulse train? A finite pulse train requires the use of both counters. You would not be able to use Counter1 with this configuration.

If you are using Counter1 to measure frequency, make sure that you are not using the 2 counter method.

If you want Counter0 to generate a PWM signal, why are you connecting anything to the source pin? If you want Counter1 to measure frequency, you should connect the signal that you want to measure to either the gate or source of that counter. Why did you connect the output of Counter1 to the gate of counter 0?

Regards,
Sean C.
0 Kudos
Message 2 of 7
(4,350 Views)
I am using the traditional Ni-DAQ. I have to use TWO counters according to instructions from the labview program Measure Frequency VI. Here it is!

"This VI measures the frequency of a TTL signal on the specified counter's SOURCE pin. In addition to this connection, you must wire the counter's GATE pin to counter-1's OUT pin. This VI is useful for relatively high frequency signals. Use the Measure Pulse Width or Period VI for relatively low frequency signals. Keep in mind that period(s) = 1/frequency (Hz).
1. Connect the signal you want to measure to counter's SOURCE pin.
2. Connect counter's GATE pin to counter-1's OUT pin. Identify counter-1 from the table below. Not all counters are available for all boards and operations; consult the DAQ VI and hardware reference manuals.
3. If counter-1 gate mode >0, connect the gating signal to counter-1's GATE pin and set maximum delay to gate to the expected maximum delay.
4. On a counter overflow, use 32-bit counter size or decrease the gate width; if the number of rising edges is low, increase the gate width."

Therefore I believe I have to use TWO counters to measure frequency. I also need a TTL PWM signal to control a DC motor. Can it be done?
0 Kudos
Message 3 of 7
(4,342 Views)
I understand to measure frequency of a signal there are TWO methods. A ONE counter method and a TWO counter method. I need to measure a frequency between 1 Hz to 200 Hz. Is the ONE counter method possible? What is the ONE counter method?
0 Kudos
Message 4 of 7
(4,331 Views)
Hello,

The one counter method is best for low frequency signals. All it does is counts the number of pulses that occur between 2 rising edges of your signal. It then multiplies that count by the period of the timebase signal to calculate the period, and takes the reciprocal of that to get the frequency.
This is probably the best method for your application, especially because you need an extra counter for this as well.

Regards,
Sean C.
Message 5 of 7
(4,325 Views)
Is this the connections for the ONE counter method?

GPCTR0_SOURCE - connected to find frequency circuit
GPCTR0_OUT - not connected
GPCTR0-GATE - not connected

Is there an example of the ONE counter method somewhere?
0 Kudos
Message 6 of 7
(4,323 Views)
Hello,

There are some every helpful examples in the NI Example Finder. From LabVIEW, select Help >> Find Examples. Then in the Example Finder, Browse to Hardware Input and Output >> Traditional DAQ >> Counters >> DAQ-STC. The Measure Period(DAQ-STC).vi is a one counter period measurement. This would best for your application. Just remember to take the reciprocal of the period to find the frequency.

There is also a two counter frequency measurement VI called Measure Frequency(DAQ-STC).vi.

Both of these VIs explain how to wire the signal in the VI Properties >> Documentation window. Access this by selecting File >> VI Properties.

I hope this helps.

Regards,
Sean C.
Message 7 of 7
(4,311 Views)