BS1 seems to have a mind of its own.
FearTurtles
Posts: 89
The Code I'm using is simply but then I'm not much of a programmer so can someone explain why when this code debugs "test" it starts off with 1 then increases the number by one each time the debug command is ran?
SYMBOL test = B1
SYMBOL count = W0
Main:
test = 10
count = 2000
FOR count = 1 to 2000
PULSOUT 0, 1000
PAUSE test
PULSOUT 1, 1000
PAUSE test
PULSOUT 2, 1000
PAUSE test
DEBUG test
NEXT
END
My basic goal here is to make a driver that will control a three phase stepper motor. Under my understanding this should cause P0 to go high for 1ms then P1 will go high for 1ms followed by P2. Then the order repeats. But when test is debugged it reads 1. Then the next time around it reads 2. Followed by 3,4,5,.....255 and so on.
Any ideas on what is happening would be a big help. Thanks
SYMBOL test = B1
SYMBOL count = W0
Main:
test = 10
count = 2000
FOR count = 1 to 2000
PULSOUT 0, 1000
PAUSE test
PULSOUT 1, 1000
PAUSE test
PULSOUT 2, 1000
PAUSE test
DEBUG test
NEXT
END
My basic goal here is to make a driver that will control a three phase stepper motor. Under my understanding this should cause P0 to go high for 1ms then P1 will go high for 1ms followed by P2. Then the order repeats. But when test is debugged it reads 1. Then the next time around it reads 2. Followed by 3,4,5,.....255 and so on.
Any ideas on what is happening would be a big help. Thanks
Comments