Simulator

Simulator handles raw commands and displays preview image. Raw commands should be similar to those on a stepper motor driver hardware - step, dir and enable pin for each axis.

Simulating over serial port

For debugging purposes, PC should send G code and hardware should return step sequence to simulator. Feedback protocol is described below.

Syntax:
[STX] + mask_x + mask_y + mask_z + [ETX]

STX..start of text, 0x02
ETX..end of text, 0x03
each mask is 1 byte (8 bits)

bit symbol description default
0 EN Enable 0
1 DIR Direction 0
2 STEP Step 0
8:3 - Reserved NA

Example:
Step X in positive dir, step Y in negative dir, no changes for Z axis
bin: [STX] + 0b00000111 + 0b00000101 + 0b00000000 + [ETX]
hex: 0x02 + 0x07 + 0x05 + 0x00 + 0x03

Last edited Nov 6, 2010 at 11:35 AM by papnkukn, version 1

Comments

No comments yet.