Jump to content
THIS IS THE TEST SITE OF EUROBRICKS!
THIS IS THE TEST SITE OF EUROBRICKS!

Featured Replies

Posted

Hi,

I and my son started with a gear application one as a normal motor and one to shift the output to one of the four gears.

This is the code for the switch gear with motor.
We used four sliders to control the speed of the output.
So if a new output is used, then the switch gear goes to the appropriate position and then the motor is started.

Shifting works fine, the issue that we have is, that the normal motor stars to stutter and the switch gear behaves strange.

I think there must be some elementary error in my programming but I don't see it.
Is it allowed to control four sliders like this? or do I have to consider something I missed?

Photo

Thanks for your help for the first steps with mindstorms inventor

kind regards 20cents
Screenshot-.thumb.jpg.3444212403e02df32f05bc8e008a8408.jpg

Edited by 20cents

  • Author

Has nobody an idea what the problem could be?

Any help or questions are appreciated.

Thanks

Hi

I am not really an expert on the Mindstorms App. To me it looks like that one issue is that every time you move a new slider you will start a new sub-part of the program and subsequently a new infinite loop (widerhole fortlaufend). This means that if you move all four slides then the program will execute four loops all giving different commands to motor E.

A possible solution might me to exchange the loop widerhole fortlaufend (run forever) with a run until block. And setup each of these loops to run until slider is 0.

How does that work?

Cheers Carsten

Hi,

I think the four loops " wiederhole fortlaufend " should be removed completely.

Just:

- If slider is moved
     - call subroutine "Getriebeschalten"
     - start motor E with ....

 

 

Edited by Lok24

  • Author

Thanks a lot for your answers.

I will try that out and gibe feedback.

cheers 20cents

20 hours ago, Munchkin255 said:

Hi

I am not really an expert on the Mindstorms App. To me it looks like that one issue is that every time you move a new slider you will start a new sub-part of the program and subsequently a new infinite loop (widerhole fortlaufend). This means that if you move all four slides then the program will execute four loops all giving different commands to motor E.

A possible solution might me to exchange the loop widerhole fortlaufend (run forever) with a run until block. And setup each of these loops to run until slider is 0.

How does that work?

Cheers Carsten

Thanks Carsten,

Your are right there is an issue. But till now I used only one slider at once and it was not working anyways.

I will try if it helps to remove the continue loops.

Thanks so far
20cents

  • 2 weeks later...
  • Author

I removed the loops and now it works.
Thanks so much.
20cents

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.
Sponsored Links