Problem with Stepper motor control

Hello.
I am a Newbie in Arduino programming so I want to ask a question.
My problem is when i sent commands from file using C# i can sent only 5 lines then motors just stop. But when i sent commands manualy all is OK i can sent how many commands i whant. I use Arduino Uno board and Adafruit motor shield v1.

I hope some one can help me Thanks :slight_smile:

Can you describe in English what you are sending to the Arduino and what it is expected to do with it?

It looks like the Arduino sends a ">" to signal it is ready for more data?

But I don't see anything in the C# code that is testing for that?

Is the PC sending too much data too quickly - when you do it manually you will be much slower and may unwittingly be "handshaking".

...R

I am sending G-Code
example:

G00 X10 Y100;
G00 X-10 Y-100;
G01 X100 Y100;
G00 X100 Y-100;
G00 X10 Y100;
G00 X-10 Y-100;
G01 X100 Y100;
G00 X100 Y-100;

When arduino get command to drive stepper for X and Y

Yes Arduino is sending this > when hi is ready

Yes i think C# is sending data too fast all 8 lines together Arduino buffer is full

You always need flow-control of some sort when the source of data can send faster
than the receiver can process it. Here software flow control looks to be the answer -
the Arduino is already sending an acknowledge token, the ">".

Thanks for help. But i already solve the problem.
I set timer in C# to 100 ms when i send lines i search in richtextbox if last line contains > then i send next line