Conversion to get velocity


Recommended Posts

Hello!

I have linear potentiometer connected to Labjack U6. It has 250 mm linear movement that U6 sees 0-5V voltage.

So far I have made conversion (Value/5*250) to get movement (position) in mm:s to X-axes.

What chances in conversion must be made to get movement to velocity m/s (metres/second)?

Sami.

Link to comment
Share on other sites

You can't really do velocity directly in a conversion because you need the previous linear measurement for this. Instead you have to create a new Test channel to hold the velocity. Make it I/O type A to D with a timing of 0. Then in the event for your potentiometer, put something like (assuming you still have that conversion applied):

velocity.addvalue(inserttime((pot[0] - pot[1]) / (pot.time[0] - pot.time[1]), pot.time[0], 0))

You probably want to add an additional /1000 since the above will give you mm/sec.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.