For acceleration, the software that runs your steppers needs to take care of that. Typically you set the acceleration rate that you want in the software, and then the software needs to figure out when to accelerate and decelerate based on the moves your making and the feed speeds. The feed speeds are usually in the g-code, unless you run everything at a default speed that, once again, your software should have settings for.

Once you set the acceleration, you should know how long it will take to reach the commanded speed, so it should be fairly easy ?? for you to know when to accelerate and when to decelerate.

Typically, you have g-code something like this:

G0 X0 Y0 Z1
G0 X5 Y0 (rapid move, rapid speed should be maximum speed set in controller software)
G1 X5 Y0 Z-.25 F3 (move at commanded "F" speed, 3ipm)