We have a line following myblock, which follows the line perfectly if it runs alone. However, if we include it as a block as part of a larger program, it goes haywire when it gets to that step and can't follow the line that it's on. If we run our program step by step, it completes each task successfully. Has anyone encountered this issue, and if so, any ideas how we can fix the problem?
-
1Can you post a screenshot of the code?– David LechnerCommented Oct 14, 2017 at 13:01
-
This can happen if your block runs in parallel with other code, especially other motor control blocks. Would need to see the code to assess this further.– Phil B.Commented Oct 14, 2017 at 14:21
-
1(I'm translating from what someone else told me, so hopefully I'm explaining it properly). We've figured out what the issue was - in the line follower we had issues with a loop breaking out consistently, so had changed it to a large motor block doing x number of cycles. when it was run individually, it worked fine as the number of cycles started from 0. When it was part of the larger code, it had already run that many cycles, so it immediately quit out of the line follower.– LoriCommented Oct 16, 2017 at 16:09
-
@Lori Please consider posting your comment as an answer.– Ambo100 ♦Commented Dec 13, 2017 at 14:20
Add a comment
|
1 Answer
We've figured out what the issue was - in the line follower we had issues with a loop breaking out consistently, so had changed it to a large motor block doing x number of cycles. when it was run individually, it worked fine as the number of cycles started from 0. When it was part of the larger code, it had already run that many cycles, so it immediately quit out of the line follower.