03-12-2012 09:36 PM
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?
Solved! Go to Solution.
03-13-2012 04:21 PM - edited 03-13-2012 04:23 PM
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
03-13-2012 04:30 PM - edited 03-13-2012 04:38 PM
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
03-13-2012 04:45 PM
Hello Evan
There you go!!
Mart
03-13-2012 05:05 PM
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
03-13-2012 05:08 PM
You are very welcome
Good luck with your app
Mart