Professional Documents
Culture Documents
CPX-CEC-C1 t CMMP-AS
CMMP AS MASTER/SLAVE
/
CONTROLLER: CPX-CEC-C1 to CMMP-AS Controller
CONTROLLER FIRMWARE: See “PLC
PLC Controller Information
Information” Page
CODESYS VERSION: CoDeSys V2.3.9.28 Build May 25 2011
FCT VERSION
VERSION: S “Servo
See “S
Servo Controller
C ll IInformation
Information”
f i ”PPage
FCT PLUGIN VERSION
VERSION: V1 4 2 5
V1.4.2.5
CONTROL METHOD
METHOD: CAN p n FHPP (F
CANopen ((Festo
st HHandling
ndling
gPPositioning
siti ning
g Pr
Profile)
fil ) tto M
Master,
st r, Sl
Slave is S
Synchronized
ynchr ni d to
t
Master via simulated encoder signalg from X11 to X10 Connector
Steven Proud
R i
Regional l Contact
C Center
C Product
P d Support
S A
Agent
El t i D
Electric Drives,
i ,S Servo P
Pneumatic
ti SSystems
y t & Vi
Vision
i
T l 905
Tel: 905-614-2761
614 2761
Steven Proud@ca Festo com
Steven.Proud@ca.Festo.com
Application Description:
Description
(CPX CEC C1) to communicate via CANopen (FHPP) to a controller (MASTER) while the 2nd controller
Configuration information for a main PLC (CPX-CEC-C1)
(SLAVE) is synchronized/geared to the controller Master via a hardwired encoder cable.
cable
Your right and ability to use the code contents are limited, subject to the terms and conditions as stated herein.
You will not use the attached content for any purpose or in any manner that is unlawful or that violates any intellectual property right,
right
privacy right,
right or other right of Festo or any third party.
party
The
h copyright
h in the
h materiall attached
h d is h
held
ld b
by Steven Proud.
d
Y may not delete
You d l or alter
l or attempt to delete
d l or alter
l any attribution,
ib i llegall notice,
i trademark
d k or copyright
i h notice
i appearing
i on any
attached
tt h d content
t t and d such
h notices
ti or marks
k mustt b
be iincluded
l d d on anyy copy
py yyou make.k
You must take your own precautions to ensure that whatever content you have been supplied from the attachments is free of computer
viruses or Trojan horses that may interfere with or damage the functionality of the operations of your or any third party computer system.
system
X04
CANopen X04
CANopen
CAN b
bus (CANopen/CAN
(CAN /CAN I/O)
Ethernet
Ethernett Switch
Eth S it h
IP Address: 192.168.2.1
Laptop Subnet: 255.255.255.0
255 255 255 0
IP Add
Address: 192.168.2.108
192 168 2 108
Subnet:
Sub et: 255.255.255.0
55. 55. 55.0
Gateway: 192.168.2.1
192 168 2 1
Features:
CPX-CEC
CPX CEC (CoDeSys Embedded Controller)
CPU Marvell PXA 255 / 400 Mhz : very fast,
fast very low power consumption!
OS Linux
CoDeSys pbF ((Provided By Festo)) V2.3 / 32 bit Full RTS kernel : IEC 61131
61131-3
3 standard
32 MB SDRAM
32 MB FlFlash
h
Diagnostic
g p y (LED)
status display ( )
Therefore
Therefore: Interfaces
Interfaces:
20 MB User Flash Memory 1 x Ethernet 100 BaseT
8 MB max.
max Project memory 1 x CANopen Master
32 KB backup RAM 1 x Handheld MMI
1ms minimum cycle time
Software:
CoDeSys pbF (Provided By Festo) V2.3
V2 3
SLAVE
Th totall utilization
The ili i on the
h Fi
Fieldbus
ldb will
ill then
h beb 16
6 Bytes
B off IInput/Output
/O D
Data.
The CMMP-AS
Th CMMP AS controller
o troll r h
hass the
th ability
bilityy to access
ss additional
dditio l data
d t from
fro the
th controller
o troll r which
hi h is th
then ““polled/streamed”
poll d/str
/ d” without
itho t using
si g the
th FPC ((Festo
(F sto
Parameter Channel) instruction calls.
calls This data is setupp within the “Edit” button shown below.
below
T g
To go online,
li , click
li k th
the red
d “C
“Connection”
ti ” as shown:
h
When you
y have entered the online mode the icon will change to green as shown here:
here
NOTE: If you
NOTE y don’t
d ’t see the
th bottom
b tt ttabs
ab a as shown
h below,
b l , yyou may
ay need
d
t activate
to ti t ththem as shown
h tto th
the lleft
ft “C
“Component”
p t” d
drop
pddown menu.
N select
Now l t th
the “T
“Target
g tSSetting”
tti g” defaults
d f lt as shown
h here.
h
Clickk on
Cli o the
th
t “CANopen-Master”
“CANop Mastt ” sub-element
sub l t and
a d select
s l t the
th
t CAN Parameters
Pa a t s Tab.
Tab.
M dify th
Modify the configuration
fig ti to t match
t h what
h t is
i shown
h h
here.
•3S
3S CanDriver.Lib
3S_CanDriver.Lib
C Di Lib
P f
Perform the
th bbasic
i CAN controller
t ll ffunctions
ti
•3S_CanOpenManager.lib
•3S CanOpenManager lib
Basic functions and services for CANopen
•3S
3S_CanOpenMaster.lib
CanOpenMaster lib
Functions and services for the CANopen Master
•EDS
EDS fil
files ffor each
h slave
l
Form p
part of the user's CANopen
p network
NOTE:
C
CoDeSys
S also
l offers
ff 3S
3S_CanOpenNetVar.lib
S C
CanOpenNetVar.lib
O lib and
d 3S_CanOpenDevice.lib
3S
S C
CanOpenDevice.lib
O i lib libraries,
lib i although
lh h these
h cannot currently
l bbe used
d on the
h FED
FED-CEC.
C C
CEC.
CMMP AS FAQ Master
CMMP-AS M t Slave
Sl X1 A_B
A B Synchronization
S h i ti ca0pro.pptx
0 t 2012 06 12
2012-06-12 P
Page 40
C DeSys
CoDeSys
Co S C CPX C
CPX-CEC-C1
CEC
CCC1 Library
Lib
b a y Sett
S i gs
Settings
Download the latest CoDeSys Festo Motion Function Block Library at the following address: Run the “exe”
exe file to unzip the EDS Files
Files.
https://www festo com/net/enus us/SupportPortal/default aspx?q=CMMP-as&tab=5&s=t
https://www.festo.com/net/enus_us/SupportPortal/default.aspx?q CMMP as&tab 5&s t
Copy the unzipped “required”
required files into the
C D S Target
CoDeSys T directory
di c:\Program
\P
Fil \\F t \\C D Sy
Files\Festo\CoDeSys
V2 3\T g t \F t \CPX CEC\Lib y\
V2.3\Targets\Festo\CPX-CEC\Library\
Right
g Click in the Libraryy window and select “Additional Library…”
Libraryy ”
S l
Select the
h File
il you placed
l d iin the
h di
directory iin the
h earlier
li step to b
bring
i the
h
lb
library into your project for
f use.
use
On th
O the “R
“Resources”” ttab,
b, S
Select
l t the
th “Task
“T k Configuration”
C fig ti ” and d then
th g go tto “S
“System
y t E
Events”.
t ”
Click the “Start” event and then click on the right
g side and p
press the F2 function key
key.
y Select your
y initialize routine for the CAN-Bus.
CAN Bus
NOTE: Using
NOTE U i g the
th built
b ilt in
i controls
t l are a quick
q i k andd easyy
way
ay to
t deter
determine
ine if p
project
r jject settings
g are cconfigured
nfigured
g and
workinggp
properly
p y without writing g much code at all.
all
FFesto
t Handling
H dli g and
d Positioning
P iti i g
Profile (FHPP) Uniform fieldbus data profile
p for position
p controllers
Parameter access as per
p the "Festo
Festo Handling and Positioning Profile
Profile"
Festo Parameter Channel (FPC) (I/O messaging
messaging, optionally additional 88−byte
byte I/O)
Defines the sequence control as per the "Festo
Festo Handling and Positioning Profile
Profile"
FHPP standard (I/O messaging
messaging, 8−byte I/O)
In addition,
addition it defines the following so that they are largely uniform for the user:
The operating modes
I/O data structure
Parameter objects
bj
Seque
S
Sequence ce control
co t oll
C t l and
Control d St
Status
t d data
t (FHPP StStandard)
d d)
C
Communication
i ti over ththe fi
fieldbus
ldb iis effected
ff t d b
byy
wayy off 8−byte
8 byt control
t l andd status
t t d data.
t FFunctions
ti
and status messages required
q in operation
p can
be written and read directly.
directly
Parametrisation (FPC)
The control system can access all parameter
values
l off the
h controller
ll via the
h ffieldbus
ldb b by means
off the
h parameter channel.
h l A further
f h 8b bytes off I/O
d t are used
data d for
f this
thi purpose.
p p
Controller
ll Firmware
i Description
i i
CMMP AS ...
CMMP−AS− Version 3.5.1501.4.1
3 5 1501 4 1 and higher Servo motor controller Premium
CMMS−AS−
CMMS AS ... Version 1.3.0.1.15
1 3 0 1 15 and higher Servo motor controller Standard
CMMS−ST−
CMMS ST ... Version 1.3.0.1.14
1 3 0 1 14 and higher Stepper motor controller
i ld Bus Communication
Field C i i
1
Control Velocity Position
2
Open access to all
3 parameters byy
p
4 reading
di andd writing
iti
n
Byte
y 1 Byte
y 2 Byte
y 3 Byte
y 4 Byte
y 5 Byte
y 6 Byte
y 7 Byte
y 8
Direct Mode
Byt 1
Byte Byt 2
Byte Byt 3
Byte Byt 4
Byte Byt 5
Byte Byt 6
Byte Byt 7
Byte Byt 8
Byte
PLC CCON CPOS CDIR Velocity
l i Target Position
ii
PLC SCON SPOS SDIR Act. Vel
Act Vel. Actual Position
Parameter Channel
B t 9
Byte B t 10
Byte B t 11
Byte B t 12
Byte B t 13
Byte B t 14
Byte B t 15
Byte B t 16
Byte
MASTER
MASTER:
To acquire
q End Stage
g Enable,
Enable the X3.2
X3 2 and
X1 21 are turned on
X1.21 on. Monitoring takes place if
required After a short required delay
required. delay, X1
X1.9
9 is
turned on.
on Finally
Finally, the Fieldbus signal
“Controller
Controller Enable
Enable” must be turned on on. The
end stage is now enabled and the controller
ready
d for
f motion.
i
SLAVE
SLAVE:
To acquire
q End Stage Enable,
Enable the X3.2
X3 2 and
X1 21 are turned on
X1.21 on. Monitoring takes place if
required After a short required delay
required.
(minimum 10ms),
10ms) X1.9
X1 9 is turned on.
on No
further action is required.
required The end stage is
now enabled
bl d andd the
h controller
ll ready
d for
f
motion.
i
MASTER:
Fieldbus is used to home this axis.
axis
Confirm no faults or warnings present
Turn the “Start
Start Homing”
Homing bit on
Wait for the “AckStart”
AckStart to confirm home is executing
Turn the
h “Start
Start Homing”
Homing bbit off
ff
Wait
W i ffor the
h “D
“Drive
Drive
i RReferenced”
Referenced
f d” status
NOTE:
DIN11 is configured for the “Disable
Disable Sync”
Sync which has the text
reversed to its function.
function In other words,
words the axis is in
synchronization when the DIN11=ON/TRUE.
DIN11=ON/TRUE
SLAVE:
SLAVE:
DIN11 ((Disable
(Di bl Sync)
Sy ) isi to
t be
b turned
t d off
ff before
b f h
homing.
i g
Confirm no faults p
present
DIN12 turned on to execute the home sequence (configured
previously).
previously)
When the correct signals have been seen,
seen the actual and Target
positions should be “0”
0 .
DIN11 (Disable Sync) is to be turned ON to enable the
S h i i
Synchronization.
NOTE:
DIN11 is configured for the “Disable
Disable Sync”
Sync which has the text
reversed to its function.
function In other words,
words the axis is in
synchronization when the DIN11
DIN11=ON/TRUE
ON/TRUE.
Now that the Master and Slave axis have been homed,
homed the Slave axis DIN11 (Disable Sync)y is to be turned ON to enable Synchronization
y To the
Master axis
axis. The Slave axis will now continuously follow the motion of the Master axis
axis.
DIL switch 2
The DIL switch 2.1
2 1 is used to enable the End Of Line resistor
The
h DIL switchh 2.2 is NOT USED and d has
h no ffunction.
NOTE: Power must be OFF
while
hil modification
difi i off the
h
switches
it h are maded
The connected CAN bus slaves are not supplied with power over the CANopen interface
interface.
Some devices (i.e.
(i e CPX-FB14) also require 24VDC on the same connector ((“CANCAN_GND
GND” and “CAN
CAN V+”)
V+ ). This power is used only by the CAN
transceiver and optocouplers if galvanic isolation of the bus node applies
applies, and supplies no power to I/O etc
etc. The current consumption is
approximately 30mA, and should remain connected to the system power supply at all times - not interrupted by an ESTOP or safety relay, etc.
CMMP ASFAQ
CAN
CMMP-AS
CANopen FAQTroubleshooting
TMaster
M bl
t Slave
Sl
h ti X1 ca0pro.pptx
A_B
A 0B Synchronization
S ht i ti ca0pro.pptx
0 t 2012 06 12
2012-06-12 P
Page 62
CANope EOL
CANopen
C O RResistor
esisto Information
I fo atio
A 1200 Ω End
E dooff Line
Li e (te
(termination)
(t i attio ) resistor
esisto
t isis required
equi edd att both
b
botth ends
e d
ds of
of the
tthe CANopen
C
CANope Fi
FieldBus.
eld
ldBus.
Thi resistor
This i t iis sometimes
ti available
il bl internally
i t lly on the
th hhardware
d or alternatively
lt ti ly mustt b
be wired
i d external.
t l
Troubleshooting:
Missing Resistors or too many resistors ((use of internal and external)) can cause malfunction of the CANopen network.
T ki a simple
Taking i l multi
multi-meter
l i meter and
d measuringi the
h resistance
i (Ohm
(Oh Value)
V l )b between the
h CAN
CAN-HH andd CAN
CAN-LL can quickly
i kl determine
d i if you h
have the
h
network
t k configured
fig d correctly.
tly
Examples
p (assumed that the connectors are attached to the hardware devices & wires connected as shown below-power
below power
p off is optional):
optional)
p
Ω
40 BAD - 3 EOL resistors are present in network – Assume both an internal and external used at one end
120 BAD - Only 1 EOL resistor is present in network – faulty termination or missing resistor can be the cause
CPX-CEC-C1
CPX CEC C1 CMMP-AS
CMMP AS
120 Ω 120 Ω
CMMP ASFAQ
CAN
CMMP-AS
CANopen FAQTroubleshooting
TMaster
M bl
t Slave
Sl
h ti X1 ca0pro.pptx
A_B
A 0B Synchronization
S ht i ti ca0pro.pptx
0 t 2012 06 12
2012-06-12 P
Page 63
CANope Ca
CANopen
C C blle Information
Cable I fo atio
For cabling
cabling,
g a shielded cable with exactlyy two twisted lead pairs
p must be used
used.
o A twisted lead pair is used to connect CAN-H
CAN H and CAN-L.
CAN L
o The cores of the other pair are used together for CAN-GND.
CAN-GND
o The screen of the cable is guided onto the CAN Shield connections for all nodes.
nodes
The use of adapter plugs is not recommended for CAN bus cabling. But if this is still necessary, make sure that metallic plug housings are used to
connect the
h cable
bl shield.
hi ld
To
T kkeep p disturbance
di t b as low
l as possible,
p ibl , motor
t cable
bl should
h ld nott be
b laid
l id p
parallel
ll l to
t signal
ig l lines,
li , motor
t cable
bl ddesigned
ig d in
i accordance
d with
ith the
th
specification,
p ifi ti , motor t cable
bl properly
p p ly shielded
hi ld d and
d earthed.
th d
For additional information on the design
g of a disturbance-free
disturbance free CAN bus cabling
cabling,
g we refer you
y to the Controller Area Network p protocol specification,
specification
p
version 2.0,
2 0 from Robert Bosch GmbH
GmbH, 1991
1991.
2p
pairs
i off 2 twisted
t i t d leads, 0 22 mm2
l d , d 0.22 Loop
L p resistance
i t < 0.2
0 2 Ω/m
Ω//
CMMP ASFAQ
CAN
CMMP-AS
CANopen FAQTroubleshooting
TMaster
M bl
t Slave
Sl
h ti X1 ca0pro.pptx
A_B
A 0B Synchronization
S ht i ti ca0pro.pptx
0 t 2012 06 12
2012-06-12 P
Page 64
CANope Co
CANopen
C C
Connector
ecto Sa
Sample
S ple
l
Manufacturer:
M a ufactu
t e : Phoenix
Phoe i CCo
Connectors
ecto
t s but
b t tth
the
e asse
assembly
bly
bl iiss
purchased
p h d ffrom FFesto
t
Type
yp Code:
Code N/A
Part # USA SA#13080746
This iis th
Thi the assembly
bly usedd iin thi
this sample
pl and
d the
th EOL
resistor is turned on at the Master Axis – the other 2
connectors are NOT connected
Optional Inputs:
Depending on the customer application needs, needs the limit switch inputs
are optionall and
d can bbe d
disabled
bl d in the
h software.
f
DIN6 Limit
Li i switch
i h 0 (Over
(Over-travel
(O travell Li
Limit
i SSwitch
i h which
hi h can bbe configured
fi d
N
Normally
lly O
Open
p or ClClosed)
d))
DIN7 Limit switch 1 (Over-travel
(Over
( travel Limit Switch which can be configured
g
Normally Open or Closed)
Outputs
The 3 outputs shown are determined by the customer application
needs and are therefore optionally wired.
wired The same status of these
outputs can b
be d
determined
i d via
i the
h Fieldbus
i ldb and d programming
i in i the
h
customer’s
custo
t e ’s PLC.
PLCC.
Optional
i l Inputs:
D
Depending
di on theh customer application
li i needs, d the
h limit
li i switch
i h
i p t are optional
inputs pti l and
d can b
be disabled
di bl d ini the
th software.
ft
DIN6 Limit switch 0 (Over-travel
(Over
( travel Limit Switch which can be
configured Normally Open or Closed)
DIN7 Limit switch 1 (Over-travel
(Over travel Limit Switch which can be
configured Normally Open or Closed)
Outputs
R
Required
i dOOutputs:
DOUT0
OU 0 Ready
Ready for
fo Operation
Ope
O attio (Determines
((Detet i es if the
tthe controller
co t olle ca
can
accept
pt commandsd – If thi
this iis off,
ff, th
the controller
t ll mayy nott b be
enabled or there mayy be a fault)