Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

counting external clock

Hi,

i have an optical mouse connected with a vi that i could see the data and the external clock of the mouse..

the problem is that i want to know or measure  the  real time which the external clock create each pulse..

i thought to get a counter which measure any dig pulse  send by the mouse..

but can i get and the time with counters?

andrikos

0 Kudos
Message 1 of 5
(4,211 Views)
Hi Andrikos,

I'm not completely familiar with the signals that come out of a mouse. Are you connecting this to your computer with a USB port and communicating via VISA or do you have the wires exposed and wiring them into your DAQ device? Any pictures or diagrams would be helpful.

Again, I don't know how your mouse is outputting pulses but if you are looking to do two edge separation, our M-series devices support this with our DAQmx Driver. Using a counter and counting one of the high speed internal timebases, you can count down to intervals 12.5 nanoseconds. Look at the following document for more information about two edge separation. There are also numerous examples about using counters for input and output as well as great help documentation that ships with DAQmx and LabVIEW.

Measuring the Time Between Two Pulses On Separate Lines
http://zone.ni.com/devzone/cda/tut/p/id/4529
PBear
NI RF
0 Kudos
Message 2 of 5
(4,184 Views)
hi,

the mouse is coinnected with PS/2 connector

the mouse has 4 wires..

1. Vcc
2. Gnd
3. DATA
4. Clock

in the DaqCard i connected the wires 2, 3, 4

the 1 is connected via the computer.. because the 6221 Daq Card hasn't got Vcc

the problem is:

i want to know in real time,, when the external clock create the pulses..

i connected the time with the Ai 0 to try to find the time..  without result..

have you got any ideas?

with counters? can i do this? i thought, the counter measure the numbers of digital edges.. can i timing the digital edges?

andrikos
0 Kudos
Message 3 of 5
(4,164 Views)
Hi,

Your question was :

i want to know in real time,, when the external clock create the pulses..

You can use counters to find when the external clock is generating pulses.  It looks like you have connected to an analog input right now.  You could essentially do some kind of software analysis but it would not be accurate.  Using the counters you can measure all the pulses and when they occurred.  Are you using the DAQmx driver for this application?  If you are using LabVIEW for this application I can point you to an example that achieves something similar to this.  In the LabVIEW environment, click on Help >> Find Examples.  In the example finder window, select Hardware Input and Output and then select DAQmx >> Counter Measurements >> Count Digital Events.  There are a few examples in this folder that can show you how to make counter measurements.

There are also examples of counting pulse width etc., if that is something that you might want to do.

Hope that helps.

Regards,


Raajit L
National Instruments
0 Kudos
Message 4 of 5
(4,143 Views)
hi,

i sae these examples..

but how can i take the time??

these examples only measure or countings the pulses edges..

andrikos
0 Kudos
Message 5 of 5
(4,138 Views)