Programming Epson Robots – Part 2 ME 4135 – Fall 2012 Dr. R. Lindeke.

Slides:



Advertisements
Similar presentations
Programming Epson Robots ME 4135 – Fall 2012 Dr. R. Lindeke.
Advertisements

1 Chapter Five Selection and Repetition. 2 Objectives How to make decisions using the if statement How to make decisions using the if-else statement How.
CHAPTER 5: Repetition Control Structure. Objectives  To develop algorithms that use DOWHILE and REPEAT.. UNTIL structures  Introduce a pseudocode for.
Creating PHP Pages Chapter 7 PHP Decisions Making.
Objectives Using functions to organize PHP code
PHP Conditions MIS 3501, Fall 2014 Jeremy Shafer Department of MIS Fox School of Business Temple University September 11, 2014.
Repeating Actions While and For Loops
PHP Functions and Control Structures. 2 Defining Functions Functions are groups of statements that you can execute as a single unit Function definitions.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Chapter 4 – C Program Control Outline 4.1Introduction.
Tutorial 12 Working with Arrays, Loops, and Conditional Statements
Chapter 5: Control Structures II (Repetition)
Chapter 4 Functions and Control Structures PHP Programming with MySQL.
CSI 101 Elements of Computing Spring 2009 Lecture # 8 Looping and Recursion Wednesday, February 25 th, 2009.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic JavaScript: Control Structure.
 2007 Pearson Education, Inc. All rights reserved C Program Control.
 2000 Prentice Hall, Inc. All rights reserved. Chapter 4 - Program Control Outline 4.1Introduction 4.2The Essentials of Repetition 4.3Counter-Controlled.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved The switch Multiple-Selection Statement switch.
Fundamentals of C and C++ Programming Control Structures and Functions.
Lecture Set 5 Control Structures Part D - Repetition with Loops.
 2000 Prentice Hall, Inc. All rights reserved. 1 Chapter 4 - Program Control Outline 4.1Introduction 4.2The Essentials of Repetition 4.3Counter-Controlled.
CIS 218 Advanced UNIX1 CIS 218 – Advanced UNIX (g)awk.
ASP.NET Programming with C# and SQL Server First Edition Chapter 3 Using Functions, Methods, and Control Structures.
Chapter 4: Decision Making with Control Structures and Statements JavaScript - Introductory.
Programming Fundamentals. Today’s lecture Decisions If else …… Switch Conditional Operators Logical Operators.
Lecture 4 C Program Control Acknowledgment The notes are adapted from those provided by Deitel & Associates, Inc. and Pearson Education Inc.
Jaeki Song ISQS6337 JAVA Lecture 04 Control Structure - Selection, and Repetition -
Programming Logic and Design Fifth Edition, Comprehensive
Flow of Control Part 1: Selection
PHP Programming with MySQL Slide 4-1 CHAPTER 4 Functions and Control Structures.
Programming Logic and Design Sixth Edition Chapter 5 Looping.
C# Programming Fundamentals Control Flow Jim Warren, COMPSCI 280 S Enterprise Software Development.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 6 Looping.
Chapter 2 Functions and Control Structures PHP Programming with MySQL 2 nd Edition.
Control Structures By Shyam Gurram. Control Structure In this chapter we have two different types of structures. Conditional Structure Iterative Control.
Saeed Ghanbartehrani Summer 2015 Lecture Notes #5: Programming Structures IE 212: Computational Methods for Industrial Engineering.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 ‏ Control Structures.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Flow Control (for) Outline 4.1Introduction 4.2The.
Algorithm Design.
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
Review, Pseudocode, Flow Charting, and Storyboarding.
A loop is a repetition control structure. body - statements to be repeated control statement - decides whether another repetition needs to be made leading.
 2000 Prentice Hall, Inc. All rights reserved. 1 Chapter 4 - Program Control Outline 4.1Introduction 4.2The Essentials of Repetition 4.3Counter-Controlled.
JavaScript, Fourth Edition
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 10 - JavaScript/JScript: Control Structures II Outline 10.1Introduction 10.2Essentials of.
Chapter 15 JavaScript: Part III The Web Warrior Guide to Web Design Technologies.
Lecture 26: Reusable Methods: Enviable Sloth. Creating Function M-files User defined functions are stored as M- files To use them, they must be in the.
Matlab tutorial course Lesson 4: Writing your own functions: programming constructs
 In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached.  PHP Loops :  In.
Working with Loops, Conditional Statements, and Arrays.
Application development with Java Lecture 6 Rina Zviel-Girshin.
CRE Programming Club - Class 4 Robert Eckstein and Robert Heard.
Chapter 2: Fundamental Programming Structures in Java Adapted from MIT AITI Slides Control Structures.
Java Programming: From Problem Analysis to Program Design, 3e Chapter 5 Control Structures II: Repetition.
Flow Control in Imperative Languages. Activity 1 What does the word: ‘Imperative’ mean? 5mins …having CONTROL and ORDER!
C Program Control September 15, OBJECTIVES The essentials of counter-controlled repetition. To use the for and do...while repetition statements.
Chapter 4 – C Program Control
Chapter 6: Loops.
- Standard C Statements
Introduction To Flowcharting
ITM 352 Flow-Control: Loops
Structured Program
Chapter 4 - Program Control
Objectives In this chapter, you will:
2.6 The if/else Selection Structure
Chapter 4 - Program Control
The structure of programming
Thinking procedurally
REPETITION Why Repetition?
Presentation transcript:

Programming Epson Robots – Part 2 ME 4135 – Fall 2012 Dr. R. Lindeke

Overview Safety and Movement Safety and Movement Developing A First Program Developing A First Program Some Cool Tools Some Cool Tools –Pallets –SubRoutines –Etc. Proofing w/ the Simulator Proofing w/ the Simulator Running the Robots Running the Robots

Language Constructs Pallet: Pallet: –can be a statement which defines the geometry of the pallet Pallet #, pos1, pos2,pos3, [pos4], 5,5 Pallet #, pos1, pos2,pos3, [pos4], 5,5 # is 1 to 15 # is 1 to 15 Posi’s define the corners of a pallet Posi’s define the corners of a pallet 5,5 define the array of positions on the pallet 5,5 define the array of positions on the pallet –Can be a function that defines one of the “indexes” or row x column positions on a previously defined pallet (can be used with motion commands) Pallet (#, Index) Pallet (#, Index) Pallet (#, row, column) Pallet (#, row, column)

Pallet Example:

Pallet Example 2: Allowed by the “Outside” Qualifier Pallet Geometry as defined by the Pallet Statement

Final Example – combining Pallet Statement and Function Row x Column positions seen as indices and jump to an index

Select … Send This is a case statement This is a case statement One set of a series of statements will be executed depending on the value of an “expression” One set of a series of statements will be executed depending on the value of an “expression” Each of the series of potential statements for execution is identified as a numbered ‘Case’ which will be executed if the expression equals that case value Each of the series of potential statements for execution is identified as a numbered ‘Case’ which will be executed if the expression equals that case value Typically a ‘default series’ of statements is built in case the expression is not one ‘expected’ Typically a ‘default series’ of statements is built in case the expression is not one ‘expected’

Select … Send Example:

Select … Send The expression source can be external! The expression source can be external! It can be from a set of Physical Inputs It can be from a set of Physical Inputs It can be from a set of Memory Inputs It can be from a set of Memory Inputs It can be From a READ statement It can be From a READ statement It can be from an INPUT statement It can be from an INPUT statement This is a very powerful logic flow construct! This is a very powerful logic flow construct!

By the way:

Subroutines Use structure: Use structure: –GOSub (Label) –… –Label: Series of Statement Series of Statement Ends in Return Statement Ends in Return Statement

SubRoutine Example:

Function … Fend A function is a series of statements that are executed upon calling (like sub-routine) but can return a value to the CALL (xqt) statement A function is a series of statements that are executed upon calling (like sub-routine) but can return a value to the CALL (xqt) statement The return variable type is specified during Function Definition The return variable type is specified during Function Definition A argument list (set of variables) can be passed into a function from the “Calling” function A argument list (set of variables) can be passed into a function from the “Calling” function Sub-routines can be built inside (nested) of a function if needed Sub-routines can be built inside (nested) of a function if needed

The Syntax:

Examples:

Do … Loop Is a ‘struct’ that repeats a series of instruction While or Until a condition becomes true Is a ‘struct’ that repeats a series of instruction While or Until a condition becomes true It is typically used as an overall “Wrapper” to assure that a program will continue indefinitely as long as the operation is needed It is typically used as an overall “Wrapper” to assure that a program will continue indefinitely as long as the operation is needed Do … Loops can be exited early using conditional ‘EXIT Do’ statements (usually approached with If … Then tests) Do … Loops can be exited early using conditional ‘EXIT Do’ statements (usually approached with If … Then tests)

Do … Loop Syntax: Add note, Condition is Optional if an ‘Infinite’ loop is desired!

For … Next Essentially a “Counted Do Loop” Essentially a “Counted Do Loop” A series of statements are executed a predetermined number of time as set by code or input value A series of statements are executed a predetermined number of time as set by code or input value Requires a countable variable to record repetitions Requires a countable variable to record repetitions Counter limits can be variables too Counter limits can be variables too

For … Next Syntax

If … Then … Else … Endif Always available – and always helpful! Always available – and always helpful! Uses the results of a logical test and Then does something (if true) Uses the results of a logical test and Then does something (if true) … or something Else (if false and else is defined) … or something Else (if false and else is defined) Also allow an IfElse Clause for a second (or more) true statement Also allow an IfElse Clause for a second (or more) true statement Requires an EndIf to complete the construct Requires an EndIf to complete the construct Thus it is seen as a primitive Select Send construct Thus it is seen as a primitive Select Send construct

If … Then … Else Syntax

Continuing Input Input Print Print Read Read Output Output On On Off Off In or In SW In or In SW Lots to explore and use … so see the SPEL+Ref.pdf for full exposure Lots to explore and use … so see the SPEL+Ref.pdf for full exposure

Using the Simulator Can add object to the workspace Can add object to the workspace –Spheres, cylinders, boxes, planes, walls –Can import CAD objects –Can add tooling to end-of-arm Simulation it is designed to check: Simulation it is designed to check: –Timing of programs to explore optimal path control –Collisions in space between robot and objects –Operation of the arm and end effectors It is possible to capture video of the simulation for demonstration and off-line study It is possible to capture video of the simulation for demonstration and off-line study