Programming Question...
I was playing around with the MOVE block and found something that I don't quite understand...
I've never actually placed a MOVE block by itself and configured it for UNLIMITED Duration. I did this today and when I ran the program, the motors spun for 1 Duration.
I put the MOVE block inside a LOOP block (set to FOREVER) and configured the MOVE block for UNLIMITED and it ran until I stopped it.
Okay, here's the question. Shouldn't a basic MOVE block configured to UNLIMITED Duration keep spinning the motor without the LOOP block? Can anyone else duplicate this or is it possibly just something with my brick/motor?
I've never actually placed a MOVE block by itself and configured it for UNLIMITED Duration. I did this today and when I ran the program, the motors spun for 1 Duration.
I put the MOVE block inside a LOOP block (set to FOREVER) and configured the MOVE block for UNLIMITED and it ran until I stopped it.
Okay, here's the question. Shouldn't a basic MOVE block configured to UNLIMITED Duration keep spinning the motor without the LOOP block? Can anyone else duplicate this or is it possibly just something with my brick/motor?
Comments
The program ends after the motor block is executed.
So, it will start the motor, and end the program. The motor may not even be running as far as you think. It may just be coasting.
Like if you began a program with a Unlimited move block, then you put a bunch of switches there, without a loop, it will run that unlimited until it has preformed everything.
Duh... sometimes I can't the forest for the trees.
Jim
So what of the STOP block in the 'complete' palette.
--
Brian Davis
I haven't tried NBC yet and would be interested in reading comparisons of it to some of the other text based languages including RobotC. I'm still waiting to see what the Lejos roadmap looks like.
-david
-Steven
jim