VIPA System 200V CP | Manual HB97E_CP | RE_240-1CA20 | Rev.
Copyright © VIPA GmbH. All Rights Reserved. This document contains proprietary information of VIPA and is not to be disclosed or used except in accordance with applicable agreements. This material is protected by the copyright laws.
Manual VIPA System 200V Contents Contents About this manual .................................................................................... 1 Safety information .................................................................................... 2 Chapter 1 Basics and Assembly ..................................................... 1-1 Safety Information for Users................................................................. 1-2 System conception .....................................................
Contents ii Manual VIPA System 200V HB97E - CP - RE_240-1CA20 - Rev.
Manual VIPA System 200V About this manual About this manual This manual describes the System 200V CP 240-CA20 that are available from VIPA. It contains detailed descriptions of the CP. You are provided with information on the connection and the utilization of the System 200V CP and technical data. Overview Chapter 1: Basics and Assembly The focus of this chapter is on the introduction of the VIPA System 200V.
About this manual Manual VIPA System 200V Objective and contents This manual describes the System 200V CP 240-1CA20 from VIPA. It contains a description of the construction, project implementation and usage. This manual is part of the documentation package with order number HB97E_CP and relevant for: Product Order number as of state: HW CP 240 RS485 VIPA CP 240-1CA20 01 Target audience The manual is targeted at users who have a background in automation technology.
Manual VIPA System 200V Safety information Safety information Applications conforming with specifications The CP 240 is constructed and produced for: • all VIPA System 200V components • communication and process control • general control and automation applications • industrial applications • operation within the environmental conditions specified in the technical data • installation into a cubicle Danger! This device is not certified for applications in • in explosive environments (EX-zone) Documentat
Safety information 4 Manual VIPA System 200V HB97E - CP - RE_240-1CA20 - Rev.
Manual VIPA System 200V Chapter 1 Basics and Assembly Chapter 1 Basics and Assembly Overview The focus of this chapter is on the introduction of the VIPA System 200V. Here you will find the information required to assemble and wire a controller system consisting of System 200V components. Besides the dimensions the general technical data of System 200V will be found. Contents Topic Page Chapter 1 Basics and Assembly .....................................................
Chapter 1 Basics and Assembly Manual VIPA System 200V Safety Information for Users Handling of electrostatic sensitive modules VIPA modules make use of highly integrated components in MOSTechnology. These components are extremely sensitive to over-voltages that can occur during electrostatic discharges. The following symbol is attached to modules that can be destroyed by electrostatic discharges.
Manual VIPA System 200V Chapter 1 Basics and Assembly System conception Overview The System 200V is a modular automation system for assembly on a 35mm profile rail. By means of the peripheral modules with 4, 8 and 16 channels this system may properly be adapted matching to your automation tasks. CPU 215 SM 221 SM 221 SM 221 SM 221 DI 8xDC24V DI 8xDC24V DI 8xDC24V DI 8xDC24V RN ST MR R S 1 1 1 1 .0 2 .0 2 .0 2 .0 2 .1 3 .1 3 .1 3 .1 3 PW .2 4 .2 4 .2 4 .2 4 SF .
Chapter 1 Basics and Assembly Power supplies With the System 200V the DC 24V power supply can take place either externally or via a particularly for this developed power supply. The power supply may be mounted on the profile rail together with the System 200V modules. It has no connector to the backplane bus.
Manual VIPA System 200V Chapter 1 Basics and Assembly Dimensions Dimensions Basic enclosure 1tier width (HxWxD) in mm: 76 x 25.4 x 74 2tier width (HxWxD) in mm: 76 x 50.8 x 74 60 mm 80 mm Installation dimensions Installed and wired dimensions 85 mm 84 mm 74 mm 76 mm 76,62 mm 24 2,77mm cm In- / Output modules 88 mm ca. 110 mm HB97E - CP - RE_240-1CA20 - Rev.
Chapter 1 Basics and Assembly Manual VIPA System 200V 89 mm mm 88 Function modules/ Extension modules 85 mm 84,46 mm 768 mm cm 24 27 mm 11 4,66mm mm CPUs (here with EasyConn from VIPA) 91mm mm 89 85 mm 65 mm cm 768mm 24 27 mm mm 11 mm 5 mm 12 cm 125 mm 1-6 HB97E - CP - RE_240-1CA20 - Rev.
Manual VIPA System 200V Chapter 1 Basics and Assembly Installation The modules are each installed on a 35mm profile rail and connected via a bus connector. Before installing the module the bus connector is to be placed on the profile rail before.
Chapter 1 Basics and Assembly Installation on a profile rail Manual VIPA System 200V The following figure shows the installation of a 4tier width bus connector in a profile rail and the slots for the modules. The different slots are defined by guide rails. 1 2 3 [1] [2] [3] [4] Head module (double width) Head module (single width) Peripheral module Guide rails 4 PW ER RD BA ADR.
Manual VIPA System 200V Chapter 1 Basics and Assembly Assembly possibilities hoizontal assembly vertical assembly 0 1 • horizontal assembly: • vertical assembly: • lying assembly: from 0 to 60°C from 0 to 40°C from 0 to 40°C The horizontal assembly always starts at the left side with a head module, then you install the peripheral modules beside to the right. You may install up to 32 peripheral modules.
Chapter 1 Basics and Assembly Manual VIPA System 200V Assembly procedure • Install the profile rail. Make sure that a clearance of at least 60mm exists above and 80mm below the middle of the profile rail. • Press the bus connector into the profile rail until it clips securely into place and the bus-connectors look out from the profile rail. This provides the basis for the installation of your modules.
Manual VIPA System 200V Chapter 1 Basics and Assembly Demounting and module exchange • Remove if exists the wiring to the module, by pressing both locking lever on the connector and pulling the connector. 1 • The casing of the module has a spring loaded clip at the bottom by which the module can be removed. 2 • The clip is unlocked by pressing the screwdriver in an upward direction. 3 4 • Withdraw the module with a slight rotation to the top.
Chapter 1 Basics and Assembly Manual VIPA System 200V Wiring Overview Most peripheral modules are equipped with a 10pole or a 18pole connector. This connector provides the electrical interface for the signaling and supply lines of the modules. The modules carry spring-clip connectors for interconnections and wiring. The spring-clip connector technology simplifies the wiring requirements for signaling and power cables. In contrast to screw terminal connections, spring-clip wiring is vibration proof.
Manual VIPA System 200V Chapter 1 Basics and Assembly Wiring procedure • Install the connector on the module until it locks with an audible click. For this purpose you press the two clips together as shown. The connector is now in a permanent position and can easily be wired. The following section shows the wiring procedure from top view. • Insert a screwdriver at an angel into the square opening as shown. • Press and hold the screwdriver in the opposite direction to open the contact spring.
Chapter 1 Basics and Assembly Manual VIPA System 200V Installation guidelines General The installation guidelines contain information about the interference free deployment of System 200V systems. There is the description of the ways, interference may occur in your control, how you can make sure the electromagnetic digestibility (EMC), and how you manage the isolation.
Manual VIPA System 200V Basic rules for EMC Chapter 1 Basics and Assembly In the most times it is enough to take care of some elementary rules to guarantee the EMC. Please regard the following basic rules when installing your PLC. • Take care of a correct area-wide grounding of the inactive metal parts when installing your components. - Install a central connection between the ground and the protected earth conductor system. - Connect all inactive metal extensive and impedance-low.
Chapter 1 Basics and Assembly Isolation of conductors Manual VIPA System 200V Electrical, magnetically and electromagnetic interference fields are weakened by means of an isolation, one talks of absorption. Via the isolation rail, that is connected conductive with the rack, interference currents are shunt via cable isolation to the ground.
Manual VIPA System 200V Chapter 1 Basics and Assembly General data Structure/ dimensions • Profile rail 35mm • Peripheral modules with recessed labelling • Dimensions of the basic enclosure: 1tier width: (HxWxD) in mm: 76x25.4x74 in inches: 3x1x3 2tier width: (HxWxD) in mm: 76x50.8x74 in inches: 3x2x3 Reliability • Wiring by means of spring pressure connections (CageClamps) at the front-facing connector, core cross-section 0.08 ... 2.5mm2 or 1.
Chapter 1 Basics and Assembly 1-18 Manual VIPA System 200V HB97E - CP - RE_240-1CA20 - Rev.
Manual VIPA System 200V Chapter 2 Hardware description Chapter 2 Hardware description Overview This chapter contains a description of the construction and the interfaces of the communication processor CP 240 with RS485 interface. Contents Topic Page Chapter 2 Hardware description...................................................... 2-1 Properties............................................................................................. 2-2 Structure ................................................
Chapter 2 Hardware description Manual VIPA System 200V Properties CP 240 RS485 240-1CA20 • RS485 interface • The protocols ASCII, STX/ETX, 3964(R), RK512 and Modbus are supported • Configured by means of 16byte parameter data • Up to 250 telegrams within the 1024Byte sized receive and send buffer • Serial interface isolated to back plane bus • Power supply by back plane bus CP 240 RS485 PW ER TxD RxD R S 4 8 5 X 2 3 4 VIPA 240-1CA20 Order data 2-2 Type CP 240 RS485 Order No.
Manual VIPA System 200V Chapter 2 Hardware description Structure CP 240 RS485 240-1CA20 [1] [2] CP 240 PW LED status indicator 9pin serial D-type plug for RS485 communication ER 1 TxD RxD R S 4 8 5 2 X 4 5 6 VIPA 240-1CA20 Interfaces RS485 1 5 2 3 9 4 8 3 7 2 4 5 6 7 6 1 8 9 RS485 interface n. c. n. c. RxD/TxD-P RTS M5V P5V n. c. RxD/TxD-N n.c.
Chapter 2 Hardware description RS485 cabling with PROFIBUS cable Manual VIPA System 200V CP 240 RxD/TxD-P (B) RxD/TxD-N (A) Periphery 3 8 RxD/TxD-P (B) RxD/TxD-N (A) Shield Periphery RxD/TxD-P (B) RxD/TxD-N (A) Periphery RxD/TxD-P (B) RxD/TxD-N (A) RS485 cabling with defined static levels Pin 6 (P5V) of the isolated interfaces carries the isolated 5V supply with the respective ground on pin 5 (M5V).
Manual VIPA System 200V LEDs Chapter 2 Hardware description The communication processor is provided with 4 LEDs for the purpose of displaying the operating status. The following table depicts the description and the color of these LEDs. Name PW ER Color yellow red TxD RxD green green Description Indicates that power is available For Modbus this signalizes an internal error other protocols: error indicator for open circuit lines, overflow, parity or framing errors.
Chapter 2 Hardware description Manual VIPA System 200V Technical Data Order number Type Current consumption/power loss Current consumption from backplane bus Power loss Status information, alarms, diagnostics Status display Interrupts Process alarm Diagnostic interrupt Diagnostic functions Diagnostics information read-out Supply voltage display Group error display Channel error display Functionality Sub-D interfaces Type Type of interface Connector Electrically isolated MPI MP²I (MPI/RS232) DP master DP s
Manual VIPA System 200V Order number Weight Environmental conditions Operating temperature Storage temperature Certifications UL508 certification HB97E - CP - RE_240-1CA20 - Rev.
Chapter 2 Hardware description 2-8 Manual VIPA System 200V HB97E - CP - RE_240-1CA20 - Rev.
Manual VIPA System 200V Chapter 3 Deployment Chapter 3 Deployment Overview VIPA distributes the communication processor CP 240 with different communication protocols that are explained in the following. Contents Topic Page Chapter 3 Deployment ..................................................................... 3-1 Fast introduction................................................................................... 3-2 Include GSD and FCs ..............................................................
Chapter 3 Deployment Manual VIPA System 200V Fast introduction Overview The address allocation and he parameterization of the CP 240 happens by means of the Siemens SIMATIC Manager in form of a virtual PROFIBUS system. For this the inclusion of the VIPA_21x.gsd (V. 1.67 or higher) is required. For the communication between your CPU and the CP 240 there are handling blocks available, collected in form a library that you may include into your Siemens SIMATIC Manager.
Manual VIPA System 200V Communication Chapter 3 Deployment The serial communication happens via the deployment of handling blocks in the PLC user application. These handling blocks may be downloaded from www.vipa.com. For the internal communication the VIPA FCs are to be used. Here the data is transferred with a maximum block size of 12Byte.
Chapter 3 Deployment Manual VIPA System 200V Include GSD and FCs Project engineering via GSD The address allocation and he parameterization of the CP 240 happens by means of the Siemens SIMATIC Manager in form of a virtual PROFIBUS system. Since the PROFIBUS interface is software standardized, the inclusion of a GSD file enables the guaranteed functionality of running in the SIMATIC Manager from Siemens at any time. Transfer your project via MPI into CPU.
Manual VIPA System 200V Chapter 3 Deployment Project engineering General The address allocation and he parameterization of the directly plugged System 200V modules happens by means of the Siemens SIMATIC Manager in form of a virtual PROFIBUS system. You transfer your project into the CPU serial via the MPI interface or directly via MMC.
Chapter 3 Deployment PLC program Manual VIPA System 200V For the communication between CPU and CP 240 shown in the text below, the following handling blocks are used: FC 0 SEND Data output CPU to CP 240 FC 1 RECEIVE Receive data from CP 240 FC 9 SYNCHRON_RESET Synchronization between CPU and CP 240 The handling blocks are available as library and may be integrated into the Siemens SIMATIC Manager like shown above. A more detailed description of the handling blocks is to be found on the following pages.
Manual VIPA System 200V Chapter 3 Deployment Transfer project The data transfer happens via MPI. If your programming device is not provided with a MPI interface you may also use a serial point-to-point transfer from your PC to MPI with the help of the "Green Cable" from VIPA. The "Green Cable" has the order no. VIPA 950-0KB00 and may only be used with the VIPA CPUs with MP2I interface. Please regard for this also the hints for the usage of the Green Cable in the basics! • Connect your PG with the CPU.
Chapter 3 Deployment Manual VIPA System 200V Standard handling blocks This FC serves the data output from the CPU to the CP 240. Here you define the send range via the identifiers _DB, ADB and ANZ. Via the bit FRG the send initialization is set and the data is send. After the data transfer the handling block sets the bit FRG back again.
Manual VIPA System 200V RECEIVE (FC 1) Declaration in in in out out in_out in_out in_out in_out in_out out in_out Chapter 3 Deployment This FC serves the data reception of the CP 240. Here you set the reception range via the identifiers _DB and ADB. When the output EMFR is set, a new telegram has been read completely. The length of the telegram is stored in ANZ. After the evaluation of the telegram this bit has to be set back by the user, otherwise no further telegram may be taken over by the CPU.
Chapter 3 Deployment STEUERBIT (FC 8) Declaration in in in in in out out in_out in_out out Manual VIPA System 200V This block allows you the following access to the serial modem lines: Read: DTR, RTS, DSR, RI, CTS, CD Write: DTR, RTS Name ADR RTS DTR MASKE_RTS Type INT BOOL BOOL BOOL MASKE_DTR BOOL STATUS DELTA_STATUS START AUFTRAG_LAEU RET_VAL BYTE BYTE BOOL BOOL WORD Comment Logical Address New state RTS New state DTR 0: do nothing 1: set state RTS 0: do nothing 1: set state DTR Status flags St
Manual VIPA System 200V SYNCHRON_ RESET Synchronization and reset (FC 9) Chapter 3 Deployment The block must be called within the cyclic program section. This function is used to acknowledge the start-up ID of the CP 240 and thus the synchronization between CPU and CP. Furthermore it allows to set back the CP in case of a communication interruption to enable a synchronous start-up.
Chapter 3 Deployment ASCII_FRAGMENT (FC 11) Declaration in in in out in_out in_out in_out in_out in_out in_out out Manual VIPA System 200V This FC serves the fragmented ASCII data reception. This allows you to handle on large telegrams in 12Byte blocks to the CPU directly after the reception. Here the CP does not wait until the complete telegram has been received. The usage of the FC 11 presumes that you’ve parameterized "ASCII-fragmented" at the receiver.
Manual VIPA System 200V Chapter 3 Deployment RK512 communication - Handling blocks FETCH_RK512 (FC 2) Declaration in in in in in in in out out in_out in_out in_out in_out in_out in_out in_out This FC serves for an active access to a partner station by means of RK512, which makes passive data available. Here a telegram with source data is sent to the partner station. The partner station collects the data and sends them back to your station. The received data are stored in the target DB.
Chapter 3 Deployment Manual VIPA System 200V ADR Periphery address with which you may call the CP 240. Via the hardware configuration you may set the periphery address. QDB Number of the source data block of the remote station. QBDW 1. data word of the data block of the remote station. LANG Length of the data to send in words. ZDB Number of the target block of the own station. ZBDW 1. data word of the data block of the own station.
Manual VIPA System 200V SEND_RK512 (FC 3) Declaration in in in in in in in out out in_out in_out in_out in_out in_out in_out in_out in_out Chapter 3 Deployment This FC serves for data transfer from the CPU to a partner station. The target at the partner station is transferred together with the user data Here the source area of the own station is defined by QDB, QBDW and LANG. The target area in the remote station is defined by ZDB and ZBDW.
Chapter 3 Deployment Manual VIPA System 200V ZBDW 1. data word of the data block of the partner station KOOR Coordination flag The coordination flag serves to coordinate sending data. The coordination flag is set by the SEND order. As long as the flag is set, no other SEND order may be released. With FFFFh the coordination flag is deactivated. ANZW Indicator word Information concerning the order commissioning may be accessed by the indicator word.
Manual VIPA System 200V S/R_ALL_RK512 (FC 4) Declaration in in out in_out in_out in_out in_out in_out in_out in_out in_out in_out in_out in_out in_out Chapter 3 Deployment These FC serves for to deal with the FETCH and SEND orders in a passive station.
Chapter 3 Deployment Manual VIPA System 200V RK512 communication - Indicator word ANZW Status and error reports Status and error reports are created by the handling blocks: • by the indicator word ANZW (information at order commissioning). • by the parameter error byte PAFE (indication of a wrong order parameterization). Content and structure of the indicator word ANZW The "Indicator word" shows the status of a certain order on a CP.
Manual VIPA System 200V Status management CPU Byte 1 Chapter 3 Deployment Here you may see if an order has already been started, if an error occurred or if this order is blocked, e.g. a virtual connection doesn’t exist any longer. Bit 1: Order running Set: Per plug-in: when the CP received the order. Delete: Per plug-in: when an order has been commissioned (e.g. receipt received). Analyze: Per handling blocks: A new order is only send, when the order before is completely commissioned.
Chapter 3 Deployment Manual VIPA System 200V ASCII / STX/ETX / 3964(R) / RK512 - Basics ASCII ASCII data communication is one of the simple forms of data exchange that can be compared to a multicast/broadcast function. Individual messages are separated by means of 2 windows in time. The sending station has to transmit data messages within the character delay time (ZVZ) or receive window that was defined in the receiving station.
Manual VIPA System 200V 3964(R) Chapter 3 Deployment The 3964(R) procedure controls the data transfer of a point-to-point link between the CP 240 and a communication partner. The procedure adds control characters to the message data during data transfer. These control characters may be used by the communication partner to verify the complete and error free receipt.
Chapter 3 Deployment Manual VIPA System 200V 3964(R) with RK512 The RK512 is an extended form of the 3964(R) procedure. The difference is that a message header is sent ahead of the message data. The header contains data about the size, type and length of the message data.
Manual VIPA System 200V Chapter 3 Deployment Block check character (BCC-Byte) 3964R appends a Block check character to safeguard the transmitted data. The BCC-Byte is calculated by means of an XOR function over the entire data of the message, including the DLE/ETX. When a BCC-Byte is received that differs from the calculated BCC, a NAK is transmitted instead of the DLE.
Chapter 3 Deployment Message contents Manual VIPA System 200V Every message has a header. Depending on the history of the message traffic, this header will contain all the required information. Structure of the output message Sample output message Active partner Passive partner STX DLE Message header: 00 00 A Output D data 05 in DB 5 01 from DW 1 00 FF 8 words without coordi- FF nation flags 08 1. WORD 01 2.
Manual VIPA System 200V Chapter 3 Deployment Structure of the input message Sample input message Active partner Normal message Reaction message Byte Byte Passive partner STX Message header 0 1 00 00 Message identifier E Input 2 3 E X Input command Data type M Flags 4 5 xx xx Parameter 1 Destination 6 7 yy yy Parameter 2 Quantity 8 9 zz zz Parameter 3 Coordinnation flag DLE 00 00 00 10 as of flag byte 16 00 20 32 flag bytes 06 coordination 04 flags MB 6.
Chapter 3 Deployment Manual VIPA System 200V ASCII / STX/ETX / 3964(R) / RK512 - Communication principle Communication via handling blocks The serial communication happens via the deployment of handling blocks in the PLC user application. These handling blocks are to be found in the service area at www.vipa.com.
Manual VIPA System 200V Tasks of the CPU Chapter 3 Deployment The CPU has to split the telegram to send into blocks of 12Byte and transfer them via the back plane bus to the CP 240. In the CP 240 these blocks are assembled in the send buffer, proofed for completeness and then sent to the serial interface. For the data transfer via the back plane bus is asynchronous, a "software handshake" is used between the CP 240 and the CPU. The register for the data transfer from the CP 240 has a width of 16Byte.
Chapter 3 Deployment Manual VIPA System 200V Software handshake For the deployment of the CP 240 together with a System 200V CPU VIPA offers you a series of standard handler blocks that provide the software handshake comfortable and easy. At deployment of the CP 240 without handler blocks, the functionality is elucidated with an example of data send and receive. Example SEND data For example, a telegram with 30Byte length is to send.
Manual VIPA System 200V Chapter 3 Deployment ASCII / STX/ETX / 3964(R) / RK512 - Parameterization General Structure of the parameter bytes of ASCII You may configure the CP 240 by means of 16Byte of configuration data. The structure of the parameter data depends on the selected protocol or. Please regard at the hardware configuration to use the CP 240 according to the chosen protocol. Below follows a list of the parameter bytes with the respective default values.
Chapter 3 Deployment Structure of parameter bytes for STX/ETX Manual VIPA System 200V Byte Function 0 Baud rate 1 2 Protocol Bit 1/0 Data bits Bit 3/2 Parity Bit 5/4 Stop bits Bit 7/6 Flow control 3 4 5 6 7 8 9 10 11 12 13 14 15 3-30 reserved ZNA (*20ms) TMO (*20ms) Number of start flags Start flag 1 Start flag 2 Number of end flags End flag 1 End flag 2 reserved reserved reserved reserved Range of values Default parameters 00h: Default (9600Baud) 00h: 9600Baud 01h: 150Baud 02h: 300Baud 03h: 600
Manual VIPA System 200V Structure of parameter bytes for 3964(R) / 3964(R) with RK512 Chapter 3 Deployment Byte Function 0 Baud rate 1 Protocol 2 Bit 1/0 Data bits Bit 3/2 Parity Bit 5/4 Stop bits 3 4 5 6 7 8 9 10 Bit 7/6 Flow control reserved ZNA (*20ms) ZVZ (*20ms) QVZ (*20ms) BWZ (*20ms) STX repetitions DBL Priority 11 12 13 14 15 reserved reserved reserved reserved reserved HB97E - CP - RE_240-1CA20 - Rev.
Chapter 3 Deployment Manual VIPA System 200V Parameter description Baud rate The data communication rate in Bit/s (Baud). You may select one of the following values: 00h: 01h: 02h: 03h: 04h: 05h: 06h: 07h: 08h: 09h: 0Ah: 0Bh: 0Ch: 0Dh: 0Fh: 0Eh: Default (9600Baud) 150Baud 300Baud 600Baud 1200Baud 1800Baud 2400Baud 4800Baud 7200Baud 9600Baud 14400Baud 19200Baud 38400Baud 57600Baud 76800Baud 115200Baud Default: 0 (9600Baud) Protocol The protocol to be used.
Manual VIPA System 200V Transfer parameter byte Chapter 3 Deployment For every character frame there are 3 data formats available. The data formats are different in the number of data bits, with or without parity bit and number of stop bits.
Chapter 3 Deployment Manual VIPA System 200V Time delay after command (ZNA) The delay time that must expire before a command is executed. The ZNA is specified in units of 20ms. Range: 0 ... 255 Default: 0 Character delay time (ZVZ) The character delay time defines the maximum time that may expire between two characters of a single messages during the reception of the message. The ZVZ is defined in units of 20ms.
Manual VIPA System 200V Delayed acknowledgment time (QVZ) (for 3964(R), RK512) Block delay time (BWZ) (for 3964(R), RK512) STX repetitions (for 3964(R), RK512) Repetitions of data blocks (DBL) if exceeding BWZ (for 3964(R), RK512) Priority (for 3964(R), RK512) Chapter 3 Deployment The delayed acknowledgment time defines the maximum time for the acknowledgment from the partner when the connection is being established. The QVZ is specified in units of 20ms. Range: 0 ... 255 Default: 25 BWZ is the max.
Chapter 3 Deployment Manual VIPA System 200V Modbus - Basics Overview The Modbus protocol is a communication protocol that defines a hierarchic structure between a master and several slaves. Master-SlaveCommunication There are no bus conflicts for the master is only able to communicate with one slave at a time. After the master requested a message, it waits for an answer until an adjustable wait period has expired. During waiting is no other communication possible.
Manual VIPA System 200V Chapter 3 Deployment Modbus at the CP 240 from VIPA The CP 240 Modbus supports several operating modes that are described in the following: Modbus Master In Modbus Master operation you control the communication via your PLC user application. For this the SEND and RECEIVE handling blocks are required. By using a blockage you here have the option to transfer up to 250Byte user data.
Chapter 3 Deployment Manual VIPA System 200V Modbus - Parameterization Parameter structure at Modbus Byte Function 0 Baud rate 1 Protocol 2 Bit 1/0 Data bits Bit 3/2 Parity Bit 5/4 Stop bits 3 4 5 Bit 7/6 reserved Address Debug 6...
Manual VIPA System 200V Chapter 3 Deployment Parameter description Baud rate The data communication rate in bit/s (Baud). You may select one of the following values: 00h: 06h: 07h: 09h: 0Ah: 0Bh: 0Ch: Default (9600Baud) 2400Baud 4800Baud 9600Baud 14400Baud 19200Baud 38400Baud Default: 0 (9600Baud) Protocol The protocol to be used. This setting determines the further structure of the parameter data.
Chapter 3 Deployment Manual VIPA System 200V Data bits Number of data bits that represent a character. Parity The parity is depending on the value even or odd. For the purposes of the parity check, the information bits are expanded by the parity bit. The value of the parity bit ("0" or "1") completes the value of all the bits to obtain a pre-arranged state. If the parity was not specified, the parity bit is set to "1" but it is not included in the assessment.
Manual VIPA System 200V Chapter 3 Deployment Modbus - Deployment Overview You may deploy the CP 240 Modbus either in master or in slave mode. At both modes the module occupies each 16Byte for in- and output data at arbitrary area in the CPU. For the deployment with Modbus a hardware configuration must always be executed.
Chapter 3 Deployment Manual VIPA System 200V Communication options The following text describes the communication options between Modbus master and Modbus slave with the following combination options: • CP 240 Modbus Master ↔ CP 240 Modbus Slave Short • CP 240 Modbus Master ↔ CP 240 Modbus Long Master ↔ Slave Short Modbus Master The communication in master mode happens via data blocks deploying the CP 240 SEND-RECEIVE handling blocks.
Manual VIPA System 200V Chapter 3 Deployment Master ↔ Slave Long Modbus Master The communication in master mode happens via data blocks deploying the CP 240 SEND-RECEIVE handling blocks. With the usage of a blockage you may transfer up to 250Byte user data. Modbus Slave Long In the Modbus Slave Long mode only a changed data area is transferred to the CPU via RECEIVE starting with 0. If the master requests data it has to be made sure that the relevant data are present in the CP.
Chapter 3 Deployment Access to multiple slaves Manual VIPA System 200V At deployment of multiple slaves with RS485 there cannot occur bus conflict errors because the master may only communicate with one slave at a time. The master sends a command telegram to the save specified via the address and waits for a certain time where within the slave may send its respond telegram. During the latency communication with another slave is not possible.
Manual VIPA System 200V Chapter 3 Deployment Modbus - Function codes Naming convention Modbus has some naming conventions: Bit = Coil Word = Register IN: "Input Status" OUT: "Coil Status" IN: "Input Register" OUT: "Holding Register" • Modbus differentiates between bit and word access; Bits = "Coils" and Words = "Register". • Bit inputs are referred to as "Input-Status" and Bit outputs as "CoilStatus". • Word inputs are referred to as "Input-Register" and Word outputs as "Holding-Register".
Chapter 3 Deployment Overview Manual VIPA System 200V With the following Modbus function codes a Modbus master can access a Modbus slave: With the following Modbus function codes a Modbus master can access a Modbus slave.
Manual VIPA System 200V Read n Bits 01h, 02h Chapter 3 Deployment Code 01h: Read n Bits of master output area 0x Code 02h: Read n Bits of master input area 1x Command telegram Slave address Function code 1 Byte Address 1. Bit 1 Byte Number of Bits Check sum CRC/LRC 1 Word 1 Word 1 Word Respond telegram Slave address Function code 1 Byte Number of read Bytes 1 Byte Read n Words 03h, 04h Data 1. Byte 1 Byte Data 2. Byte 1 Byte ... 1 Byte max.
Chapter 3 Deployment Write 1 Word 06h Manual VIPA System 200V Code 06h: Write 1 Word to master output area 4x Command telegram Slave address Function code 1 Byte Address word 1 Byte Value word 1 Word Check sum CRC/LRC 1 Word 1 Word Respond telegram Slave address Function code 1 Byte Write n Bits 0Fh Address word 1 Byte Value word 1 Word Check sum CRC/LRC 1 Word 1 Word Code 0Fh: Write n Bits to master output area 0x Please regard that the number of Bits has additionally to be set in B
Manual VIPA System 200V Chapter 3 Deployment Modbus - Error messages Overview At the communication at Modbus there are 2 error types: • Master doesn’t receive valid data • Slave responds with error message Master doesn’t receive valid data If the slave doesn’t answer within the specified delay time or if a telegram is defective, the master enters an error message into the receive block in plain text.
Chapter 3 Deployment Manual VIPA System 200V Modbus - Example Overview In the following example a communication between a master and a slave via Modbus is build-up. Furthermore the example shows how you can easily control the communication processes by means of the handling blocks. At need you may receive the example project from VIPA. Requirements The following components are required for the example: • 2 System 200V with CPU 21x and CP 240 • Programming cable for MPI connection (e.g.
Manual VIPA System 200V Chapter 3 Deployment Project structure The project has the following structure: Master project engineering The sample already contains the PLC program and the parameters for the Modbus master. you only need to adjust the Modbus parameters. Parameterization For this start the hardware configurator and choose the module 2401CA20.
Chapter 3 Deployment PLC program Manual VIPA System 200V The wanted Modbus commands are set via your PLC program. In the present sample the deployment of SEND and RECEIVE in the OB1 is shown. OB 1: CALL ADR _DB FC 0 :=256 :=DB10 ABD :=W#16#0 ANZ PAFE FRG :=MW12 :=MB14 :=M1.0 GESE :=MW16 ANZ_INT :=MW18 ENDE_KOM :=M2.0 LETZTER_BLOCK:=M2.1 SENDEN_LAEUFT:=M2.2 FEHLER_KOM :=M2.3 CALL ADR _DB FC 1 :=256 :=DB11 ABD :=W#16#0 ANZ :=MW22 EMFR :=M1.
Manual VIPA System 200V Chapter 3 Deployment Slave project engineering For the project engineering of the slave you only have to adjust the Modbus parameters. A PLC application is not required for the source and destination data are delivered in the master telegram. Parameterization For the parameterization of the slave module open the sample project in your hardware configurator. Select the module 240-1CA20. Via double-click you reach the parameterization.
Chapter 3 Deployment Manual VIPA System 200V Send and receive telegram Open the variable table Tabelle1 of the example project and switch to online mode. Send block DB10 DB10.DBD 0 with 05 10 DB10.DBD 4 0000 DW#16#000810A0 with 0008 10 Slave address 05h Function code 10h (write n Words) Offset 0000h Command telegram + 1 data byte → → → Word count 0008h Byte count 10h Start 16 byte data with A0h Data byte 2 ... 5 A0 DW#16#A1A2A3A4 DB10.DBD 12 DW#16#A5A6A7A8 Data byte 6 ... 9 DB10.
Manual VIPA System 200V Receive block with error response Chapter 3 Deployment Slave does not answer to the master command If the slave does not respond within the specified timeout time, the master enters the following error message into the receive block: ERROR01 NO DATA. The Hex format has the following values: DB11.DBD 0 with 45 52 52 DB11.DBD 4 4F DW#16#52000120 with DB11.DBD 8 52 0001 20 DW#16#4E4F2044 with 4E 4F 20 DB11.
Chapter 3 Deployment 3-56 Manual VIPA System 200V HB97E - CP - RE_240-1CA20 - Rev.