Fagor Profibus-DP Protocol (MCP-MCPi) User manual

Type
User manual
FAGOR AUTOMATION S.COOP.
MCP/MCPi
~ Profibus-DP protocol ~
Ref.0612
2/28 - PROFIBUS-DP protocol MCP/MCPi - Ref.0612
Title MCP/MCPi. PROFIBUS-DP communications protocol.
Type of documentation Architecture, structure and communication in PROFIBUS-DP networks.
Name MAN_ MCP/MCPi_PROFIBUS-DP (in.)
Reference Ref.0612
Software From version V01.01 on (MCP) - From version V01.01 on (MCPi)
WinDDSSetup From version V06.15 on
Electronic document MAN_MCP&MCPi_PROFIBUS-DP.pdf
Headquarters FAGOR AUTOMATION S. COOP.
Bº San Andrés 19, Apdo. 144
20500 ARRASATE- MONDRAGÓN
www.fagorautomation.com
info@fagorautomation.es
Telephone: 34-943-719200
Fax: 34-943-771118 (Technical Service Department)
The information described in this manual may be subject to changes due to
technical modifications. FAGOR AUTOMATION, S. Coop. reserves the right to
change the contents of this manual without prior notice.
The contents of this manual have been verified and matched with the product
described here. Even so, it may contain involuntary errors that make it impossible
to ensure an absolute match. However, the contents of this document are regularly
checked and updated implementing the pertinent corrections in a later edition.
All rights reserved. No part of this documentation may be copied, transmitted,
transcribed, stored in a backup device or translated into another language without
Fagor Automation’s permission.
MCP/MCPi - Ref.0612 PROFIBUS-DP protocol - 3/28
WARRANTY
INITIAL WARRANTY:
All products manufactured or marketed by FAGOR carry a 12-month warranty for the end
user.
In order to prevent the possibility of having the time period from the time a product leaves our
warehouse until the end user actually receives it run against this 12-month warranty, the OEM
or distributor must communicate to FAGOR the destination, identification and installation date
of the machine by filling out the Warranty Form that comes with each product.
The starting date of the warranty for the user will be the one appearing as the installation
date of the machine on the Warranty Form.
This system ensures the 12-month warranty period for the user.
FAGOR offers a 12-month period for the OEM or distributor for selling and installing the product.
This means that the warranty starting date may be up to one year after the product has left our
warehouse so long as the warranty control sheet has been sent back to us. This translates into
the extension of warranty period to two years since the product left our warehouse. If this sheet
has not been sent to us, the warranty period ends 15 months from when the product left our
warehouse.
FAGOR is committed to repairing or replacing its products from the time when the first such
product was launched up to 8 years after such product has disappeared from the product
catalog.
It is entirely up to FAGOR to determine whether a repair is to be considered under warranty.
EXCLUDING CLAUSES:
The repair will take place at our facilities. Therefore, all shipping expenses as well as travelling
expenses incurred by technical personnel are NOT under warranty even when the unit is under
warranty.
The warranty will be applied so long as the equipment has been installed according to the
instructions, it has not been mistreated or damaged by accident or negligence and has been
handled by personnel authorized by FAGOR.
If once the service call or repair has been completed, the cause of the failure is not to be blamed
on the FAGOR product, the customer must cover all generated expenses according to current
fees.
No other implicit or explicit warranty is covered and FAGOR AUTOMATION shall not be held
responsible, under any circumstances, of the damage which could be originated.
SERVICE CONTRACTS:
Service and Maintenance Contracts are available for the customer within the warranty period
as well as outside of it.
4/28 - PROFIBUS-DP protocol MCP/MCPi - Ref.0612
DECLARATION OF CONFORMITY
Manufacturer: Fagor Automation, S. Coop.
Bº San Andrés 19, C.P. 20500, Mondragón -Guipúzcoa- (SPAIN)
We hereby declare, under our responsibility that the product:
Fagor AC Brushless Servo Drive System
consisting of the following modules and motors:
Drives modules:: MCP and MCPi series
AC Motors FXM, FKM, FSA and FSP series
mentioned on this declaration,
with the basic requirements of the European Directives 73/23/CE on Low Voltage
(Basic Safety Regulation; Electrical Equipment on Machines EN60204-1:95) and
92/31/CEon Electromagnetic Compatibility (EN 61800-3:1996, Specific Regulation
on Electromagnetic Compatibility for Servo Drive systems).
In Mondragón, 15.07.06
INTRODUCTION
This manual offers detailed description of the PROFIBUS-DP protocol on the physical
layer based on EIA RS 485 of the MCP and MCPi drives, of the PROFIBUS-DP
architecture, structure and communication in the network and on how to start up the unit.
When installed for the first time, it is a good idea to read the whole document.
Should you have any doubts or questions, please do not hesitate to contact our
technicians at any of our subsidiaries worldwide.
Thank you for choosing Fagor.
MCP/MCPi - Ref.0612 PROFIBUS-DP protocol - 5/28
GENERAL INDEX
PROFIBUS-DP PROTOCOL.......................................................................................7
Introduction............................................................................................................7
Network architecture.............................................................................................7
Structure ..................................................................................................................7
Connection cable.....................................................................................................8
Connecting the devices to the bus...........................................................................9
Maximum length.......................................................................................................9
State machine.......................................................................................................10
Types of communication.....................................................................................10
GSD files...............................................................................................................12
Governing the drive - Assembly.........................................................................12
Startup ..................................................................................................................19
Communication speed selection............................................................................19
Setting the node number........................................................................................19
Status indicator LED's............................................................................................19
Display messages..................................................................................................20
Parameters, variables and commands ..............................................................21
Velocity loop...........................................................................................................21
Current loop...........................................................................................................22
General..................................................................................................................22
Feedback...............................................................................................................23
Limits......................................................................................................................23
Home search..........................................................................................................23
Position loop ..........................................................................................................24
Commands.............................................................................................................25
Diagnosis...............................................................................................................25
Miscellaneous........................................................................................................25
6/28 - PROFIBUS-DP protocol MCP/MCPi - Ref.0612
BLANK PAGE
MCP/MCPi - Ref.0612 PROFIBUS-DP protocol - 7/28
PROFIBUS-DP PROTOCOL
Introduction
PROFIBUS (Process Field Bus) is a standard open field bus communication
protocol, independent from the manufacturer and used to control industrial
processes. It has been designed to interconnect digital I/O field devices separated
from each other and communicated at high speed in automation of manufacturing,
processes and construction.
Thus, the PROFIBUS-DP (Decentralized Periphery) profile is aimed at sensors/
actuators linked to processors (PLC's) or terminals. This DP profile describes a
system consisting of a controller and several I/O (input/output) devices separated
from each other and communicated at high speed. It uses a physical layer based on
EIA RS 485 and complies with the IEC 61158/EN 50170 standard. It has master or
active stations (stations for monitoring and diagnosis, information centralizing
elements such as PLC's, PC's, etc.) and slave or passive stations (sensors,
actuators, drives, feedback devices, etc.).
The master device communicates with the slaves of the network via the RS 485 serial
bus. A slave module is any slave that processes and returns information to the master
station. The master initiates all the communications. It requests information from the
slave devices and these in turn respond to the master's request always playing a
passive role because they have no control over the communications line.
Network architecture
Structure
A PROFIBUS network has a linear bus structure or a tree with line terminating
resistors. To build a PROFIBUS-DP, follow the data supplied in the following table
always bearing in mind that the minimum configuration consists in one master station
and one slave station.
TABLE 1.
Maximum number of slave
devices exchanging data in
the network.
126. Numbered between 0 and 125.
Maximum number of slave
devices by segment.
32. Although the maximum total number of slave devices is
126, they may be divided into groups called segments.
These segments are joined with repeaters in charge of
amplifying and renewing the signal. Using repeaters makes
it possible to isolate the segments galvanically from each
other.
Possible transmission
speeds (in kbits/s).
9.6 - 19.2 - 45.45 - 93.75 - 187.5 - 500 - 1500 - 3000 - 6000
- 12000. The same transmission speed must be selected
permitted by all the devices that make up the Profibus
network.
Maximum number of
repeaters in series.
The maximum number of repeaters that may be connected
between any two slave devices is 4 as instructed by the EN
50170 standard. This number may be higher depending on
the type of repeater and manufacturer. Refer to the product
specifications given by the manufacturer.
8/28 - PROFIBUS-DP protocol MCP/MCPi - Ref.0612
Connection cable
The interconnection of all the devices in the PROFIBUS-DP network requires a
PROFIBUS communications cable whose requirements are described in the
European standard EN 50179. Different models may be selected depending on the
type of installation and the physical structure of the cable.
The standard type-A cable has a pair of twisted wires with outside shield.
FIGURE 1.
PROFIBUS-DP network. Connection diagram for the line terminating resistors at connector
SUB-D M9 of the PROFIBUS cable according to the EN 50170 standard.
FIGURE 2.
Standard type-A PROFIBUS cable with a 9-pin male SUB-D type connector.
BUS MASTER
Segment 1
M
S
S
Segment 2
SSS
R
R
Segment 3
Slave device with
bus terminating
resistor
Repeater with bus
terminating resistor
Repeater without bus
terminating resistor
Slave device with
bus terminating
resistor
Slave device with
bus terminating resistor
Slave device with
bus terminating resistor
Slave device without
bus terminating resistor
390
Ω
220
Ω
390
Ω
VP (pin 6)
B-line (pin 3)
A-line (pin 8)
DGND (pin 5)
Important note: Line terminating resistors must be
physically installed at both ends of the PROFIBUS-DP
network and also at both ends of each segment. On
the rest, no resistor must be installed. Refer to the fig-
ure and follow the diagram to connect the resistors to
the pins of the SUB-D M9 connector. This figure pro-
vides the values of the resistors to be installed and then
the pinout of the SUB-D F9 connector of the drive that
the pin numbering refers to.
8
3
B
A
Pin
Signal
P
r
o
f
i
b
u
s
red
green
shield
3
8
SUB-D M9
Front view
1
9
5
6
Note:
the shield must be connected to the metal housing of connector SUB-D M9
MCP/MCPi - Ref.0612 PROFIBUS-DP protocol - 9/28
Connecting the devices to the bus
Each drive is connected to the device through its SUB-D F9 connector and the
PROFIBUS cable. If it is a model of the MCP family, this connector is located on its
front plate next to the rotary switches (x1, x19) and on top of the module if it belongs
to the MCPi family.
To connect all the devices to the network, all the A and B lines as well as the shields
of each module must be connected to each other.
The user must install externallythe line terminating resistors, with the indicated
values, at the two devices at both ends of the network and at the two devices
at both ends of each segments, and only there, (see the diagram of
FIGURE 1.)
to avoid rebounds during transmission.
Maximum length
When connecting the modules to each other with a standard A-type cable, the
following table shows the maximum length for each segment according to the
communication speed.
FIGURE 3.
Pinout of the 9-pin female SUB-D type connector at the drive.
Note. If the user wishes not to make the connector with the resistors, he can
always use off-the-shelf connectors available on the market, that already carry
the terminating resistor in the connector itself and the selector that enables or
disables that transmission.
TABLE 2. Maximum length per segment according to the transmission speed with
PROFIBUS-DP and using a standard A-type cable.
Data
transfer
rate in kbit/s
9.6 19.2 45.45 93.75 187.5 500 1500 3000 6000 12000
Maximum
segment length
in meters
1200 1200 1200 1200 1000 400 200 100 100 100
Pin Signal Meaning
3 B RxD / TxD - P
5 GND
Supply GND.
for the terminating resistor
6 VP
Supply +5V
for the terminating resistor
8 A RxD / TxD - N
chassis shield
Front view of the
connector.
10/28 - PROFIBUS-DP protocol MCP/MCPi - Ref.0612
State machine
In order to make it easier to understand the PROFIBUS-DP communications
protocol, we here offer a short description of the various states that a slave (passive)
device may be in.
Types of communication
The data exchange in PROFIBUS-DP is carried out by sending telegrams from the
master device to the slave device and vice versa. PROFIBUS-DP uses two types
of communication (at ISO/OSI levels, layer 2).
SRD (Send and Request Data with acknowledge)
A telegram is sent from the master device to the slave module and the latter
responds to the master with another telegram after a specified period of time.
Everything is set in a communication cycle.
FIGURE 4.
State machine.
POWER_ON
WAIT_PRM
Parameter setting
DATA_EXCH
Data exchange
WAIT_CFG
configuration
Th
e s
t
a
t
e mac
hi
ne
h
as
4
s
t
a
t
es.
Th
e
t
rans
iti
on
between them is done depending on the events
taking place between the master and the slave
devices.
POWER ON. Initial state by default afte
r
starting up the unit.
WAIT_PRM. State in which the parameters
for the slave device to operate in the network
are set (running time, watchdog, etc.).
WAIT_CFG. State in which to configure the
number of input and output bytes to exchange
when goes into DATA_EXCH. The maste
r
device runs a check on the data it receives
from the slave module. If it is not accepted, it
returns to the WAIT_PRM state.
DATA_EXCH. Master-slave I/O exchange
state. Diagnosis messages (Diagnosis Tele-
gram) and global control messages (Global
Control Telegram) may also appear.
Diagnosis Telegram. With this type o
f
messages, the master device is informed o
f
the slave module state (state of its state
machine, parameter setting, whether its
configuration is correct or not, etc.).
Global Control Telegram. The slave
modules are informed periodically about the
state of the master device.
MCP/MCPi - Ref.0612 PROFIBUS-DP protocol - 11/28
SDN (Send Data with No acknowledge)
Service used by the master device to send a message, simultaneously, to a group
of slave modules (multicast) or to all the slave modules (broadcast). None of the
slave devices responds to the message sent by the master.
Once the two types of communication are known, the general structure of a telegram
in a communication between master and slave is the following:
The user data is incorporated in the DU cell (Data Unit) specified within the given
general structure of the telegram and is limited to a maximum of 244 bytes per node
and telegram. The rest of the bytes make up the header providing the following
information:
SD. Start Delimiter. Beginning of telegram. Observe that it is repeated in two places.
LE. Length of the telegram (user data, DA, SA, FC, DSAP and SSAP).
LEr. Length of the repeated telegram.
DA. Destination Address. Destination address.
SA. Source Address. Sender's (source) direction.
FC. Function Code. Function code.
DSAP. Destination Service Access Point. Destination service access point.
SSAP. Source Service Access Point. Source service access point.
Both DSAP and SSAP may be used to define the type of service of the sent telegram.
FCS. Frame Checking Sequence. Frame testing sequence.
ED. End Delimiter. End of telegram. Always 0x16.
The header of the telegrams is 11 bytes long, except in I/O data exchange where
the header is 9 bytes long (the DSAP and the SSAP are not sent).
SD LE LEr SD DA SA FC DSPA SSAP DU FCS ED
1 byte 1 byte 1 byte 1 byte 1 byte 1 byte 1 byte 1 byte 1 byte variable 1 byte 1 byte
0x3E Configuration check data
0x3D Send parameter data
0x3C Read diagnosis data
0x3B Read configuration data
0x3A Control commands to the slave module
0x39 Read outputs
0x38 Read inputs
12/28 - PROFIBUS-DP protocol MCP/MCPi - Ref.0612
Each telegram byte is sent in 11 bits through the RS 485 as follows:
1 start bit
8 data bits
1 parity bit (even parity)
1 stop bit
Data transmission is set in NRZ mode (Non Return to Zero). The 0 or 1 signal does
not change in the duration of the bit and if there is no transmission, the line signal
stays at 1. A beginning of the transmission with a start bit causes the signal to change
to 0.
To transmit a variable of more than 8 bits (e.g. a 16-bit word type variable), it first
sends the most significant byte followed by the least significant byte.
GSD files
The information of the unit that implements the PROFIBUS protocol is in a text file
with extension GSD.
The GSD files of each one of the units that make up the network are added to the
data base of the master device making it possible to establish communication with
units from other manufacturers and other different models.
Therefore, using this file and the network configuration tool available at the master
module, set the system parameters and the network start-up.
The information contained in a GSD file is:
Name of the manufacturer, product and its version.
Protocol implemented.
Product identifier number.
Communication speeds supported
Communication time
Name of the manufacturer, product and its version,.
Governing the drive - Assembly
With PROFIBUS-DP, two data structures have been implemented (8 input bytes and
8 output bytes) called Assembly. These two structures have been thought of to be
able to govern the servo drives in real time from the master device. They consist of:
AssemblyIn that makes it possible to control the drive from the master device.
It can modify the values of its parameters and variables.
Start Byte to be transmitted. Parity Stop
0 bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7
even
1
MCP/MCPi - Ref.0612 PROFIBUS-DP protocol - 13/28
AssemblyOut that lets the drive return information on its status and, at the same
time, the values of the variables requested by the module.
AssemblyIn - Control
I_Fast: Bit to activate the fast input (as next-block event) through the communications
bus.
Starting_Block (7 bits): Indicates the block number from which it will begin
executing in the movements table.
Drive_Enable: Bit to activate the Drive Enable of the unit through the
communications bus as long the relevant hardware input is activated. The final signal
interpreted by the unit is given by a logic "AND" between the value of the physical
Drive_Enable input and the Drive_Enable bit of the AssemblyIn.
Speed _Enable: Bit to activate the Speed Enable of the unit through the
communications bus as long the relevant hardware input is activated. The final signal
interpreted by the unit is given by a logic "AND" between the value of the physical
Speed_Enable input and the Speed_Enable bit of the AssemblyIn.
Home_Switch: Bit to activate the Home_Switch (home search or reference switch)
through the communications bus.
Lim + : Bit to activate the positive travel limit switch through the communications bus.
Lim - : Bit to activate the negative travel limit switch through the communications bus.
Reset: Digital control of the Reset signal. If the drive is in manual mode (LV13 = 0),
activating this bit implies acting upon the Jog- signal. If it is in automatic mode,
activating this signal resets the movement sequencer.
Stop: Bit to interrupt the movement in progress.
Start: Digital control of the Start signal. If the drive is in manual mode (LV13 = 0),
activating this bit implies acting upon the Jog+ signal. If it is in automatic mode, there
could be two possible situtations:
When activating Start for the first time or after resetting movements, the position
sequencer will start executing the block indicated in the bits of Starting_Block.
If a Stop signal is activated while executing a block, the unit stops. If a Start signal
is then activated, the unit resumes the execution of the block right where it
stopped when the Stop signal was activated.
TABLE 3. AssemblyIn.
B7 B6 B5 B4 B3 B2 B1 B0
Byte 0 I_Fast Starting_Block
Byte 1
Drive_
Enable
Speed_
Enable
Home-
Switch
Lim - Lim+
Reset *
Jog - **
Stop
Start *
Jog + **
Byte 2 Dir_Var Bits 0-7
Byte 3
Command_
Toggle_Bit
Command Dir_Var Bits 8-12
Byte 4 Data_Byte 0
Byte 5 Data_Byte 1
Byte 6 Data_Byte 2
Byte 7 Data_Byte 3
* KernelOperationMode
LV13 = 0, i.e. in automatic mode.
** KernelOperationMode LV13 = 1, i.e. in jog mode.
14/28 - PROFIBUS-DP protocol MCP/MCPi - Ref.0612
Command: Field of the AssemblyIn that indicates the action to carry out by the
master element. Refer to the practical examples documented later on.
Dir_Var: Field of the AssemblyIn structure that depending on the command
requested by the master device can indicate either the IdA identifier of a variable or
the position block to be read/written by the master device. Refer to the practical
examples documented later on.
Command Toggle Bit: Bit for the master module to validate the command requested
in the Command bits of the AssemblyIn. This is done negating the current status of
this bit.
AssemblyOut - Status
Ref_Done:Bit that indicates to the master element that the "home search" action
has been carried out successfully.
Reg_Status: Bits that indicate the current drive status.
Warning: Bit that indicates that the drive is in a warning state.
Error Bit that indicates that an error has occurred at the drive.
In_Position: Bit that indicates that the target position of a block has been reached.
The positioning drive is within the in-position zone indicated in parameter PP57 -
Position Window -.
Speed_Enable: Bit that shows the internal status of the drive's Speed_Enable signal.
It takes into account both the physical input and the bit of the AssemblyIn.
Active_Block: Bits that indicate the number of the block of the positioning table
currently in execution.
0 Read a parameter/variable
1 Write a parameter/variable
2 Reading in the movements table
3 Writing in the movements table
TABLE 4. AssemblyOut.
B7 B6 B5 B4 B3 B2 B1 B0
Byte 0 Ref_Done Reg_Status Warning Error In_Position --- Speed_Enable
Byte 1 ------ Active_Block
Byte 2
Command_
Toggle_Bit_
Resp
Command_
Resp
Command
_Ok
Operation_Status
Byte 3
------- ------- ---- ------- ------- ------- ---- -------
Byte 4 Data_Byte_Resp 0
Byte 5 Data_Byte_Resp 1
Byte 6 Data_Byte_Resp 2
Byte 7 Data_Byte_Resp 3
(----) Reserved bits.
0 Internal Start-up test completed.
1 Control established. Waiting for power
2 Power ON. Power and control set, but without torque at the motor
3 Torque ON. Motor with torque (enabled)
MCP/MCPi - Ref.0612 PROFIBUS-DP protocol - 15/28
Command_Toggle_Bit_Resp: After receiving a new command by changing the
value of Command_Toggle_Bit, the drive starts executing it. When the execution is
over, it makes a copy of the value of Command_Toggle Bit in
Command_Toggle_Bit_Resp. Thus, the master module is informed that the
command has been completed.
Command_Resp: Reflection of the command indicated in the "Command" bits of
the AssemblyIn.
Command_OK: After receiving a new command by changing the value of
Command_Toggle_Bit; the bit "Command_OK" will be executed when the requested
command has been executed successfully. It will be set to zero whenever the
execution of the command generates errors.
Operation_Status: Bits that show the "mode" and the "status" of the unit's movement
sequencer.
Data_Byte_Resp 0-3: Data bytes that contain the data (value of the variable,
parameter or values of the positioning table) requested by the master module. The
Data_Byte_Resp 0 contains the least significant byte of the requested variable
whereas Data_Byte_Resp 3 contains the most significant byte.
FIGURE 5.
Operating mode of the drive.
STOP
5
AUTOMATIC
MODE
0
BLOCK IN EXECUTION
1
Waiting for JOG
mode to be
deactivated
12
Waiting for the
START signal
4
Reset
6
from
0-1-2-3-4-5
Change to
KernelOperationMode
JOG
MODE
10
JOG mode
working
11
KernelManMode
(INCREMENTAL)
& END OF
MOVEMENT
From all the
states
Alarm
Alarm
15
BLOCK
PAUSE
3
Waiting for the
START signal not
to be active
2
KernelStartSignal
& KernelStopSignal
& KernelResetSignal
BlockEnd
KernelResetSignal
KernelResetSignal
KernelStopSignal
Mnemonics & simbols
A
A
(A negated)
“A” signal active
X
Operation Mode
State
“A” signal not active
Example:
KernelStopSignal
KernelStopSignal
= KernelStopSignal not active
= KernelStopSignal active
from
10-11-12
Change to
KernelOperationMode
KernelStopSignal
KernelStartSignal
JogPositiveSignal
& JogNegativeSignal
& KernelStopSignal
KernelStartSignal
KernelStopSignal
KernelStopSignal
JogPositiveSignal
OR JogNegativeSignal
& KernelStopSignal
& KernelResetSignal
JogPositiveSignal
& JogNegativeSignal
(CONTINUOUS)
& KernelManMode
OR KernelResetSignal
OR KernelStopSignal
Transitions between states
16/28 - PROFIBUS-DP protocol MCP/MCPi - Ref.0612
The structure of the Assembly makes it easier for a master device to carry out various
operations with the drive using a single type of communication message. As an
example, the PLC's carry out operations cyclically with the different slave modules
using the same type of quick message.
See some practical examples that show how the master device must configure each
bit of the AssemblyIN to carry out the required operations.
To read a parameter or a variable of the drive, set the "Command" field to 0.
Then, enter in the 13 bits of the "Dir_Var" field the Id Assembly for the parameter or
variable to be read. This identifier is provided in the last column of the description
tables of the OEM-specific objects. Thus, for example, to read the SV2 variable
(velocity feedback), enter the Id Assembly value of SV2 in hexadecimal format
1282h. See TABLE 9.
Finally, set "Command_Toggle_Bit" bit to 1 to execute the command.
To write in a parameter or variable of the drive, set the "Command" field to 1.
Then, enter in the 13 bits of the "Dir_Var" field the Id Assembly for the parameter or
variable to be read. This identifier is provided in the last column of the description
tables of the OEM-specific objects. Thus, for example, to write in the parameter CP20
(current limit), enter the Id Assembly value of CP20 in hexadecimal format
245h.
See
TABLE 10.
The value to be written in the parameter or variable must be entered in the first four
data bytes and in the required units. See the units in the section on parameters,
variables and commands of the manual of the corresponding MCP or MCIPi drive.
Thus, for example, for a current limit (according to parameter CP20) of 5 A, write a
value of 500 cA (hundredths of an Amp)in the 4 "Data_Bytes"
Finally, set "Command_Toggle_Bit" bit to 1 to execute the command.
Once the slave module has received the message, it checks that the parameter exists
and tries to write in it. If it is successful, the "Command_OK" bit of the message
AssemblyOut is activated.
Structure of the assembly. Practical examples.
Note. See some practical examples that show how the master module must
configure each bit of the AssemblyIN to carry out the required operations.
Reading a parameter/variable
Writing a parameter/variable
MCP/MCPi - Ref.0612 PROFIBUS-DP protocol - 17/28
The MCP/MCPi integrate a positioning loop and a positioning feature. The sequence
of movements to be carried out by the positioning feature is programmed using a table
of 127 blocks. Each block indicates a position and it may contain the various
parameters (absolute or incremental position, maximum positioning feedrate,
activation of outputs after executing the block, etc.) that the positioning drive complies
with during the execution of the block.
It is possible to read/write all the elements that make up the movements table using
the Assembly messages. The structure of the positioning block shown in
TABLE 5.
describes the 16 words that make up the block. The most significant word is the first
one from the left (word 15) and the least significant one is the first one from the right
(word 0).
Movements table
TABLE 5. Structure of the positioning block.
Descript.
of the field
Re-
served
LOOP NEXT PROGOUT EVENT
TYPE TIME
InRpos (real) 0001h
0001h to 0080h
InTpos (theoretical) 0002h
0000h
“ OR ”
00000000h InBand 0003h 0000h
Value 0000h a Parts counter a ActSpeedReached 0004h a
FFFFh SC00h 000000FFh NextSpeedReached 0005h FFFFh
END=xxFEh
(1
“OR”
FastInput
(2
0100h
WORD Nr 15-12 11 10 9-8 7 6
Field
description
VELPOS POSDEST
VALUE MODE
Absolute 0000 0001h
00000000h 00000000h
Incremental 0000 0002h
Value to to + infinite 0000 0003h
FFFFFFFFh FFFFFFFFh - infinite 0000 0004h
stop 0000 0005h
WORD Nr 5-4 3-2 1-0
(1
Word Nr 10, <next block> has two bytes with different functions.
Low Byte: indicates the number of the next block to execute (valid values between 1 and 127 and also
254).
High Byte: SC (Conditional jump). To increment the "parts made" counter at the block (REG2), this
byte must take a value other than zero. When the parts counter matches the desired number of parts
(REG1), the next block to be executed will be the one indicated in this byte.
END (xxFEh): Regardless of the value of the high byte (xxh), entering FEh in the low byte will mean
the last block of the program.
(2
If you wish the "next block" condition to be "theoretical position reached" or the activation of the fast input,
the value to enter will be 0102h
18/28 - PROFIBUS-DP protocol MCP/MCPi - Ref.0612
To read data in the movements table of the drive, set the "Command" field of the
AssemblyIn to 2. The element of the table is selected from the field "Dir_Var". Its 8
least significant bits will indicate the number of the positioning block and the 5 most
significant bits will indicate the "word" to read within the block.
The parameter table is accessed in sets of 4 bytes and it is a must to access even
"word" numbers to avoid interpreting data incorrectly.
Example.
To read the value of the target position (words 2 and 3, where the origin is the lowest
one, i.e. 2) of block number 19, enter the hexadecimal value 213h in the "Dir_Var"
field of the AssemblyIn. Now, when the command is going to be executed, set the
"Command_Toggle_Bit" to 1.
Once the slave module has received the message, it checks that the requested
information exists and, if so, it activates the command "Commmand_OK" and returns
the target position through the AssemblyOut messages until the
Command_Toggle_Bit changes again (change of command or table data
requested).
To write data in the movements table of the drive, set the "Command" field of the
AssemblyIn to 3. The element of the table is selected from the field "Dir_Var". Its 8
least significant bits will indicate the number of the positioning block and the 5 most
significant bits will indicate the "word" to write within the block.
The parameter table is accessed in sets of 4 bytes and it is a must to access even
"word" numbers to avoid interpreting data incorrectly.
Example.
To change the type of event (next-block condition of the positioning feature, word
7) write words 6 and 7 at the same time. Thus, wen changing a block of the positioning
feature when the position loop reaches the final theoretical position (type 2 event),
write the hexadecimal value 20000h in the Data_Byte". Now, when the command is
going to be executed, set the "Command_Toggle_Bit" to 1.
Once the slave module has received the message, it checks that the data to be written
exists and, if they are written successfully, activates the command "Command_OK"
of the AssemblyOut message.
Reading the movements table
Writing in the movements table
MCP/MCPi - Ref.0612 PROFIBUS-DP protocol - 19/28
Startup
Communication speed selection
The drive has an automatic speed search function. This is selected at the master
device.
Setting the node number
Status indicator LED's
The drive has two two-color indicator LED's. They are, MS (Module Status) and
NS (Network Status). The MS indicator shows the unit status and the NS
indicator informs of the status of the unit within the PROFIBUS network.
In an initial running process of the unit, these LED's follow this sequence of states
in order to verify that everything is OK.
Note. This figure matches part of the front plate of an MCP drive. The SUB-D
F9 connector for connecting the drive to the field bus appears on the front plate
of the module next to the node selecting rotary switches as shown in the
image. If the user has an MCPi drive, the SUB-D F9 connector is not located
on the front plate of the module (as on the MCP) but on top.
T
o
id
ent
if
y any mo
d
u
l
e w
i
t
hi
n t
h
e
b
us,
i
t must
b
e
assigned a unique identifier number to differentiate it
from any other unit of the network, thus avoiding
collisions. This identifying number ID will be referred to
as node number.
The unit's node number is set using the two node
selecting rotary switches x1 and X10 (NODE). Each has
positions 0, 1, 2, ...,9. The drive will be identified in the
network with the node number assigned to it after
resetting it. According to the setting of the rotary
switches of the figure, the node number assigned to the
drive is: 0 x 10 + 1 x 1 = 1.
SUB-D F9
connector
MS
green
250 ms ON
250 ms ON
250 ms ON
250 ms ON
MS
red
NS
green
NS
red
20/28 - PROFIBUS-DP protocol MCP/MCPi - Ref.0612
MS indicator (Module Status)
This indicator informs about the unit status as such. The states that may be
reached, at this time, are:
Indicador NS (Network Status)
This indicator informs about the unit status within the PROFIBUS network. The
states that may be reached are:
Display messages
TABLE 6. MS indicator.
LED
status
Unit
status
Interpretation
Blinking green Running The drive is error free
Blinking read Error The drive is in an error state
TABLE 7. NS indicator.
LED
status
Unit
status
Meaning
OFF Communication
speed
search.
The drive does not detect any
communication speed.
1. There is no activity on the network or
2. The cable is disconnected.
Blinking green Data
is being
exchanged.
There is I/O data exchange (AssemblyIn/
AssemblyOut) between the drive module
and the master device.
Blinking red No data
is being
exchanged.
1. Watchdog. No message has been
received from the master device for a while
and since WD_ON was activated, the
protection has kicked in.
2. The master element has forced the slave
to quit this state.
3. Parameter setting or configuration
problems. See diagnosis at the master
device.
Steady red No data
is being
exchanged.
1. The node number selector is positioned
wrong or damaged or
2. The Profibus communication card is
defective or damaged.
TABLE 8. Display messages.
Error Meaning
E420 The drive has come out of the data exchange state.
E421 Error when initializing the PROFIBUS communication card.
- The node number selector is positioned wrong or damaged.
- The Profibus communication card is defective or damaged.
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28

Fagor Profibus-DP Protocol (MCP-MCPi) User manual

Type
User manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI