LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate PULSE TRAIN VI & Measure Frequency VI

Can I RUN both Generate pulse train VI and Measure Frequency VI without either slowing down? Is Generate pulse train VI same as generate PWM VI? I have only attached the generate pulse train VI as I can only attached one file at a time.
0 Kudos
Message 1 of 10
(4,339 Views)
Hi labview1958,

This depends on the kind of frequency you'd like to generate, and the range of frequency you'd like to measure. You didn't mention the kind of hardware and software (version) being used, so I'll assume you're using an E Series DAQ device and programming in LV 7.1. If you're generating a continuous pulse train, only one counter is required, hence there should be another counter available (for most DAQ devices). If you're generating a finite pulse train, two counters are required, and there'll be no counter available for frequency measurement. Also, frequency measurement can use one or two counters depending on the frequency range. You can find LV shipping examples (Help >> Find Examples) for both pulse train generation and frequency measurement. These make a good starting point for your development. In the case that you don't have a counter available for frequency measurement, you can also use the "Extract Single Tone Information" VI to measure the frequency in software.

These tutorials will provide more details:

Generating a Pulse Train with a Counter

Making Accurate Frequency Measurements

Hope this helps,
Lesley Y.
Message 2 of 10
(4,323 Views)
I intend to RUN Generate Pulse VI and Measure Frequency VI. Each would be using one counter each on a NI-DAQ 6025E card. However I intend to increase the frequency if the Generate Pulse VI steadily through a LV program. Can I still use ONE counter each? Can you CORRECT the general pulse VI? There seems to be some problem. Itis shown in the error list but I cannot understand it.
0 Kudos
Message 3 of 10
(4,315 Views)
Hi labview1958,

The "Measure Frequency" VI uses two counters, hence you won't be able to run both at the same time. The "Measure Period" VI uses one counter, hence you can use this method of frequency measurement, along with the "Generate Pulse" VI. The limitations of this method (along with others) are described in the "Making Accurate Frequency Measurements" tutorial. I've made some slight changes to your example to work. It seemed like the previous just had some connection issues.

Thanks,
Lesley
0 Kudos
Message 4 of 10
(4,291 Views)
Thanks, for the corrections. However I cannot acess the changes because it is in LV7.1. I only have LV7.0. Can you change it to LV7.0? If I RUN Measure Period VI together with Generate Pulse VI, would the PULSE generation be halted or slowed when the Measure Period VI takes a second to measure the period? The frequency actually changes gradually with time.
0 Kudos
Message 5 of 10
(4,286 Views)
Hi labview 1958,

I have saved the VI in LV7.0. Also, I'm curious if there's a reason why you need to use the TraditionalDAQ driver for your development? If your DAQ device is supported in DAQmx, I highly recommend using this instead, as it'll make the programming much easier.

You can find out if your board is supported from:
Data Acquisition (DAQ) Installation/Configuration Troubleshooter

Thanks,
Lesley
0 Kudos
Message 6 of 10
(4,261 Views)
Hi,

I am actually using LV6.0 for my work. I have a 6025E Ni-DAQ card. My PC runs on windows ME. I have checked the recomended website and I can download NI-DAQ 7.1. Is that the NEW driver you recommend? However I am a novice and I am concerned I might corrupt some important files!

Is replacing the period and the pulse rate equivalent to the duty cycle. I have attached the file concerned. I intend to use this VI to contol the input of a power transistor(TIP41) which would switch on/off a 40 volt supply. Is it possible to regulate the FINAL output from 0 to 40 volt? Or is it possible only from 0 to 20 volt?
0 Kudos
Message 7 of 10
(4,252 Views)
Hi labview1958,

DAQ 7.1 has support for LV6, so there shouldn't be any problem. Since you're using the Traditional DAQ driver, there should be very little changes from the driver you're currently using. This driver should automatically overwrite your existing driver, since there's no need to worry about corruption.

Duty cycle is the ratio of the duration (time) that a signal is "ON", to the total period of the signal, while pulse rate usually refers to the signal frequency, and period is the inverse of the frequency, hence they are not equivalent to duty cycle. I'm not able to see the VI from the attached document, but there should be another parameter that will allow you to control the duty cycle.

The pulse train output will be TTL logic, hence it will go from 0V to 5V. You can use the analog output to produce a square wave, which will give you a range from -10V to 10V (If you're interested in using the analog output, check the Function Generator shipping example). But to obtaine 20V or 40V, you will need some external circuitry to amplify the signal.

Thanks,
Lesley
0 Kudos
Message 8 of 10
(4,232 Views)
I am using a NI 6025E daq card. HOw much current does it outputs with a 5V TTL signal?
0 Kudos
Message 9 of 10
(4,035 Views)

Hello,

This specification is provided in the E Series Help (User Manual and Specifications).  The 6025E can output 13 mA on port 0 and 2.5 mA on ports 1 - 3 for the logic high state.

Hope this helps,

Laura   

Message 10 of 10
(4,015 Views)