Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Combining Scalar output with time vs RPM data aquisition

Solved!
Go to solution

I have no idea why my NI 9402 isn't working like it should, but I know it counts pulses, and at this point I need data for my report coming up.

 

I've come upon a .vi that contains an very basic way of relating counts to time, however I need to record this data to an excel sheet so I can analyze it. I've got a motor that's hooked up to an assembly. My encoder measures the rotation of the shaft (no direction measure availible) which is turned directly by the motor. As we load the assembly I want to see what the speed of the motor does via the encoder. So we will set the speed of the motor (anywhere from 1-100rpm) and then load the assembly and see if the motor can maintain the speed. Seems simple but my module is having a hard time getting any sort of a frequency from the encoder.

 

Anyway, the .vi that I'm using counts pulses and then divides them by 100ms once every 100ms. This outputs a scalar value which I want to record in relation to the overall time, prefferably every 10th of a second (100ms). I know I have to combine the values into an array (2 columns, undetermined amount of rows). How can I combine two elements ([time,RPM]) into an array every 100ms and have the array keep expanding rows until I hit stop?

0 Kudos
Message 1 of 6
(6,219 Views)

Hello Frontball

 

Please take a look to the attached VI, I did some modifications to your code is that what you are trying to achieve??

 

 

Regards

 

Mart G

0 Kudos
Message 2 of 6
(6,213 Views)

Hey Mart,

 

Shoot, forgot to mention I was using v8.5. Also, I realized I only need a 1d array of the output. I know my rpms will be timed a tenth of a second apart already and that's all I need.

 

Thanks,

Evan

0 Kudos
Message 3 of 6
(6,209 Views)
Solution
Accepted by topic author Frontball

Hello Evan

 

There you go!!

 

Mart

0 Kudos
Message 4 of 6
(6,206 Views)

That is EXACTLY what I was trying to do. I was having issues with the shift register and didn't simply think to add another one for adding the time.

 

Thanks so much.

 

Evan

0 Kudos
Message 5 of 6
(6,203 Views)

You are very welcome

 

Good luck with your app

 

Mart

0 Kudos
Message 6 of 6
(6,197 Views)