What I am trying to do should be very simple. I am trying to draw a straight line and while the line is being drawn I am trying to send m-code commands that turn a pump/dispenser on and off. Is this possible?

I tried to insert the m-code command in between two lines of X/Y commands but it caused a slight delay and subsequently, an unwanted buildup of fluid where the gantry paused momentarily.

Here are a few lines of code from the tests that I have done. This test caused a delay when turning the pump off.

> N21 M1[Dispenser On]
> N22 G1 X21.0802 F200.0
> N23 M2[Dispenser Off]
> N24 G1 X40.0802 F200.0