from serial import *
import time

sp = Serial('COM7', 9600, timeout = 10)


def move(x,y,z=0):
    sp.flush()
    s=str(x)+','+str(z)+','+str(y)+','
    sp.write(s)
    #print x,y,z
    while not sp.read()>0:
        pass


while 1:
    move(200,0)
    move(0,-2000)
    move(-2000,0)
    move(0,2000)

