Answers.Body: <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-14T04:05:36.280Z
Answers.LastActivityDate: 2017-12-14T04:05:36.280Z
Answers.UserDisplayName: Lori
Body: <p>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?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-13T14:20:02.873Z
Comments.Text: @Lori Please consider posting your comment as an answer.
Comments.UserDisplayName: Ambo100
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-14T13:01:06.853Z
Comments.Text: Can you post a screenshot of the code?
Comments.UserDisplayName: David Lechner
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-14T14:21:43.987Z
Comments.Text: 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.
Comments.UserDisplayName: Phil B.
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-16T16:09:27.117Z
Comments.Text: (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.
Comments.UserDisplayName: Lori
Tags: <ev3><mindstorms>
Title: Mindstorms program - myblocks that work fine when run individually but when executed as part of a larger program, break
UserDisplayName: Lori
ThreadText: # Mindstorms program - myblocks that work fine when run individually but when executed as part of a larger program, break
  
  (Asked by: username_0 on 2017-10-14)
  
  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?
  
  **Tags:** ev3, mindstorms
  > **Comments:**
  > **username_2**: Can you post a screenshot of the code?  
  > **username_3**: 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.  
  > **username_0**: (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.  
  > **username_1**: @Lori Please consider posting your comment as an answer.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-12-14. Score: 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.
  
  
  ---
  
  