Stepping motor
JoeyJ
Posts: 2
I am new to programing in fact I am trying to learn from the Stamp manuals and other info found on the web. My project is controlling a stepping motor. My stepping motor has a 6:1 gear ratio attached. Using half steps it takes 2400 steps for one rev of the main gear. I am able to run and position it with the basic stamp2. What I would like to do is setup four or five positions in the program for it to accurately return to. My thoughts are to use a home position sensor to establish my 0 at startup and two counters one to track its position at all times and the other to calculate the movement needed for the next. Is there any way to use something like a > or < evaluation in the program? I did not see anything in the manual like that. I would like to use it to determine the direction to run for the shortest distance to its next position. I may be headed in the wrong direction with the whole thing. I would appreciate any input.
Thanks
JoeyJ
Thanks
JoeyJ
Comments
[h=2]Quick Facts[/h]
BS2 Family
Comparison operators
=, <>, >, <, >=, <=
Conditional Logic Operators
NOT, AND, OR, XOR
Format of condition
Value1 Comparison Value2;
where Value1 and Value2 can be any of variable, constant or expression
Parentheses
Allowed
Nesting
Up to 16 levels
Related Commands
Also see Parallax's own fine stepper doc at http://www.parallax.com/Portals/0/Downloads/docs/prod/motors/Stepper_Motor_27964.pdf