problem repeating
Graham Stabler
Posts: 2,510
I have a piece of spin code that works perfectly, the idea was to make it run five times in a row, adding repeat 5 and indenting carefully (checked with ctrl-i) and it doesn't work as expected even on the first run through the code, repeat 1 works fine.
How can this be?
Graham
How can this be?
Graham
Comments
Anything else you can give which helps the diagnosis ? Does it exit the repeat ? Have you tried using TV_Text or something similar to try and diagnose or watch the progress of the code, have you tried commenting out lines of code and adding them back in to see what screws things up ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sorry for my rather desperate post, I wouldn't normally have bothered you all but this code is running a PIV experiment (Particle image velocimetry) and we have to be all done by the 12th as the room is being stripped out for renovations.
The code uses some of my own motion control routines, I have two versions of a move, one starts the move then returns once complete, the other starts the move and returns straight away. I was using the latter so that I could monitor its progress by counting step pulses before firing the laser at the correct point.
When I added the repeat it looped to the start of the code interrupting the move with the homing code, it all happens rather quickly so was difficult to spot, I was just wondering if there might have been a common error I was missing related to looping.
Thanks
Graham
Glad to hear you got to the bottom of it
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.co.uk
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
BTW: I type as I'm thinking, so please don't take any offense at my writing style