Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to synchronize counter speed measurement with analog input?

Hi,


I am measuring speed of an electric motor using a counter input and I would like to synchronize the data with my analog input samples.

I found an example doing just that (here: https://decibel.ni.com/content/docs/DOC-10785  ) but the counter measures angular position, not speed. I tried modifying the vi to measure speed (as frequency) but it throws an error (Error -200300 -- Invalid timing type for this channel.).

 

I know I can set the sample clock of the counter task to 'implicit' (which results in a sample for every count) and then re-sample to match the AI sample rate but that takes quite a lot of resources and I'd like the driver to care of the synchronization.

 

So, is there a way to get the speed samples synchronous with the AI samples?

I hope this makes sense to someone...

0 Kudos
Message 1 of 4
(3,943 Views)

Hi Pianne,

 

 

How have you modified the vi to measure speed instead?

 

Are you just switching from CI Angular Encoder to CI Angular Velocity on the Create Channel?

 

Thanks

0 Kudos
Message 2 of 4
(3,898 Views)

Hi aevans1,

 

Thank you for replying.

 

To measure speed, I changed the poly instance of 'create channel' to 'CI-frequency'. This resulted in the 'invalid timing type' error described above.

Same thing for 'CI-period' and 'CI-pulse width'.

 

Changing the timing type to 'implicit' fixes the error, but then I can't synchronize with my other inputs.

 

You mention 'CI Angular Velocity' but I can't find that setting.

 

 

0 Kudos
Message 3 of 4
(3,877 Views)

Hi Pianne,

 

you can select the instance, go down to velocity at the bottom and then select angular.

 

This doesn't seem to create any conversion dots like the frequency one does so maybe it'll work for you.

 

Thanks

0 Kudos
Message 4 of 4
(3,867 Views)