You are on page 1of 21

XtraDrive DP to CJ PLC System Quick Start Guide 1.

0 DRAFT Page 1 oI 21








QUICK START GUIDE
Integration of XtraDrive DP in
OMRON CJ series PLC








Version Document 1.0 (DRAFT) June 2006


XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 2 oI 21









































Mechatronics Application Center
OMRON YASKAWA B.V.

www.omron-industrial.com
XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 3 oI 21





OBJECTIVE


Objective of this guide is to introduce you in the commissioning of a system
based on CJ PLC series with a Profibus Module (PRM21) and XtraDrive (XD-**-
**D0) series.

After reading this guide you should be able to:

Establish Connection between CJ Series PLC and XtraDrive-D0
Read / Write Variables
Send direct commands.


As a quickstart guide, purpose of this document is not to fully explain XtraDrive
DP in details but, to show a practical example in order to help new users when
commissioning for the first time.


PREREQUISITES


OMRON CJ or CS series programming experience
XtraDrive series programming experience.
Profibus wiring knowledge (Profibus wiring is not covered in this guide).


XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 4 oI 21




INDEX


1 System requirements 5
2 GSD File nstallation 6
2 1 CX-Profibus 6
2 2 Device Addition and GSD nstallation 6
2 3 CJ1W-PRM21 'Basic' Online Setup 9
2 4 XtraDrive 'Basic' Online Setup 10
2 5 Understanding Profibus Mapping in the PLC 14
3 Operation 16
3 1 Read and Write variables 16
3 2 Command Execution (XtraDrive commands) 18
4 Conclusions 21





XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 5 oI 21

1 SYSTEM REQUIREMENTS

Minimum system requirements to follow explanations and examples contained in
this guide:

CJ1W-P* (PLC Power Supply)
CJ1* CPU Processor
CJ1W-PRM21 (Profibus Module)
CX-One 1.0 or higher Software
CS1W-CN226 (PLC Programming cable*)
XD-**.**-D0 (XtraDrive with Profibus Embedded)
Xtraware 3.0 or higher (XtraDrive's programming software).

*User may optionally connect to PLC by using different media.



XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 6 oI 21

2 CONFIGURATION USING CX-PROFIBUS


2.1 CX-Profibus.

CX-Profibus (included in CX-ONE Package) software is used to configure
CJ1W-PRM21 Profibus Device and XtraDrive with Embedded Profibus Slave,
and Profibus Network parameters.

CX-Profibus also defines CJ1W-PRM21 mapping into CJ1 CPU memory areas.

2.2 Device Addition and GSD InstaIIation.

Open a new project in CX-Profibus, (Default password is 'password')



XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 7 oI 21
a) Addition of CJ1W-PRM21 ProfibusDevice (This step is not required when CX-
Profibus is Started from CX-Programmer /O Table with inherit properties).

















b) Select the Device Catalogue button and, if the GSD file for the XtraDrive is not
present, click on the 'nstal GSD files...' button, browse the correct file and
'Open'.


XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 8 oI 21


After GSD mport you will be prompted to update the device catalogue, please
click 'yes'.



As a result XtraDrive will appear in the list as a New Device (Note that the actual
name may be different from the one shown in the picture bellow).



c) Once The new XtraDrive bellongs to the catalogue then is possible to map it
to CJ1W Profibus Master. Select 'Add Device' button or just drag & drop it to the
CJ1W-PRM21 card on the project tree:




XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 9 oI 21

2.3 CJ1W-PRM21 'Basic' OnIine Setup


From now, on is assumed that user has a PROFBUS cable properly connecting
CJ1W-PRM21 and XtraDrive(s).

a) SeIect the 'CJ1W-PRM21' Device
b) CIick 'OnIine' Button (notice that OnIine Devices are shown in
'ItaIics')
c) DoubIe cIick on 'CJ1W-PRM21' Device
d) Device Setup Tab
Use Configure button in case you need to select the accurate CPU
model and communication protocol (PC->CJ1W CPU).
Define the Profibus Station number for the Master.
Set the correct 'Unit Number' to fit the CJ1W-PRM21 Rotary
Switch.
Verify communications by clicking 'Test' button, when configuration
is Ok Device nformation is shown.




XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 10 oI 21

e) Bus Parameters tab

Set the selected BaudRate for the Profibus Nework (XtraDrive will be
automatically adjusted to Master Speed settings).




f) SIave Area tab

Define the CJ1W-** PLC CPU Data areas to interlock with the Profibus
/O's. Once you start populating Devices these Areas will be
automatically assigned. (Default Settings).l
Save configuration: 'Save' and press 'Ok' button.




XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 11 oI 21
2.4 XtraDrive 'Basic' OnIine Setup

a) Select the 'XtraDrive' Device.
b) Be sure to not to be 'OnIine' with the XtraDrive (No talics) and 'Online
button' released.
c) Double click on the 'XtraDrive'.
d) Configuration tab

n the Configuration tab, select the right 'Station Address' for the
XtraDrive (must fit with the Rotary switches in the 'XtraDrive')
'nsert' or 'Append' the available 'Modules' you plan to use, the
Configured modules will appear in the 'Configured Modules' grid,
and will Automatically populate the PLC (previously assigned)
memory areas.




For current 'quick Start' guide example following modules will be selected:


XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 12 oI 21



e) Parameters tab

Configure the selected modules according to the application requirements.

For current example:

Variable (in): Clock
Variable (Out):Var_01
Data bytes order: Little-endian








Once Iininished, Apply` button and Ok` to close.
XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 13 oI 21
f) DownIoad XtraDrive Configuration

Select XtraDrive and set it in 'Online' mode



Download to Devices (Will be prompted to set PLC to Program Mode, notice that
in PLC operation will Stop).




At this point, basic conIiguration setup using CX-ProIibus is Iinished.


XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 14 oI 21
2.5 Understanding Profibus Mapping in the PLC.


Device Mapping to CJ1 Memory areas is automatically performed by software.

User can check memory allocation in the following way:

a) Select CJ1W-PRM21
b) Double Click
c) Select 'Slave Area' tab





Data is mapped according to the selection order when adding 'modules.




XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 15 oI 21



Contents for nput Allocation and Output Allocation are the following:

Output AIIocation Data ( PLC --> XtraDrive):

ModuIe Bytes Words PLC Start Range PLC End
Range
Command 26 13 CO 3200 CO 3212
Variable Out 4 2 CO 3213 CO 3214

Input AIIocation Data ( PLC <-- XtraDrive):

ModuIe Bytes Words PLC Start Range PLC End
Range
Command 2 1 CO 3300 CO 3300
Variable n 4 2 CO 3301 CO 3302


ConcIusions:

Profibus Commands from the PLC to the XtraDrive will be defined from
CO 3200 to CO3212
Value from CO 3213 will be automatically sent to 'User Var 01' in the
XtraDrive.
Command Status feedback will be received back from the XtraDrive in
CO 3300
'Clock' value of the XtraDrive will be automatically transfered to CO 3301


XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 16 oI 21

3 OPERATION

n Section 2 was discussed how to add Xtradrive modules to CJ1 PLC system.

Please check previous chapter 2 to understand mapping.

3.1 Read and Write variabIes.

Data exchange is automatically handled by CJ1 Series PLC, so no need of
further action is required.


XtraDrive to PLC

Data is automatically transfered from XtraDrive (cIock vaIue) to CJ1 series and
located in: CIO 3301 & CIO 3302 .

Following screenshot of PLC Memory in CX-Programmer shows XtraDrive's
clock in CJ1 PLC. (Note that in current view value is represented as DWORD).








XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 17 oI 21
PLC to XtraDrive

Data is automatically transfered from CJ1 series located in : CIO 3213 & CIO
3214 to XtraDrive series Var_01

Following screenshots show how (-2.147.483.648) the maximum negative value
valid for XtraDrive user variable is sent from CJ1 PLC to XtraDrive 'Var_01'




TIP Did you got a different value than expected in Var_01?

Be sure you have selected 'LittIe-endian (InteI)' for the Data bytes order in
'Common' Module (please check section 2.4.e)



XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 18 oI 21
3.2 Command Execution (XtraDrive commands)

XtraDrive with embedded profibus allows user to send most of the XtraDrive
commands via Profibus. (Refer to XtraWare User manual for XtraDrive
programming).

XtraDrive's Command structure to be 'built' in CJ1 Series PLC to send
commands to XtraDrive is as follows:
















Message (words 0 to 12) is sent whenever the Message D value changes.

ID: A numeric identifier that is used to make an association between the
command and the relevant command response or diagnostic.
Mode:
Immediate (Mode 2): Use this mode in order to issue a single
command for immediate execution (for example, changing the state of
an output while a program is running, or lowering the gain while the
motor is enabled).
Program downIoad (Mode 4): Use this mode when downloading a
program to the XtraDrive-DP E.
SequentiaI (Mode 3): Use this mode when the master sends a
command stream that should be executed as a program (for example,
move the motor and wait for the motion to complete, wait for input, or
execute another move).
Op_Code: XtraDrive Operation code for the Command.
Var indicator (Vi): Each of the eight bits in the variable indicator field
corresponds to one argument, indicating whether the argument is specified by
a numerical value or a variable D number. See Chapter 6, Serial Interface
Protocol in the XtraWare User Manual.
Reserved (0)
Command Parameter 1 . Command parameter 5: Command arguments.

Description
WORD 0 Message D
WORD 1 OP_Code Mode
WORD 2 "00" Fixed Var ndicator
WORD 3 Command Param #1 Byte 1 Command Param #1 Byte 0
WORD 4 Command Param #1 Byte 3 Command Param #1 Byte 2
WORD 5 Command Param #2 Byte 1 Command Param #2 Byte 0
WORD 6 Command Param #2 Byte 3 Command Param #2 Byte 2
WORD 7 Command Param #3 Byte 1 Command Param #3 Byte 0
WORD 8 Command Param #3 Byte 3 Command Param #3 Byte 2
WORD 9 Command Param #4 Byte 1 Command Param #4 Byte 0
WORD 10 Command Param #4 Byte 3 Command Param #4 Byte 2
WORD 11 Command Param #5 Byte 1 Command Param #5 Byte 0
WORD 12 Command Param #5 Byte 3 Command Param #5 Byte 2
XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 19 oI 21

ExampIe #1

"CONTROL ON"





When CIO3200 (Message ID) value changes, servomotor is enabled or disabled
depending on the value in CIO3203 (1On, 0OII).
VaIue (Hex) VaIue (Hex) Description
WORD 0 00 01 WORD 0 Message D
WORD 1 45 03 WORD 1 OP_Code Mode
WORD 2 00 00 WORD 2 "00" Fixed Var ndicator
WORD 3 00 01 WORD 3 Command Param #1 Byte 1 Command Param #1 Byte 0
WORD 4 00 00 WORD 4 Command Param #1 Byte 3 Command Param #1 Byte 2
WORD 5 00 00 WORD 5 Command Param #2 Byte 1 Command Param #2 Byte 0
WORD 6 00 00 WORD 6 Command Param #2 Byte 3 Command Param #2 Byte 2
WORD 7 00 00 WORD 7 Command Param #3 Byte 1 Command Param #3 Byte 0
WORD 8 00 00 WORD 8 Command Param #3 Byte 3 Command Param #3 Byte 2
WORD 9 00 00 WORD 9 Command Param #4 Byte 1 Command Param #4 Byte 0
WORD 10 00 00 WORD 10 Command Param #4 Byte 3 Command Param #4 Byte 2
WORD 11 00 00 WORD 11 Command Param #5 Byte 1 Command Param #5 Byte 0
WORD 12 00 00 WORD 12 Command Param #5 Byte 3 Command Param #5 Byte 2
XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 20 oI 21
ExampIe #2

"MOVE_D 360 1000"







When CIO3200 value changes, servomotor (previously enabled) starts to move:

MOVED distance time


MOVE_D (Op code 81 Hex)
360 user units (168 Hex)
1000 milliseconds (3E8 Hex)

High Byte Low Byte
VaIue (Hex) VaIue (Hex) Description
WORD 0 00 02 WORD 0 Message D
WORD 1 81 03 WORD 1 OP_Code Mode
WORD 2 00 00 WORD 2 "00" Fixed Var ndicator
WORD 3 01 68 WORD 3 Command Param #1 Byte 1 Command Param #1 Byte 0
WORD 4 00 00 WORD 4 Command Param #1 Byte 3 Command Param #1 Byte 2
WORD 5 FF FF WORD 5 Command Param #2 Byte 1 Command Param #2 Byte 0
WORD 6 00 00 WORD 6 Command Param #2 Byte 3 Command Param #2 Byte 2
WORD 7 03 E8 WORD 7 Command Param #3 Byte 1 Command Param #3 Byte 0
WORD 8 00 00 WORD 8 Command Param #3 Byte 3 Command Param #3 Byte 2
WORD 9 00 00 WORD 9 Command Param #4 Byte 1 Command Param #4 Byte 0
WORD 10 00 00 WORD 10 Command Param #4 Byte 3 Command Param #4 Byte 2
WORD 11 00 00 WORD 11 Command Param #5 Byte 1 Command Param #5 Byte 0
WORD 12 00 00 WORD 12 Command Param #5 Byte 3 Command Param #5 Byte 2
XtraDrive DP to CJ PLC System Quick Start Guide 1.0 DRAFT Page 21 oI 21

4 CONCLUSIONS

XtraDrive DP as a part of XtraDrive's ntelligent Drives family can be connected
to any Profibus Master Device: PLC, PC, etc... providing connectivity from master
Programmable Logic Controller to the decentralized XtraDrive profibus devices.

CX-Profibus (included in CX-ONE software), facilitates easy setup for an
OMRON PLC system to one or more XtraDrive's in a Profibus Fieldbus Network.

Updated information is available at: www.omron-industrial.com