Upload
electromate
View
1.041
Download
2
Tags:
Embed Size (px)
Citation preview
EPOS P 24/5 Features and Programming
FunctionalityPerformanceCommunicationTermsProgramming Tool: ProjectsBasics of the PLC ProgrammingProgramming Language IEC 61131-3 StandardSample Programs
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
2, ©
bym
axon
mot
orag
, Jan
05
What is the EPOS P?CAN-master + EPOS 24/5– programmable, stand alone operation
CA
N I/
F
PLC
CAN bus
EPOS
EPOS P ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
3, ©
bym
axon
mot
orag
, Jan
05
What is the EPOS P?same basic functionality as a motion controller as the EPOSCAN master functionality
EPOS
EPOS P
CAN bus
other CANopen modules
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
4, ©
bym
axon
mot
orag
, Jan
05
CAN master functionalityEPOS
maxon is responsible for EPOS (slaves) User has to care about CANopenUser is responsible for CANopen masterUser is responsible – for programming– for first installation– for debugging and service
EPOS Pmaxon is responsible for EPOS P and EPOSForget CANopen!
maxon is responsible for CANopen masterUser is responsible – for programming– for first installation– for debugging and service
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
5, ©
bym
axon
mot
orag
, Jan
05
Performance of the EPOS PSame as the EPOS 24/5– Supply voltage, current, motor voltage– Motor and encoder– Communication, I/O– Connectors and pin assignments– Footprint
Power Range– 24V/5A version only– No EPOS P 24/1 or EPOS P 70/10
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
6, ©
bym
axon
mot
orag
, Jan
05
P = ProgrammablePrograms or logical sequences are stored within the EPOS P and can be executed by simple commands or inputs.
Possibility for programming– Write and edit a program– Save and execute a program
Consequences– Additional memory needed to store program– CANopen driver– PC tool for writing programs: OpenPCS– New user interface: EPOS STUDIO (replaces EPOS GUI)– Upgrade EPOS Firmware ELECTROMATE
Toll Free Phone (877) SERVO98Toll Free Fax (877) SERV099
Sold & Serviced By:
7, ©
bym
axon
mot
orag
, Jan
05
Programming Standard IEC 61131-3Well known in the PLC world and in the motion control industryUnique for small power drives
– Direct competitors use proprietary programming languages
Motion function Libraries Advantages
– Programming language independent of hardware– Reusability of the programs– No need to learn a new language: same “look and feel” for
programmer– Widely accepted
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
8, ©
bym
axon
mot
orag
, Jan
05
program flow controlled by – internal events (time, current, position, speed...)– external events (digital inputs, CAN inputs)
Standalone Operation
PC for programming only
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
9, ©
bym
axon
mot
orag
, Jan
05
Is the EPOS P a PlC?Yes, because…– No additional master system (PC or PLC) is necessary– It is programmed similar to a PLC
But…– Primarily intended for motion control functions– EPOS P contains an EPOS (motion controller) internally
HenceThe EPOS P is a “small PLC specially designed for motion control”
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
10,
©by
max
on m
otor
ag, J
an 0
5
Memory Performance1MB memory– More than 700KB for programming
Typical motion program < 100KBReal PLC up to 10MB (e.g. Siemens S7)
1KB non volatile memory– For RETAIN variables
1 position ~ 40bytes
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
11,
©by
max
on m
otor
ag, J
an 0
5
CPU PerformanceTypically 2.5ms for 5,000 Lines of IL– Means that the processor needs about 2.5 ms to go through a 5,000
line program written in Instruction List (IL).– Included in this 2.5ms is a communication offset of about 1.5ms
For reloading a new taski.e. for 10,000 lines of IL the system needs less than 4ms.
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
12,
©by
max
on m
otor
ag, J
an 0
5
CommunicationCANopen (same as EPOS)– Typical time needed for one motion command with PDO 130µs, with
SDO 2X130µs– For up to 32 CANopen motion axes– For up to 127 CANopen devices
PLC cycle time– Lies at about 2ms for small programs– Similar to an average PLC
Performance– Depends very much on the written program size and method
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
13,
©by
max
on m
otor
ag, J
an 0
5
Multi Axis and SynchronizationAbility to program a synchronized multi axis application– PLC programming and motion control Knowhow needed– Basic CANopen Knowledge needed
We expect that about 3 axis may be synchronized at 2ms cycle time
Remarks:– Not all multi axis systems need synchronization
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
14,
©by
max
on m
otor
ag, J
an 0
5
Other CANopen devicesEPOS P can control other CANopen devices, e.g.:– Digital I/O– Analog Inputs– Absolute sensors with CANopen interface– Displays– CANopen devices: http://www.can-cia.org/products/pg2006/– Maxon Motor does not produce any of these devices
Prerequisite– CANopen Knowledge– Trainings are offered from CIA or IXXAT…
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
15,
©by
max
on m
otor
ag, J
an 0
5
Description of some termsPLC Programmable Logic Control
PLCopen An Industrial Control organisation
IEC 61131-3 Programming Standard created by PLCopen (in the past IEC 1131)
OpenPCS Programming tool for EPOS P(from Infoteam)
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
16,
©by
max
on m
otor
ag, J
an 0
5
What is a PLC?
roots in the wiring logic– originally hardware based: Relays
increasingly software based– more flexible, easier to modify– more efficient, lower costs
needs a programming device– industrial PC = PLC + programming device– programming device will be removed after programming
special requirements: rough environment– no moving parts such as harddisks
PLCinputssensors
outputsactuatorsmotors, valves
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
17,
©by
max
on m
otor
ag, J
an 0
5
A PLC program works in a cyclic mannerCyclic calculation of the output pattern according to the input pattern– it starts again when it’s finished – no inputs during the cycle
cycle time depends on the application
smart living technology: < min;drives: several ms
particular programming languages
program
inputs
outputs
cycle time
inputs
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
18,
©by
max
on m
otor
ag, J
an 0
5
What is PLCopen?User organisation for the promotion ofIEC 61131-3 standardsdevelops and publishes the standards (e.g. for Motion Control, Safety, …)certification authority
PLCopen and maxon EPOS P– motion functionality based on PLCopen Motion
Control
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
19,
©by
max
on m
otor
ag, J
an 0
5
What is IEC 61131-3 ?describes concepts and directives for building a PLC project, respectively PLC program– use of defined terms (key words)– contains 5 equal programming languages– drive/motion function library
advantages– widely spread in the PLC world and motion control industry– well known “look and feel”, no need to learn new language– independent of used hardware– “a certain” re-usability of PLC programs– widely accepted
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
20,
©by
max
on m
otor
ag, J
an 0
5
OpenPCSthe programming tool for the EPOS P– from company: Infoteam
follows the standard IEC 61131-3
not described in the IEC 61131-3 standard:– How does a program editor have to look?– management of projects and libraries– documentation– online functions, e.g. software modification, debugging– file and data base structures
and this is where the programming tools differ! ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
21,
©by
max
on m
otor
ag, J
an 0
5
ConfigurationPLC configuration in generalProject in the EPOS-StudioProject in the OpenPCS
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
22,
©by
max
on m
otor
ag, J
an 0
5
Project in the EPOS Studio
Project in the EPOS Studio– describes involved components
and its communication– EPOS P: for 1 EPOS P– EPOS: for 1 EPOS– MCD EPOS: for 1 MCD EPOS– MCD EPOS P: for 1 MCDEPOS P– For Network: Create New Project– Info will be handed over to
OpenPCS
tools and wizards depend on involved components communication, network connections
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
23,
©by
max
on m
otor
ag, J
an 0
5
e.g. EPOS Projectfor a EPOSnavigation is adjusted
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
24,
©by
max
on m
otor
ag, J
an 0
5
OpenPCS Projectproject contains– resources, runtime programs– allocation of variables to physical PLC
addresses– references to other programs: global
variables, data types– corresponds to PLC configuration
resource = processing unit of the PLC– e.g.: EPOS P “master function", CPU’s, special processors– on one resource several runtime programs can run
program sequence controlled by "Task"– importance = priority– execution type: periodic, cyclic, interrupt
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
25,
©by
max
on m
otor
ag, J
an 0
5
ProgrammingPOU Program Organisation Unit
Programs, Function Blocks, Functions
Variables declaration, typesProgramming languages
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
26,
©by
max
on m
otor
ag, J
an 0
5
Program Organisation Unit (POU)
For structuring IEC 61131-3 application programs3 types of POU– Functions (FUN)– Function Blocks (FB)– Programs (PROG)
PROG
FB
FB
FUN
FUN FUN
FUNFUN
POU’ s have a strict hierarchy– recursion is not allowed– memory demand is known from the beginning– memory allocation can be made ELECTROMATE
Toll Free Phone (877) SERVO98Toll Free Fax (877) SERV099
Sold & Serviced By:
27,
©by
max
on m
otor
ag, J
an 0
5
Program Organisation Unit (POU)
structure of a POU– begin and end with KEY WORD
(taken care of by OpenPCS)1. declaration section
interface variables, local variables2. instruction section in one of the 5
programming languages
Interfacevariables
local Variables
InstructionPOU body
FUNCTION
END_FUNCTION
FUNCTION_BLOCKPROGRAM
END_FUNCTION_BLOCKEND_PROGRAMM
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
28,
©by
max
on m
otor
ag, J
an 0
5
Characteristics of POU‘sclosed unit– can be compiled independently– can be called within the whole project– can be used in the whole project– unique name within a project
new POU– File -> New -> POU
libraries can be built of FUN’s and FB’s– reusability and modularisation– e.g.: standard library, MC library, CAN library
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
29,
©by
max
on m
otor
ag, J
an 0
5
POU – variable declarationVAR local dataVAR_INPUT input parameterVAR_OUTPUT output parameterVAR_INOUT input and outputVAR_GLOBAL global dataVAR_EXTERNAL reference to
global dataEND_VAR key word
for the endELECTROMATE
Toll Free Phone (877) SERVO98Toll Free Fax (877) SERV099
Sold & Serviced By:
30,
©by
max
on m
otor
ag, J
an 0
5
POU – type declarationfor each variable a type has to be defined
optionally an initial value can be specified– else standard value– or value of previous call
types can also be defined by the programmer– File -> New -> Declarations ->Types– global valid– TYPE … END_TYPE ELECTROMATE
Toll Free Phone (877) SERVO98Toll Free Fax (877) SERV099
Sold & Serviced By:
31,
©by
max
on m
otor
ag, J
an 0
5
Variable declaration in OpenPCSVAR_GLOBAL– global data of the resource
File -> New -> Declarations -> Global
– global data of the programupper panel of the program
all other VAR– upper panel of the POU
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
32,
©by
max
on m
otor
ag, J
an 0
5
Functions (FUN)return exactly one output value– call with input variable (VAR_INPUT)– for the same input, there is always the same output value
without memory– only local variables allowed (VAR), which will be
initialised at every call– no global or external variables allowed
FUN can only call other functionsstandard functions are predefined– arithmetic functions and comparisons– e.g. sin (x)
FUNCTION Hallo: BOOLVAR…END_VAR……Hallo := TRUEEND_FUNCTION
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
33,
©by
max
on m
otor
ag, J
an 0
5
Function Blocks (FB)work with an own data record– with memory for internal state– instantiation
output depends on the inputs and state information– input parameter and output parameter
can call FUN’s and other FB’spredefined standard FB’s– e.g. for timer and counter
predefined Motion Control FB’s– e.g. for relative movements
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
34,
©by
max
on m
otor
ag, J
an 0
5
Program (PROG)main program– “brain" of an PLC application program– There is only one instance
defines the access to the PLC periphery– allocation to the physical address (e.g. input and output of the PLC)
declaration of the variables of the whole program (VAR_GLOBAL)has no input and output parameter
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
35,
©by
max
on m
otor
ag, J
an 0
5
Programming languages in IEC 61131-3 5 equivalent programming languages– IL: Instruction List similar to assembler– ST: Structured Text similar to high level
programming language
– LD: Ladder Diagram graphical– FBD: Functional Block Diagram graphical– SFC: Sequential Function Chart graphical
It doesn’t matter with which language the user writes his program. It is even possible to write different parts (POU’s) of the program in different languages. ELECTROMATE
Toll Free Phone (877) SERVO98Toll Free Fax (877) SERV099
Sold & Serviced By:
36,
©by
max
on m
otor
ag, J
an 0
5
FBD Function Block Diagram graphical, strong accentuation of the function blocks and the functions
– Similar to LabView
relatively big overhead for parameters and FBno conditional code programmable(all FB will always be loaded and called)realistic cycle times >= 10 ms
– (@ 30 IL/ms)
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
37,
©by
max
on m
otor
ag, J
an 0
5
Sample FBD: SimpleMotionSequence
FUNCTIONwithout name
FUNCTION_BLOCKwith instantiation
variables, constants,virtual connections
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
38,
©by
max
on m
otor
ag, J
an 0
5
Librariesstandard library– for timer functions, arithmetical functions, …– see OpenPCS help
motion control (MC) library– for axis control– according to PLCopen standard– see Programming Reference 6.1
CANopen library– for reading and writing of SDO objects– according to CANopen Standard– see Programming Reference 6.2 ELECTROMATE
Toll Free Phone (877) SERVO98Toll Free Fax (877) SERV099
Sold & Serviced By:
39,
©by
max
on m
otor
ag, J
an 0
5
LD / LDD Ladder Diagram
graphical– in the style of
current logic, relay technique
– Boolean logic
widely used in USA and Asia
– Rockwell LD-Editor as reference
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
40,
©by
max
on m
otor
ag, J
an 0
5
SFC Sequential Function Chart graphicalfor process control engineering
conditions (transitions) – will be executed after
the previous step is finished
– deactivates previous step and activates next step
steps: will be executed if activated
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
41,
©by
max
on m
otor
ag, J
an 0
5
IL Instruction Listwidely used in Europetextual programming similar to assembler
– PLC assembler
line oriented– 1 line = 1 instruction
CR = current result– the virtual accumulator for
all data types
realistic cycle times:– optimised down to 1 ms
VARFirst, Second, Result: INT:=10;StringOp: String[30]:='123456789';StringRes: String[25]END_VAR…B1:LD First (* 10(INT) *)
ADD Second (* 20(INT) *)ST Result (* 20(INT) *)GT 0 (* True(BOOL) *)JMPC B2 (* because
CR=True *)JMC FarAway (* CR undefined,
reaction depends on implement.*)
B2:LD StringOp (* 123456789(String) *)
ST StringRes (* 123456789 *)ELECTROMATE
Toll Free Phone (877) SERVO98Toll Free Fax (877) SERV099
Sold & Serviced By:
42,
©by
max
on m
otor
ag, J
an 0
5
ST Structured Textwidely used in Europetextual, similar to high level language (e.g. Pascal or C+)some features
– instructions separated with “ ; ”– loops: FOR, WHILE, REPEAT– conditions: CASE,
IF…THEN…ELSIF...ELSE– complex expressions
realistic cycle times:– optimised down to 1 ms
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By:
43,
©by
max
on m
otor
ag, J
an 0
5
ELECTROMATEToll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099www.electromate.com
Sold & Serviced By: