0

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?

  • 1
    Can you post a screenshot of the code? – David Lechner Oct 14 '17 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. Oct 14 '17 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. – Lori Oct 16 '17 at 16:09
  • @Lori Please consider posting your comment as an answer. – Ambo100 Dec 13 '17 at 14:20
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.