LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Can buffered digital edge detection only be performed using an external sample clock?

I am working on an application where I need to measure the speed (rpm) of a motor as it starts up using the output of its built in hall effect sensor.  The sensor should output 2 pulses per revolution of the motor.  My plan is to count the pulses from when the counter (counter 1) is armed to when it is up to speed. Looking at the M series manual, the CVI (v8.5.1) help, and the examples it appears that this can only be done using an external sample clock.  Is there a way to route an internal sample clock to the appropriate terminal on the counter so that I do not need to add additional hardware?

 

I am currently using a PCI-6289, but the final application will use a CDaq-9188 chassis (using one of the the built in 32-bit counters).

 

Thank you for your assistance.

0 Kudos
Message 1 of 5
(3,986 Views)

telsenbroich,

 

You should not need to route an external sample clock if you are just trying to count the number of pulses from an encoder. A simple Count Edges Task should do. You would just make sure to route the signal to the correct PFI line of the card. If you are wanting to measure the time between pulses, then a Frequency Task would suffice which should automatically route an appropriate Timebase signal internally given by the range of frequency that you specify.

 

Regards,

 

Ryan

Ryan P.
CLA
0 Kudos
Message 2 of 5
(3,939 Views)

Thank you for your input.

However, I did forget to mention one detail of the application.  I need to buffer the edge counts so that I can graph the speed of the motor as it starts up.  I need to be able to acquire the edge counts at reqular intervals so that I can determine how fast the motor was rotating at each point.  So far I have not been able to find an example of doing this without and external sample clock.  As I mentioned, in the final application I will be using the 32-bit counters on a CDAQ-9188 chassis.  The only thing I can think of at this point is to generate a pulse out of the second counter and use that as the sample clock.  Will this work?

 

 

0 Kudos
Message 3 of 5
(3,915 Views)

You should be just fine. Actually, one of the main uses of counters is to produce custom sample clocks for other tasks on the card. I can't see why there would be an issue with exporting the output of the counter to an external PFI line, and then using that as the sample clock. Many cards let you select the output of the counter as the sample clock directly using internal routing by choosing the "Dev1/Counter0InternalOutput" option, for example.

 

Regards,

 

Ryan

Ryan P.
CLA
0 Kudos
Message 4 of 5
(3,845 Views)

Thank you for the input.  I will give it a try and let you know how it turns out.

0 Kudos
Message 5 of 5
(3,753 Views)