20cents

Help required for beginner with four sliders on remote

Recommended Posts

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

Share this post


Link to post
Share on other sites

Has nobody an idea what the problem could be?

Any help or questions are appreciated.

Thanks

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.