displaying decimal places
Brian_B
Posts: 842
Hi All,
I've been playing around with the propeller on a small cnc that has stepper motors.I'm trying to figure out how to take the 2000 steps it takes to move an inch and display it in decimal format (i.e.101.999). I've played around with the numbers and float objects but can't seem to make them work. Any help would really be appreciated.
Brian
I've been playing around with the propeller on a small cnc that has stepper motors.I'm trying to figure out how to take the 2000 steps it takes to move an inch and display it in decimal format (i.e.101.999). I've played around with the numbers and float objects but can't seem to make them work. Any help would really be appreciated.
Brian
Comments
-Phil
Work's perfect ,Thank You.
Brian
Brian
I made one small change to your object.The decimal point moved places when going from positive to negative (this would really bug a machinist),so I added a line of code to display the "+" sign when in positive mode.
Brian