Replies from the RepRap machine to the host computer
All communication is in printable ASCII characters. Messages sent back to the host computer are terminated by a newline and look like this:
xx [line number to resend] [T:93.2 B:22.9] [C: X:9.2 Y:125.4 Z:3.7 E:1902.5] [Some debugging or other information may be here]
xx can be one of:
ok
rs
!!
ok means that no error has been detected.
rs means resend, and is followed by the line number to resend.
!! means that a hardware fault has been detected. The RepRap machine will shut down immediately after it has sent this message.
The T: and B: values are the temperature of the currently-selected extruder and the bed respectively, and are only sent in response to M105. If such temperatures don't exist (for example for an extruder that works at room temperature and doesn't have a sensor) then a value below absolute zero (-273oC) is returned.
C: means that coordinates follow. Those are the X: Y: etc values. These are only sent in response to M114 and M117.
The RepRap machine may also send lines that look like this:
// This is some debugging or other information on a line on its own. It may be sent at any time.
Such lines will always be preceded by //.
The most common response is simply:
ok
When the machine boots up it sends the string
start
once to the host before sending anything else. This should not be replaced or augmented by version numbers and the like. M115 (see above) requests those.
All this means that every line sent by RepRap to the host computer except the start line has a two-character prefix (one of ok, rs, !! or //). The machine should never send a line without such a prefix.
Добавлено спустя 16 секунд:http://www.reprap.org/wiki/G-codeДобавлено спустя 1 минуту 29 секунд:Myp писал(а):хммм...
типа управление стандартными импульсами будет слишком медленное
много времени проходит с момента как мы захотим остановить серву и момента пока она примет и осознает импульс управления?
Кстати, да. 20мс минимум.... Но это надо смотреть - много это или мало.
Кстати, серва поймет и 10 и 5 мс между импульсами
Добавлено спустя 3 минуты 53 секунды:Problem to solve
Each line of G-code sent from the host to the controller is answered with an ok before the next line can be sent without locking communcations up. This makes operations very slow, as the usual USB-TTL converters and probably also the host's operating system drivers come with substantial latency, often 10 milliseconds.
For more details on this proposal, and some suggested solutions, and comments please see GCODE_buffer_multiline_proposal
Ребята, проблема решена! Надо использовать мой стол - 8см за две минуты! Можно кино за это время скачать в хорошем качестве, не то, что сотню строк
