Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Velocity measurement using 9401 mounted in 9174

I have an NI9401 in a 9174 chassis.  I would like to measure the velocity of a bullet.  I have 2 optical sensors, each that put out a 5V pulse when the bullet passes thru the beam.  The only input should be distance between sensors and units (ft or m) and the output should be time in seconds and velocity in either feet or meters per second.  This should be about as simple as it gets.  I've been looking for an example .vi and haven't been able to find one yet.

0 Kudos
Message 1 of 4
(4,263 Views)

robk,

 

The reason is because is a very specific application. 

 

I will recomend you to create this application by yourself using two Digital Input Task with a daqmx timing (change detection). Then calculate the elapsed time between the two value changes of the signal using a VI similar or this one 

 

http://digital.ni.com/public.nsf/allkb/6F6B9F4E149C80578625652800784764

 

to get the velocity is just measuring the distance between the two places in where you placed your sensors and applying V= t/d

 

Regards

0 Kudos
Message 2 of 4
(4,202 Views)

Hi,

 

Thank you for your reply.  Can you tell me why this isn't working?

 

Thanks,

rob

 

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

Is because of the way you are configuring your task. 

 

Take a look at this example that use a digital edge trigger and a reference digital edge trigger as you

 

http://digital.ni.com/public.nsf/allkb/BA775B0E445BFA79482571FE0032CCEB

 

Regards

0 Kudos
Message 4 of 4
(4,166 Views)