• Posts 78
  • Reputation 1
  • Member Since
  • Last Active
Email
  • Gender: Male
  • Profile Picture
    This user has not added any photos yet.
All Posts Topics Started Likes
Servo programming for rookie team
Thanks for the solution, Joel. Looks like that that suggestion worked out well. Another solution for the same problem would look like this:

Button2Motor.PNG 

You can see that I have used a Switch block instead of the Gain and Add blocks combination that Jgraber suggested. The Switch block lets me send a +127*(45/60) angle value when the button is not pressed (i.e. second input to the block, u~=0  or u is not equal to 0) or -127*(45/60) value when button is pressed (i.e. if second input u==0). Switch block is present int he Utilities library. 

Hope this helps, too!

Thanks and good luck.
bestrobotics@mathworks.com




 
0 0
Simulink Design Award 2017 - Win 1000$ in cash prize!!
You are right Evan, my bad! I have updated the post to say 1000$ now. Thanks!
0 0
Simulink Design Award 2017 - Win 1000$ in cash prize!!
Hello teams,

MathWorks is excited to announce the Simulink Design Award for BEST Robotics 2017 competition. If you are a team using Simulink in the competition then you have a chance to win 1000$ cash prize!! To learn more about this award and how to participate, go here:
http://www.bestinc.org/b_simulink_award.php


Wanna see what winning teams in the past did with Simulink? Go here:
https://www.mathworks.com/academia/student-competitions/best-robotics/simulink-award.html


For questions related to the award, contact us at simulinkaward@bestinc.org

For questions related to Simulink, contact us at bestrobotics@mathworks.com 


All the BEST!
0 0
Simulink Design Award 2017 - Submit your entry!
Hello teams,

MathWorks is excited to announce the Simulink Design Award for BEST Robotics 2017 competition. If you are a team using Simulink in the competition then you have a chance to win 1000$ cash prize!! To learn more about this award and how to participate, go here:
http://www.bestinc.org/b_simulink_award.php


Wanna see what winning teams in the past did with Simulink? Go here:
https://www.mathworks.com/academia/student-competitions/best-robotics/simulink-award.html


For questions related to the award, contact us at simulinkaward@bestinc.org

For questions related to Simulink, contact us at bestrobotics@mathworks.com 


All the BEST! 

0 0
Serial Debugging with External Mode in Simulink
Have you heard of serial debugging through External Mode in Simulink? Have your tried it before? What was your experience with it? 


0 0
Help for error "Index exceeds matrix dimensions."
Bottom line on top, Mahaflac's issue was resolved late last week through email correspondence with the MathWorks tech team. Here is my response to close the loop on their case.

First, thanks for the response, David Dominguez. The error message posted above has multiple reasons since its a slightly generic error message (mainly points out that the build of the code went well but it cannot download the binaries now successfully to the VEX Cortex). And yes, the workaround that you mentioned is one way troubleshoot it when the issue is related to VEX not being recognized as a USB device on your computer.

In Mahaflac's case, the problem was related to how they were downloading the Simulink model to the Cortex, i.e. they were trying to download the program to the Cortex wirelessly over the VEX Controller/Gamepad. This is NOT support through the Simulink workflow currently and that why VEX was not listed as a COMP Port device (technically it was not connected to the PC, the gamepad was!). So here is the MathWorks' recommendation on the download process:

1) DON'T use the VEX Controller to wirelessly download Simulink models to the Cortex.
2) DO use a Male-to-Male USB cable (the VEX orange cable or any other color that you may have!) to tether the Cortex directly to the computer, and then download the model. 

BEST_VEXDownload_USB.PNG  BEST_VEXDownload_USBYes.PNG 
(Images credit: vexforum.com)

The VEX library documentation will be updated in the next release (2018) to clarify this limitation that exists. We are looking at possibly updating the process to include wireless download over the controller in the future, but the possibility and timeline of making this happen is not clear at this point. For now, please follow the recommendation above.

HTH
Sandeep
bestrobotics@mathworks.com 


Sandeep Hiremath
MathWorks (makers of MATLAB and Simulink)
http://www.mathworks.com/best-robotics

0 0
Help for error "Index exceeds matrix dimensions."
Bottom line on top, Mahaflac's issue was resolved late last week through email correspondence with the MathWorks tech team. Here is my response to close the loop on their case.

First, thanks for the response, David Dominguez. The error message posted above has multiple reasons since its a slightly generic error message (mainly points out that the build of the code went well but it cannot download the binaries now successfully to the VEX Cortex). And yes, the workaround that you mentioned is one way troubleshoot it when the issue is related to VEX not being recognized as a USB device on your computer.

In Mahaflac's case, the problem was related to how they were downloading the Simulink model to the Cortex, i.e. they were trying to download the program to the Cortex wirelessly over the VEX Controller/Gamepad. This is NOT support through the Simulink workflow currently and that why VEX was not listed as a COMP Port device (technically it was not connected to the PC, the gamepad was!). So here is the MathWorks' recommendation on the download process:

1) DON'T use the VEX Controller to wirelessly download Simulink models to the Cortex.
2) DO use a Male-to-Male USB cable (the VEX orange cable or any other color that you may have!) to tether the Cortex directly to the computer, and then download the model. 

The VEX library documentation will be updated in the next release (2018) to clarify this limitation that exists. We are looking at possibly updating the process to include wireless download over the controller in the future, but the possibility and timeline of making this happen is not clear at this point. For now, please follow the recommendation above.

HTH
Sandeep
bestrobotics@mathworks.com 


Sandeep Hiremath
MathWorks (makers of MATLAB and Simulink)
http://www.mathworks.com/best-robotics

0 0
ANNOUNCEMENT: Talk to a Simulink Expert - Biweekly sessions for BEST 2017 season
Hello Teams!

Need help with installing and using Simulink software to program your BEST robot this season?

Talk to a Simulink Expert!

You can meet a Simulink expert from MathWorks through Skype (video conference call) to discuss your issues and questions through out this BEST Robotics season. The Simulink expert will be available online for every week for an hour to assist you with your questions/issues. So, register to these sessions today!

When: Every Friday from 2-3 pm ET on the following dates:

1) Sept 22nd 2017 - Done!

2) Oct 6th 2017

3) Oct 20th 2017

4) Nov 3rd 2017

5) Nov 17th 2017

Where: Online- Skype video call.

How to Join the call: Find the details here- https://www.eventbrite.com/e/online-support-for-teams-simulink-for-best-robotics-2017-tickets-37765841649 

If this time doesn't work for you or need help right now, contact us at bestrobotics@mathworks.com with your questions.

All the BEST with the competition CrossFire 2017.

Sandeep Hiremath

0 0
IMPORTANT: Download the FIX to the Arcade Module block in VEX Simulink (R2017a) library.
Hello BEST teams,

Many of you are aware of the run time issue with the Arcade Module block in VEX Simulink library. We have a fix for the issue and we are currently adding the fix to the official library, however it will not be available until late October. Thus, I am submitting the fixed block here in this post as an attachment.

Please download the attachment ZIP file that contains the fixed Arcade Module block. 

Use this block in your own Simulink models and let us know if the fix resolved the issue. 

NOTE: This block is now fixed to work as expected on the real robot. Do NOT use this block with the Field Simulator block this year, since we are still trying to fix the simulator block to function correctly with the Arcade module block. Sorry for the inconvenience. Our development team plans to fix the Field Simulator block issue with Arcade Module block in the next release. 

Do feel free to share this fix with other teams who might be running into this problem (Yes, helping other teams is great sportsperson spirit!).

If you have questions or concerns with this fix, please post here or email the support team at bestrobotics@mathworks.com

Thanks and all the BEST!
MathWorks 
(makers of MATLAB and Simulink)

Attached Simulink model's screenshot:
ArcadeModule_Fixed.PNG 
0 0
IMPORTANT: Download the FIX to the Arcade Module block in VEX Simulink (R2017a) library.
Hello BEST teams,

Many of you are aware of the run time issue with the Arcade Module block in VEX Simulink library. We have a fix for the issue and we are currently adding the fix to the official library, however it will not be available until late October. Thus, I am submitting the fixed block here in this post as an attachment.

Please download the attachment ZIP file that contains the fixed Arcade Module block.

Use this block in your own Simulink models and let us know if the fix resolved the issue.

NOTE: This block is now fixed to work as expected on the real robot. Do NOT use this block with the Field Simulator block this year, since we are still trying to fix the simulator block to function correctly with the Arcade module block. Sorry for the inconvenience. Our development team plans to fix the Field Simulator block issue with Arcade Module block in the next release. 

Do feel free to share this fix with other teams who might be running into this problem (Yes, helping other teams is great sportsperson spirit!).

If you have questions or concerns with this fix, please post here or email the support team at bestrobotics@mathworks.com

Thanks and all the BEST!
MathWorks
(makers of MATLAB and Simulink)

Attached Simulink model's screenshot:
ArcadeModule_Fixed.PNG
0 0
Question about state flow
I understand the need to start with the basics for your team. Yes, feel free to use the model as you see fit. If you need help with designing more examples in the future, please post here. 

Good luck!
Sandeep 
0 0
We are trying to program a motor to wave a small flag in our homecoming parade with simulink. Have tried several versions of this
Here is a program that might actually work for you:
WaveFlag_BESTForum.PNG 

I have also attached the model for your reference. 

A few things:
1) I am guessing you were trying to achieve the waving motion through the MATLAB Function blog. You could have done that for sure. In my solution, I have instead using the "Signal Generator" block from Simulink (its not available in the VEX library but available in the generic Simulink library that you bring up by clicking on the Simulink icon button ( SimulinkIcon.PNG .)in your model. Signal Generator block lets you create a signal of different shapes, in my case I choose a square wave. Why square? - because I want the motor speed to go to a constant positive value (see the value 50 on the blue line in the graph above), stay there for few seconds, and then go down to a constant negative value (-50) for the same amount of time, and continue this pattern. So this pattern will generate the 'waving' motion of the flag. Agreed?

2) I use a Switch block in model to control what happens when the Gamepad button is pressed. I am assuming from your earlier design that you wish to use the button to control the start and stop of flag waving. Correct? If so, the Switch block in this model will give you that behavior. The block takes the Gamepad button input, through the Latch block, as the control input to decide what to do if the button is pressed( >0) or not pressed (<= 0). If former, then top input, i.e. Signal Gen value is passed, else the latter i.e. the 3rd input which is a value of 0. This way, the flag waving can be controlled using a button.

3) Note that you can set the 'amplitude' of the motor input value within the Signal Generator block. In this case, its set to 50 (should be within the upper limit 127). If you want the flag to wave faster, then change this value to a larger one. You can see that I also use a 'Dashboard Scope' block that displays the Signal gen wave form (in blue) and the resulting Motor speed wave form (in orange) . I have set my Stop Time parameter  (meant only for simulation) to 20 instead of the default 'Inf'. And that's why we see the graph's X-axis representing 'time' going up to 20 'simulation' secs.

StoptimeIcon.PNG 

To learn more about the Scope and other Dashboard blocks, watch this: https://www.youtube.com/watch?v=h5xXbMKhVrY These are very powerful tools to use in your Simulink models to help with visual debugging. 

4) If you had a Servo motor instead that could wave the flag, then below is a model for that. Note that the example screenshot below does not incorporate the button control as above. you could include it in this servo example as discussed above. Also, note how I use a Sine wave here instead of a square wave. Any guesses why I do that? Add your response below! 

WaveFlagServo_BESTForum.PNG 
HTH

Sandeep 

For questions related to installation/technical issues- bestrobotics@mathworks.com 

0 0
Help for error "Index exceeds matrix dimensions."
When do you need this fixed by? We have a Simulink Help session tomorrow in the afternoon at 2 pm Eastern time. If you are okay with sorting things out over a Skype call, that session would be best. If you need immediate help, send me an email at bestorobotics@mathworks.com and I can setup a time today or tomorrow morning to resolve this matter. Let me know. Please be prepared to share you computer screen (where the software is installed) either way, this way I can troubleshoot the problem faster. 

Thanks
Sandeep 
0 0
Help for error "Index exceeds matrix dimensions."
Let me know how that goes. You should be able to use the same license info to install on the new machine, just so you know.

Sometimes restarting MATLAB and the machine also seems to fix this problem! Try this out too. 

Sandeep
0 0
Question about state flow
Espy,

That's a great question. In fact, there was an example that I shared of a similar model in a Simulink webinar (recording is here) last year. Wondering if you followed that to get to this example.

In any case, based on the image of the Stateflow chart that you have above, I put together something similar that seems to work for me. Not sure exactly why in your case the state for diagonal travel is not executed. I cannot see any possible reason for it to fail execution, it most possibly is being executed but its output may not be visible in the XY plot window?

Could you try the model attached (Zip file) and let me know if this works for you? I have optimized the repetitive forward and turn motions to achieve the square with just 2 states. Then, the right side set of states achieve the diagonal turn and travel. Note 2 things here-
1) I use a diagonal turn value of 1.7/2 and that gives me half the turn angle of 90 degrees 
2) I use 2*sqrt(2) to get the travel to be equal to the diagonal length of the square...basic math


This should get me to the lower right corner of the square. See the simulation results in the GIF below:
96F999FC-1BED-4C39-9019-06B74DE6A824.GIF 

You may have to adjust these values a little bit to make it work in your case but it should work after that. 
Let me know if this particular model works for you or not.

If you send me your particular model (.slx file) at bestrobotics@mathworks.com, I can look at it in detail and get back to you.

Thanks
Sandeep 


Simulink model screenshots:

SF_PolygonBot_DiagonalParent.PNG 
SF_PolygonBot_Diagonal.PNG
0 0
count post selected

Add a Website Forum to your website.