Home > Back-end >  Control of stepping motor rotation steps specified programming problem
Control of stepping motor rotation steps specified programming problem

Time:04-15

Can want to write a concession motor turning steps specified procedures, pulse number can realize automatic stop after enough, use simple program explain this situation, a for loop, expected 200 executed after I break is over, but use the Keil debugging found that after executing the break statement from main first line starts again, don't stop, you can see the process how to change it

CodePudding user response:

Baidu search relevant keywords,

CodePudding user response:

Within a for loop is 200, I can't get in to 200 for loop when conditions are not met, not into the circulation, so can't break statement execution,

CodePudding user response:

That I use as two layers for loop can delay program

CodePudding user response:

refer to the second floor dark9527 response:
within a for loop is 200, I can't get in to 200 for loop when conditions are not met, not into the circulation, so can't break statement execution,

Oh oh, I see! Thank you very much! I change

CodePudding user response:

Program does not have the while (1) loop, is likely to run the reset and run again

CodePudding user response:

Whether you are a FOR, or BREAK out, after all no code, then run, so he came to RST after the first code execution, and then to run the program again, over and run,

CodePudding user response:

Your problem solved?
  • Related