Prop freezing with stepper
Hi Everyone.
Solved a problem with noise in the prop board a while ago. Now to my next problem
The problem i'm having is that the prop seams to freeze up when i'm running the stepper. Or better to say the stepper goes on by it self and the prop waits for it to be finished with it's process.
I tried to narrow it down by launching the stepper process on a separate cog and the in the main have a repeat loop looking for a button. It "felt" the button but the stepper just went on and on. And using a cogstop for that cog does not matter.
some of that code:
It only turns on the diod at the beginning, and then the motor keeps on going slow in one direction.
I have a little movie clip of the motor when this happens. First i goes in one dir just fine and then starts in the other dir wrong and keeps going.
The code for that movie clip:
I'm using the AxisDriver that i found on the Forum.
Any suggestions as to what this could be? If it's hardware based or code?
regards
/Lars
Solved a problem with noise in the prop board a while ago. Now to my next problem
The problem i'm having is that the prop seams to freeze up when i'm running the stepper. Or better to say the stepper goes on by it self and the prop waits for it to be finished with it's process.
I tried to narrow it down by launching the stepper process on a separate cog and the in the main have a repeat loop looking for a button. It "felt" the button but the stepper just went on and on. And using a cogstop for that cog does not matter.
some of that code:
PRI BLINKA_11
flash := 11
testtest1 := 500
repeat
DirA[flash] := Out
Axis.MoveAbs(testtest1, True)
OutA[flash] := High
waitcnt(20_000_000 + cnt)
OutA[flash] := Low
waitcnt(20_000_000 + cnt)
testtest1 := testtest1 + 500
It only turns on the diod at the beginning, and then the motor keeps on going slow in one direction.
I have a little movie clip of the motor when this happens. First i goes in one dir just fine and then starts in the other dir wrong and keeps going.
The code for that movie clip:
Axis.MoveAbs(2500, true) waitcnt(80_000_000 + cnt) Axis.MoveAbs(0, true)
I'm using the AxisDriver that i found on the Forum.
Any suggestions as to what this could be? If it's hardware based or code?
regards
/Lars


Comments
Are your variables High and Low defined anywhere as 0 and 1?