How does a 3D printer software/firmware work I have been working on a printer project that basically is a 2D printer (dot matrix type). We are using solenoids as actuators to make impressions on the paper. We are now in the process of designing custom software. But a problem that we have encountered is that we have no idea how to design software as we are a bunch of beginners in this field.

An idea we are working on is based on position-acknowledge technique. In this technique the computer sends G-code to the controller. The controller after reaching the position defined in code sends an acknowledgement and the computer then sends the next signal. This is the model we are currently working on. 


Can anyone suggest any other ideas to make this work? 
Is Our approach right? 
Do 3D printers work using same technique?
You appear to be asking about rate-limiting the stream of G-code provided by the computer, but some more context in your question will help if this is not the case.

Printers tend to work in two ways.


Read G-code from local storage as a text file. Here, the parser/control engine is in full control.
Stream G-code over a serial port using an 'ack' handshake.


The reference for G-code used in 3D printing is the RepRap Wiki. Here you will find responses such as ok resend and fatal, these indicate when a previous command is processed and something else can be sent, if the previous message was identified as corrupt, or if recovery is impossible.

The basic rule for this style of handshake is that after every host to slave transaction, the host must wait for some response before sending another transaction. The slave could send either ACK responses, or other asynchronous transactions if you can design the system to avoid or not care about overrun in the slave to host direction.

When designing a handshake like this, you can consider all possible ways for something to go wrong (assume the interface is imperfect). How can you handle a request being missed and no ACK ever? When there is a timeout, can you make a 'benign' request to see if the printer is still connected, etc.