public synchronized void doStep(boolean forward) {
		if(forward){
			if(pause != 0 && inpause){
				//1 step
				gcodepainter.interrupt();
			}else if(pause == 0 ){
				//10 steps
				setCmd(Commands.STEP50X);
			}
		}else{
			if(pause != 0 && inpause){
				setCmd(Commands.STEPBACK);
			}else if(pause == 0 ){
				//10 steps
				setCmd(Commands.STEP50XBACK);
			}
		}
	}