+ All Categories
Home > Documents > Programming Epson Robots – Part 2 ME 4135 – Fall 2012 Dr. R. Lindeke.

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

Date post: 23-Dec-2015
Category:
Upload: elfreda-daniel
View: 222 times
Download: 0 times
Share this document with a friend
Popular Tags:
23
Programming Epson Robots – Part 2 ME 4135 – Fall 2012 Dr. R. Lindeke
Transcript
Page 1: Programming Epson Robots – Part 2 ME 4135 – Fall 2012 Dr. R. Lindeke.

Programming Epson Robots – Part 2

ME 4135 – Fall 2012Dr. R. Lindeke

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

Overview

Safety and Movement Developing A First Program Some Cool Tools

– Pallets– SubRoutines– Etc.

Proofing w/ the Simulator Running the Robots

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

Language Constructs

Pallet: – can be a statement which defines the geometry

of the pallet Pallet #, pos1, pos2,pos3, [pos4], 5,5 # is 1 to 15 Posi’s define the corners of a 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 (#, row, column)

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

Pallet Example:

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

Pallet Example 2:

Allowed by the “Outside” Qualifier

Pallet Geometry as defined by the Pallet Statement

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

Final Example – combining Pallet Statement and Function

Row x Column positions seen as indices and jump

to an index

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

Select … Send

This is a case statement 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

Typically a ‘default series’ of statements is built in case the expression is not one ‘expected’

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

Select … Send Example:

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

Select … Send

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

construct!

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

By the way:

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

Subroutines

Use structure: – GOSub (Label)– …– Label:

Series of Statement Ends in Return Statement

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

SubRoutine Example:

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

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

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

Sub-routines can be built inside (nested) of a function if needed

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

The Syntax:

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

Examples:

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

Do … Loop

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

Do … Loops can be exited early using conditional ‘EXIT Do’ statements (usually approached with If … Then tests)

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

Do … Loop Syntax:

Add note, Condition is Optional if an ‘Infinite’ loop is

desired!

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

For … Next

Essentially a “Counted Do Loop” 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

Counter limits can be variables too

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

For … Next Syntax

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

If … Then … Else … Endif

Always available – and always helpful! Uses the results of a logical test and

Then does something (if true) … or something Else (if false and else

is defined) Also allow an IfElse Clause for a

second (or more) true statement Requires an EndIf to complete the

construct Thus it is seen as a primitive Select

Send construct

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

If … Then … Else Syntax

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

Continuing

Input Print Read Output On Off In or In SW Lots to explore and use … so see the

SPEL+Ref .pdf for full exposure

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

Using the Simulator

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:– 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


Recommended