LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

i want to start and stop counters using the same signal for my project please help

I am doing my undergrad project based on labview. I have to start and stop a counter based on a digital pulse i.e (0 to 1 transition starts counter and 1 to 0 stops) but the pulse duration is only about 0.2 mS.
i nedd to exactly measure the pulse duration. But as hard as i try, the counter dosent function and i get an error saying counter is not a valid NI compatible device. Also i am using counter to count time and give 1000000Hz as time base to count in micro seconds. Will this count in Micro seconds?? or is it smaller than the resolution of the counter? please help
0 Kudos
Message 1 of 4
(2,311 Views)
Hi,
which board are you using?
Have you configured/tested it in MAX (Measurement and Automation Explorer)?
LabVIEW has examples for measuring pulse width for different kind of counters (8253, AM9513, DAQ-STC); refer to your board's specification to see what counter it uses.

If for instance you have an E-Series DAQ board, you have to refer to the example of DAQ-STC counters Measure Pulse (DAQ-STC).vi. This example measures the pulse width of a digital signal that gates the counter (refer to its documentation for a full description of the settings).

The internal timebase value you set is actually the internal clock speed used for counting, if you set it to 1MHz , you get a resolution of 1 microsec.

Let me know if you need more informations,

Alberto
0 Kudos
Message 2 of 4
(2,311 Views)
hi,
Thanx for the help. i am using the AM9513. i tried doing pulse width measurement today by setting freq at 1Mhz. But if i give continuous run after giving the signal to the counter0 gate, it runs for some time and then there is an error generated ( gate source error ie i suppose error no 00809 or something the pulse input i give is from receiver of an ultrasonic sensor it gives some pulses and then waits for about 60msec before next pulse input. will the waiting cause this problem?
sai
0 Kudos
Message 3 of 4
(2,311 Views)
Hi again,

take a look at the example Count Time-Int(9513).vi in the counter example.
You can find it also here:
http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3DBA156A4E034080020E74861&p_node=DZ52327&p_submitted=N&p_rank=&p_answer=&p_source=External

Good luck,
Alberto
0 Kudos
Message 4 of 4
(2,311 Views)