Problem to control 2 stepers motors with megapi


#1

Hello
I want to control two steppers motors so they work at the same time but I can not. Only one of the two works. I’m programming them with mblock. The engines work for me individually. I connected them to port 1 and 3 of the megapixel board. If in makeblock I place the 2 blocks only the port 1 engine works.


I am using a regulated power supply to power the board.
Thanks in advance.


#2

According to this program, normally the stepper motor connected to Port 3 will keep rotating until if finishes the distance 1000, while the one connect to Port 1 won’t work since the program block executes fast, before the motor finish the rotate, it starts execute the second program block. So the application of this program block in that way is incorrect. Here is one of the applications for this program block:


#3

Hello:
It didn´t work correctly because I was working with mblock directly.
The code must be uploaded to the board to work properly.
Thanks for the reply.


#4