BEST Robotic, Inc. MATLAB/Simulink Team Training Programming With MATLAB/Simulink

Similar documents
EasyC. Programming Tips

Best Robotics Sample Program Quick Start

Setting up a Local Interconnect Network (LIN) using dspace MicroAutoBox 1401/1501 Simulink Blocks

Programming the VEX Robot

Echtzeittesten mit MathWorks leicht gemacht Simulink Real-Time Tobias Kuschmider Applikationsingenieur

STEELSERIES FREE MOBILE WIRELESS CONTROLLER USER GUIDE

FRC WPI Robotics Library Overview

CONTENTS. What is ROBOTC? Section I: The Basics

How to program a Zumo Robot with Simulink

Building a Simulink model for real-time analysis V Copyright g.tec medical engineering GmbH

DAQ in MATLAB HANS-PETTER HALVORSEN,

PART I: WELCOME TO THE WONDERFUL WORLD OF ACCESSORIES CHAPTER 1: INTRODUCTION TO ANDROID OPEN ACCESSORY 3

Multi-Touch Control Wheel Software Development Kit User s Guide

Using the VEX Cortex with ROBOTC

Downloading a Sample Program over USB

Experiment 2 Introduction to TI C2000 Microcontroller, Code Composer Studio (CCS) and Matlab Graphic User Interface (GUI)

Compressor Supreme Force Feedback User Manual

dspace DSP DS-1104 based State Observer Design for Position Control of DC Servo Motor

SIMATIC. WinCC V7.0. Getting started. Getting started. Welcome 2. Icons 3. Creating a project 4. Configure communication 5

OASIS Application Note

Work with Arduino Hardware

Module 2 Introduction to SIMULINK

Multi-Touch Ring Encoder Software Development Kit User s Guide

Outlook Plugin. What is MangoApps for Outlook?

Editor. User Guide Guía del usuario Guide d'utilisation Guida per l'uso Benutzerhandbuch

ECE 495 Project 3: Shocker Actuator Subsystem and Website Design. Group 1: One Awesome Engineering

Tutorial for MPLAB Starter Kit for PIC18F

ValveLink Mobile Software

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

Designing a Graphical User Interface

ERIKA Enterprise pre-built Virtual Machine

Lab Experiment 1: The LPC 2148 Education Board

Modern Robotics, Inc Core Device Discovery Utility. Modern Robotics Inc, 2015

Introduction to Simulink

How To Run A Factory I/O On A Microsoft Gpu 2.5 (Sdk) On A Computer Or Microsoft Powerbook 2.3 (Powerpoint) On An Android Computer Or Macbook 2 (Powerstation) On

EE289 Lab Fall LAB 4. Ambient Noise Reduction. 1 Introduction. 2 Simulation in Matlab Simulink

ROBOTC Software Inspection Guide with Additional Help Documentation

STEPPER MOTOR SPEED AND POSITION CONTROL

MSSQL quick start guide

STEP 7 MICRO/WIN TUTORIAL. Step-1: How to open Step 7 Micro/WIN

FlowKit in-circuit debug system

Multi-Touch Control Wheel Software Development Kit User s Guide

An Introduction to MPLAB Integrated Development Environment

Twido Simulator - Online Help Scope What's in this Part? Twido Simulator Overview What's in this Chapter? How to Use Twido Simulator

WA Manager Alarming System Management Software Windows 98, NT, XP, 2000 User Guide

Tutorial for Programming the LEGO MINDSTORMS NXT

Introduction to Simulink & Stateflow. Coorous Mohtadi

JPD-FFB-A Vibration USB gamepad with audio USER MANUAL

Using. Microsoft Virtual PC. Page 1

Dr Robot C# Advance Sputnik Demo Program

Outlook to Windows Live Mail

EVAL-UFDC-1/UFDC-1M-16

Disabling Microsoft SharePoint in order to install the OneDrive for Business Client

dspic30f4012 Microcontroller

Nero MediaStreaming for MCE Manual

ScanWin Installation and Windows 7-64 bit operating system

EDK 350 (868 MHz) EDK 350U (902 MHz) EnOcean Developer Kit

The BSN Hardware and Software Platform: Enabling Easy Development of Body Sensor Network Applications

Accessing your Staff (N and O drive) files from off campus

Analog Devices Welcomes Hittite Microwave Corporation NO CONTENT ON THE ATTACHED DOCUMENT HAS CHANGED


USER GUIDE Version 2.0

A Tutorial Introduction to Control Systems Development and Implementation with dspace

SHORT TRAINING COURSES

Virtuet Video Builder

User s Manual for Fingerprint Door Control Software

Board also Supports MicroBridge

Quick Start Using DASYLab with your Measurement Computing USB device

Quick Start Guide. TWR-MECH Mechatronics Board TOWER SYSTEM

Learning Systems Software Simulation

DAS202Tools v1.0.0 for DAS202 Operating Manual

Click on various options: Publications by Wizard Publications by Design Blank Publication

1. Central Monitoring System Software

Windows 8.1 Tips and Tricks

Set up and Blink - Simulink with Arduino

Getting the best from your OneDrive

GLM 2.0 Version for Windows

Pro Flight Rudder Pedals

1. To ensure the appropriate level of security, you will need Microsoft Windows XP or above.

Dell SE2716H Monitor Dell Display Manager User s Guide

Appendix F: Instructions for Downloading Microsoft Access Runtime

FileMaker Pro and Microsoft Office Integration

North Texas FLL Coaches' Clinics. Beginning Programming October Patrick R. Michaud republicofpi.org

TESTBOX SHAKE TABLE USER MANUAL

Job Scheduler User Guide IGSS Version 11.0

CONTROL CODE GENERATOR USED FOR CONTROL EXPERIMENTS IN SHIP SCALE MODEL

Creating a Poster in PowerPoint A. Set Up Your Poster

LEGO NXT-based Robotic Arm

USING PURDUE COMPUTER RESOURCES FROM OFF CAMPUS. April 6, 2006

1. Central Monitoring System Software

Jumble for Microsoft Outlook

CHAPTER 11: Flip Flops

DUKANE Intelligent Assembly Solutions

DSP Laboratory: Analog to Digital and Digital to Analog Conversion

Rako Lighting Driver. For use with: Driver software written and provided by:

TestManager Administration Guide

Creating a new project up to a working PES

SYMETRIX SOLUTIONS: TECH TIP February 2014

Network Video Monitor Software

Technical Training Module ( 30 Days)

Transcription:

BEST Robotic, Inc. MATLAB/Simulink Team Training Programming With MATLAB/Simulink September 20, 2014 BISON BEST 1

What You ll Need Minimum System Requirements Microsoft Windows XP or Later 32-bit or 64-bit machine Administrator Access on the PC Internet connection Software required MATLAB R2014a free version available at http://www.mathworks.com/academia/student-competitions/best-robotics/ Registration and application required; approval expected in three days! Installation instructions will be provided in the approval email Associate to your license to your registered account Download and install MATLAB from the link provided (about 40 minutes) Activate the software Install the VEX Support Package and Companion App (about 15 minutes) September 20 th, 2014 Bison BEST 2

Key Software Locations August 1, 2010 Copyright 2010 BEST Robotics, Inc. All rights reserved. 3

Starting MATLAB Click on the MATLAB r2014a link August 1, 2010 Copyright 2010 BEST Robotics, Inc. All rights reserved. 4

Something on MATLAB MATLAB Window Opens: MATLAB means Matrix Laboratory. It is textural programming environment. It can execute commands directly as typed in the command window or run a script code from a saved file August 1, 2010 Copyright 2010 BEST Robotics, Inc. All rights reserved. 5

For BEST Robotics tools Choose Apps from the main menu August 1, 2010 Copyright 2010 BEST Robotics, Inc. All rights reserved. 6

.Best Robotics tools Choose VEX Companion September 20 th, 2014 Bison BEST 7

Using VEX Support Mathworks VEX support is embedded in Simulink, which is accessed using the following interface September 20 th, 2014 Bison BEST 8

MATLAB Simulink Simulink is MATLAB s graphical programming interface. Programming is accomplished by connecting various graphical icons in a specific order. Simulink graphical icons are collected in what are known as Libraries. Simulink programs are known as Models The Simulink Library collection is opened by clicking the Simulink library icon August 1, 2010 Copyright 2010 BEST Robotics, Inc. All rights reserved. 9

Simulink VEX Library To open Simulink VEX Library, Click Open Library NOTE: The Library window may be hidden far to the right of your screen September 20 th, 2014 Copyright 2010 BEST Robotics, Inc. All rights reserved. 10

Before Creating your Program You must know what you want to achieve The connection layout of motors and servos to the Cortex controller. The assignment of Joystick keys and their intended control functions. How the joysticks will control the motors and servos Any other interaction between the Cortex controller and the hardware such as sensors September 20 th, 2014 Bison BEST 11

The Typical BEST Robot Model The robot can be driven either in Tank or in Arcade mode. The joystick has four analog channels and four digital channels The controller can drive Up to 10 motors and servos in analog mode Up to 4 servos in digital mode Can read up to 8 analog sensors (such as potentiometers) Can read up to 8 digital sensors (such as limit switches) Simulink library has an icon for each of the possible functions: to read the joystick, to drive motors and servos, and to read sensors. Our example robot will run in arcade driven by two motors; there will be two actuator motors, one with a limit switch and four servos Analog joysticks to motors and digital sticks to servos September 20 th, 2014 Copyright 2010 BEST Robotics, Inc. All rights reserved. 12

Creating a Simulink Robot Program Open a robot model window by clicking the Create new model button on the VEX Support Package Companion menu September 20 th, 2014 Bison BEST 13

The BEST Robot Model August 1, 2010 Copyright 2010 BEST Robotics, Inc. All rights reserved. 14

Reading the Joystick Signals 4 Analog Signals 4 Digital Signals 4 Accelerometer Signals Accelerometer rotate left limit - 127 The joystick and accelerometer limit return values are +127 and -127 as shown in the figure. The buttons have a return value of 0 when pressed and 1 when released. - 127 + 127 + 127-127 + 127 + 127 Accelerometer rotate forward limit + 127 Accelerometer rotate back limit - 127-127 - 127 X Axis Y Axis Accelerometer rotate right limit + 127 September 20 th, 2014 Copyright 2010 BEST Robotics, Inc. All rights reserved. 15

September 20 th, 2014 Copyright 2010 BEST Robotics, Inc. All rights reserved. 16

Start building your robot Click and drag one Game pad button and one one game pad joystick. September 20 th, 2014 Bison BEST 17

robot building Make four copies of gamepad joystick and four copies of gamepad buttons September 20 th, 2014 Bison BEST 18

Actuating Motors and Servos September 20 th, 2014 Copyright 2010 BEST Robotics, Inc. All rights reserved. 19

Actuator Controls August 1, 2010 Copyright 2010 BEST Robotics, Inc. All rights reserved. 20

Add motors and Servos August 1, 2010 Copyright 2010 BEST Robotics, Inc. All rights reserved. 21

Other Model Functions August 1, 2010 Copyright 2010 BEST Robotics, Inc. All rights reserved. 22

Contents of the Utilities module September 20 th, 2014 Bison BEST 23

Motors Drag the Arcade module into your model. Connect two motors and two analog joysticks as Drag the two digital inputs (to serve as limit switches) and one Limit switch control block in the model. Connect the motor, limit switch and joystick September 20 th, 2014 Bison BEST 24

Bring as Many Functions as Needed, and Connect September 20, 2014 Copyright 2010 BEST Robotics, Inc. All rights reserved. 25

Now, Set the Channels August 1, 2010 Copyright 2010 BEST Robotics, Inc. All rights reserved. 26

Channles for the Digital Input Limit Switches September 20 th, 2014 Bison BEST 27

Working with Digital Joysticks Analog joysticks spits numbers from -127 to +127, i.e. while digital joysticks spits only two numbers, 0 and 1. Therefore, digital joystick commands are ON and OFF only, there are no intermediate values. You can have slow and high speeds or stop the servo in between fully open and fully closed. When a digital joystick is connected to the servo, we need to translate its value of 1 as 127using a multiplier Open the Mathematical tools library, and get a GAIN September 20 th, 2014 Bison BEST 28

Drag the Gain icon and make as many copies as the digital joysticks that you have September 20 th, 2014 Bison BEST 29

Set the multiplier Double click the gain to open its properties window Set a Gain or multiplier of 127 for all digital joysticks that drive servos (or motors) September 20 th, 2014 Bison BEST 30

The final model September 20 th, 2014 Bison BEST 31

After Building the Model Save the simulink model file You may want to Simulate the model before downloading into your Vex Controller. Open the utilities block again (if it is closed) Pay attention to the Simulation Input, and the Simulation Output collections August 1, 2010 Copyright 2010 BEST Robotics, Inc. All rights reserved. 32

August 1, 2010 Copyright 2010 BEST Robotics, Inc. All rights reserved. 33

Simulating the Arcade Pull a variable input, a the field simulator and a toggle. Make as mane copies as necessary Connect the variable inputs to the inputs of the joysticks Connect the toggles to the inputs of the joysticks Connect the field simulator to the two drive motors August 1, 2010 Copyright 2010 BEST Robotics, Inc. All rights reserved. 34

Simulation Control August 1, 2010 Copyright 2010 BEST Robotics, Inc. All rights reserved. 35

After Simulation Remove all simulation signals Save your model file Compile the model to generate C-codes and upload into Cortex microcontroller. Make sure Cortex is connected Choose Code-> C/C++ Code -> Build Model August 1, 2010 Copyright 2010 BEST Robotics, Inc. All rights reserved. 36

Additional support http://www.mathworks.com/academia/student-competitions/best-robotics/ September 20 th, 2014 Bison BEST 37