Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Programming Epson Robots – Part 2 ME 4135 – Fall 2012 Dr. R. Lindeke."— Presentation transcript:

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

2 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

3 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)

4 Pallet Example:

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

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

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

8 Select … Send Example:

9 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!

10 By the way:

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

12 SubRoutine Example:

13 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

14 The Syntax:

15 Examples:

16 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)

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

18 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

19 For … Next Syntax

20 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

21 If … Then … Else Syntax

22 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

23 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


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

Similar presentations


Ads by Google