Jump to content
TEST environment ×
TEST environment

Recommended Posts

Posted (edited)

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
Posted

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

Posted (edited)

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
Posted

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...

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...