VIPA 315-2AG12 Manual
VIPA 315-2AG12 Manual
VIPA 315-2AG12 Manual
Note
Every effort has been made to ensure that the information contained in this document was complete and accurate at the time of
publishing. Nevertheless, the authors retain the right to modify the information. This customer document describes all the hardware
units and functions known at the present time. Descriptions may be included for units which are not present at the customer site. The
exact scope of delivery is described in the respective purchase contract.
CE Conformity Declaration
Hereby, VIPA GmbH declares that the products and systems are in compliance with the essential requirements and other relevant
provisions.
Conformity is indicated by the CE marking affixed to the product.
Conformity Information
For more information regarding CE marking and Declaration of Conformity (DoC), please contact your local VIPA customer service
organization.
Trademarks
VIPA, SLIO, System 100V, System 200V, System 300V, System 300S, System 400V, System 500S and Commander Compact are
registered trademarks of VIPA Gesellschaft für Visualisierung und Prozessautomatisierung mbH.
SPEED7 is a registered trademark of profichip GmbH.
SIMATIC, STEP, SINEC, TIA Portal, S7-300 and S7-400 are registered trademarks of Siemens AG.
Microsoft und Windows are registered trademarks of Microsoft Inc., USA.
Portable Document Format (PDF) and Postscript are registered trademarks of Adobe Systems, Inc.
All other trademarks, logos and service or product marks specified herein are owned by their respective companies.
Technical support
Contact your local VIPA Customer Service Organization representative if you encounter problems with the product or have questions
regarding the product. If you are unable to locate a customer service center, contact VIPA as follows:
VIPA GmbH, Ohmstraße 4, 91074 Herzogenaurach, Germany
Telephone: +49 9132 744 1150 (Hotline)
EMail: support@vipa.de
Manual VIPA System 300S SPEED7 Contents
Contents
About this manual .................................................................................... 1
Safety information .................................................................................... 2
Chapter 1 Basics .............................................................................. 1-1
Safety Information for Users................................................................. 1-2
Operating structure of a CPU ............................................................... 1-3
CPU 315-2AG12 .................................................................................. 1-6
Chapter 2 Assembly and installation guidelines............................ 2-1
Installation dimensions ......................................................................... 2-2
Assembly standard bus ........................................................................ 2-3
Cabling................................................................................................. 2-5
Installation guidelines ........................................................................... 2-6
Chapter 3 Hardware description ..................................................... 3-1
Properties............................................................................................. 3-2
Structure .............................................................................................. 3-3
Technical Data ..................................................................................... 3-9
Chapter 4 Deployment CPU 315-2AG12.......................................... 4-1
Assembly.............................................................................................. 4-2
Start-up behavior.................................................................................. 4-2
Addressing ........................................................................................... 4-3
Addressing ........................................................................................... 4-3
Hardware configuration - CPU.............................................................. 4-5
Hardware configuration - I/O modules .................................................. 4-6
Hardware configuration - Ethernet PG/OP channel .............................. 4-7
Setting standard CPU parameters........................................................ 4-9
Setting VIPA specific CPU parameters............................................... 4-16
Project transfer................................................................................... 4-21
Access to the internal Web page........................................................ 4-25
Operating modes................................................................................ 4-27
Overall reset....................................................................................... 4-30
Firmware update ................................................................................ 4-32
Factory reset ...................................................................................... 4-35
Slot for storage media ........................................................................ 4-36
Memory extension with MCC.............................................................. 4-37
Extended know-how protection........................................................... 4-38
MMC-Cmd - Auto commands ............................................................. 4-40
VIPA specific diagnostic entries ......................................................... 4-42
Using test functions for control and monitoring of variables................ 4-46
Chapter 5 Deployment PtP communication ................................... 5-1
Fast introduction................................................................................... 5-2
Principle of the data transfer ................................................................ 5-3
Deployment of RS485 interface for PtP................................................ 5-4
Parameterization .................................................................................. 5-7
Communication .................................................................................. 5-10
Protocols and procedures .................................................................. 5-16
Modbus - Function codes ................................................................... 5-20
Modbus - Example communication..................................................... 5-24
HB140E - CPU - RE_315-2AG12 - Rev. 12/51 i
Contents Manual VIPA System 300S SPEED7
This manual describes the System 300S SPEED7 CPU 315-2AG12 from
VIPA. Here you may find every information for commissioning and
operation.
Objective and This manual describes the System 300S SPEED7 CPU 315-2AG12 from
contents VIPA. It contains a description of the construction, project implementation
and usage.
This manual is part of the documentation package with order number
HB140E_CPU and relevant for:
Product Order number as of state:
CPU-HW CPU-FW DPM-FW
CPU 315SB/DPM VIPA 315-2AG12 02 V360 V312
Target audience The manual is targeted at users who have a background in automation
technology.
Structure of the The manual consists of chapters. Every chapter provides a self-contained
manual description of a specific topic.
Icons Important passages in the text are highlighted by following icons and
Headings headings:
Danger!
Immediate or likely danger.
Personal injury is possible.
Attention!
Damages to property is likely if these warnings are not heeded.
Note!
Supplementary information and useful tips.
Safety information
Danger!
This device is not certified for applications in
• in explosive environments (EX-zone)
Disposal National rules and regulations apply to the disposal of the unit!
Chapter 1 Basics
Overview This Basics contain hints for the usage and information about the project
engineering of a SPEED7 system from VIPA.
General information about the System 300S like dimensions and
environment conditions will also be found.
Attention!
Personnel and instruments should be grounded when working on
electrostatic sensitive modules.
General The CPU contains a standard processor with internal program memory. In
combination with the integrated SPEED7 technology the unit provides a
powerful solution for process automation applications within the System
300S family.
A CPU supports the following modes of operation:
• cyclic operation
• timer processing
• alarm controlled operation
• priority based processing
Cyclic processing Cyclic processing represents the major portion of all the processes that
are executed in the CPU. Identical sequences of operations are repeated in
a never-ending cycle.
Timer processing Where a process requires control signals at constant intervals you can
initiate certain operations based upon a timer, e.g. not critical monitoring
functions at one-second intervals.
Alarm controlled If a process signal requires a quick response you would allocate this signal
processing to an alarm controlled procedure. An alarm can activate a procedure in
your program.
Priority based The above processes are handled by the CPU in accordance with their
processing priority. Since a timer or an alarm event requires a quick reaction, the
CPU will interrupt the cyclic processing when these high-priority events
occur to react to the event. Cyclic processing will resume, once the
reaction has been processed. This means that cyclic processing has the
lowest priority.
System routine The system routine organizes all those functions and procedures of the
CPU that are not related to a specific control application.
User application This consists of all the functions that are required for the processing of a
specific control application. The operating modules provide the interfaces
to the system routines.
Operands The following series of operands is available for programming the CPU:
• Process image and periphery
• Bit memory
• Timers and counters
• Data blocks
Process image The user application can quickly access the process image of the inputs
and periphery and outputs PAA/PAE. You may manipulate the following types of data:
• individual Bits
• Bytes
• Words
• Double words
You may also gain direct access to peripheral modules via the bus from
user application. The following types of data are available:
• Bytes
• Words
• Blocks
Bit Memory The bit memory is an area of memory that is accessible by means of
certain operations. Bit memory is intended to store frequently used working
data.
You may access the following types of data:
• individual Bits
• Bytes
• Words
• Double words
Timers and In your program you may load cells of the timer with a value between 10ms
counters and 9990s. As soon as the user application executes a start-operation, the
value of this timer is decremented by the interval that you have specified
until it reaches zero.
You may load counter cells with an initial value (max. 999) and increment
or decrement these when required.
Data Blocks A data block contains constants or variables in the form of bytes, words or
double words. You may always access the current data block by means of
operands.
You may access the following types of data:
• individual Bits
• Bytes
• Words
• Double words
CPU 315-2AG12
Overview The CPU 315-2AG12 bases upon the SPEED7 technology. This supports
the CPU at programming and communication by means of co-processors
that causes a power improvement for highest needs.
The SPEED7 CPUs from VIPA are instruction compatible to the
®
programming language STEP 7 from Siemens and may be programmed
via WinPLC7 from VIPA or via the Siemens SIMATIC Manager. Here the
instruction set of the S7-400 from Siemens is used.
Modules and CPUs of the System 300S from VIPA and Siemens may be
used at the bus as a mixed configuration.
The user application is stored in the battery buffered RAM or on an
additionally pluggable MMC storage module.
The CPU is configured as CPU 318-2 (6ES7 318-2AJ00-0AB0/V3.0) from
Siemens.
Access options
DP Adapter
CPU
DP master
Web-Browser MMC TP
RJ45
MMC
Ethernet
Note!
Please do always use the CPU 318-2 (6ES7 318-2AJ00-0AB0/V3.0) from
Siemens of the hardware catalog to project this CPU from VIPA.
For the project engineering, a thorough knowledge of the Siemens
SIMATIC Manager and the hardware configurator from Siemens is
required!
Memory The CPU has an integrated memory. Information about the capacity
management (min. capacity ... max capacity) of the memory may be found at the front of
the CPU. The memory is divided into the following 3 parts:
• Load memory 2Mbyte
• Code memory (50% of the work memory)
• Data memory (50% of the work memory)
The work memory has 1Mbyte. There is the possibility to extend the work
memory to its maximum printed capacity 2Mbyte by means of a MCC
memory extension card.
Integrated The CPU has an integrated PROFIBUS DP master, which also may be
PROFIBUS used as PROFIBUS DP salve.
DP master The project engineering takes place or in the hardware configurator from
Siemens in WinPLC7 from VIPA.
Integrated The CPU has an Ethernet interface for PG/OP communication. Via the
Ethernet PG/OP "PLC" functions you may directly access the Ethernet PG/OP channel and
channel program res. remote control your CPU. A max. of 4 PG/OP connections is
available.
You may also access the CPU with a visualization software via these
connections.
Integrated The CPU comes with an integrated power supply. The power supply is to
power supply be supplied with DC 24V. By means of the supply voltage, the internal
electronic is supplied as well as the connected modules via backplane bus.
The power supply is protected against inverse polarity and overcurrent.
Overview In this chapter you will find every information, required for the installation
and the cabling of a process control with the components of a CPU 315-
2AG12 in the System 300S.
Installation dimensions
Dimensions
65mm
122mm
40mm
Installation 125mm
dimensions 120mm
125 mm
175mm
General The single modules are directly installed on a profile rail and connected via
the backplane bus connector. Before installing the modules you have to
clip the backplane bus connector to the module from the backside.
The backplane bus connector is delivered together with the peripheral
modules.
32.5
57.2 M6 10 122
15
B
C
Bus connector For the communication between the modules the System 300S uses a
backplane bus connector. Backplane bus connectors are included in the
delivering of the peripheral modules and are clipped at the module from the
backside before installing it to the profile rail.
Assembly
possibilities
horizontal assembly vertical Please regard the allowed environment temperatures:
assembly
• horizontal assembly: from 0 to 60°C
SLOT2 SLOT1
• vertical assembly: from 0 to 40°C
DCDC
lying assembly
Approach
• Bolt the profile rail with the background (screw size: M6),
so that you still have minimum 65mm space above and
40mm below the profile rail.
• If the background is a grounded metal or device plate,
please look for a low-impedance connection between
profile rail and background.
• Connect the profile rail with the protected earth conductor.
For this purpose there is a bolt with M6-thread.
• The minimum cross-section of the cable to the protected
2
earth conductor has to be 10mm .
• Stick the power supply to the profile rail and pull it to the
left side to the grounding bolt of the profile rail.
• Fix the power supply by screwing.
• Take a backplane bus connector and click it at the CPU
from the backside like shown in the picture.
• Stick the CPU to the profile rail right from the power supply
and pull it to the power supply.
Danger!
• The power supplies must be released before installation and repair
tasks, i.e. before handling with the power supply or with the cabling you
must disconnect current/voltage (pull plug, at fixed connection switch off
the concerning fuse)!
• Installation and modifications only by properly trained personnel!
Cabling
Danger!
• The power supplies must be released before installation and repair
tasks, i.e. before handling with the power supply or with the cabling you
must disconnect current/voltage (pull plug, at fixed connection switch off
the concerning fuse)!
• Installation and modifications only by properly trained personnel!
CageClamp For the cabling of power supply of a CPU, a green plug with CageClamp
technology (green) technology is deployed.
The connection clamp is realized as plug that may be clipped off carefully if
it is still cabled.
2 2
1 Here wires with a cross-section of 0.08mm to 2.5mm may be connected.
You can use flexible wires without end case as well as stiff wires.
• For cabling you push the locking vertical to the inside with a suiting
screwdriver and hold the screwdriver in this position.
• Insert the de-isolated wire into the round opening. You may use wires
with a cross-section from 0.08mm2 to 2.5mm2.
• By removing the screwdriver the wire is connected safely with the plug
3 connector via a spring.
Installation guidelines
General The installation guidelines contain information about the interference free
deployment of System 300S 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.
Possible Electromagnetic interferences may interfere your control via different ways:
interference • Fields
causes
• I/O signal conductors
• Bus system
• Current supply
• Protected earth conductor
Depending on the spreading medium (lead bound or lead free) and the
distance to the interference cause, interferences to your control occur by
means of different coupling mechanisms.
One differs:
• galvanic coupling
• capacitive coupling
• inductive coupling
• radiant coupling
Basic rules for In the most times it is enough to take care of some elementary rules to
EMC 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.
- Please try not to use aluminum parts. Aluminum is easily oxidizing
and is therefore less suitable for grounding.
• When cabling, take care of the correct line routing.
- Organize your cabling in line groups (high voltage, current supply,
signal and data lines).
- Always lay your high voltage lines and signal res. data lines in
separate channels or bundles.
- Route the signal and data lines as near as possible beside ground
areas (e.g. suspension bars, metal rails, tin cabinet).
• Proof the correct fixing of the lead isolation.
- Data lines must be laid isolated.
- Analog lines must be laid isolated. When transmitting signals with
small amplitudes the one sided laying of the isolation may be
favorable.
- Lay the line isolation extensively on an isolation/protected earth con-
ductor rail directly after the cabinet entry and fix the isolation with
cable clamps.
- Make sure that the isolation/protected earth conductor rail is
connected impedance-low with the cabinet.
- Use metallic or metalized plug cases for isolated data lines.
• In special use cases you should appoint special EMC actions.
- Wire all inductivities with erase links.
- Please consider luminescent lamps can influence signal lines.
• Create a homogeneous reference potential and ground all electrical
operating supplies when possible.
- Please take care for the targeted employment of the grounding
actions. The grounding of the PLC is a protection and functionality
activity.
- Connect installation parts and cabinets with the System 300S in star
topology with the isolation/protected earth conductor system. So you
avoid ground loops.
- If potential differences between installation parts and cabinets occur,
lay sufficiently dimensioned potential compensation lines.
Overview Here the hardware components of the CPU 315-2AG12 are described.
The technical data are at the end of the chapter.
Properties
CPU 315SB
PW RN
RN ER
ST DE
SF IF
FC
MC MCC
L/A
S
RUN
STOP
MRES
VIPA 315-2AG12 X 2
3 4
Ordering data
Type Order number Description
315SB/DPM VIPA 315-2AG12 MPI interface, card slot, real time clock, Ethernet interface for
PG/OP, PROFIBUS DP master
Structure
CPU 315SB/DPM
315-2AG12
X2 X3
MPI PB-DP
X1 X4
Interfaces 1 2 3 4 5 6 7 8
1 Transmit +
+ 1 + DC 24 V
2 Transmit -
- 2 0V 3 Receive +
4 -
5 -
6 Receive -
7 -
X2
8 -
MPI
1 n.c.
5 2 M24V
9 3 RxD/TxD-P (line B)
4
8
4 RTS
3 5 M5V
7
2 6 P5V
6 7 P24V
1
8 RxD/TxD-N (line A)
9 n.c.
X3
PtP/PB-DP
1 shield
5 2 M24V
9
4
3 RxD/TxD-P (line B)
8 4 RTS
3
7
5 M5V
2 6 P5V
6
1
7 P24V
8 RxD/TxD-N (line A)
9 n.c.
Power supply The CPU has an integrated power supply. The power supply has to be
X1 provided with DC 24V. For this serves the double DC 24V slot, that is
underneath the flap.
Via the power supply not only the internal electronic is provided with
voltage, but by means of the backplane bus also the connected modules.
The power supply is protected against polarity inversion and overcurrent.
The internal electronic is galvanically connected with the supply voltage.
PROFIBUS/PtP The CPU has a PROFIBUS/PtP interface with a fix pinout. After an overall
interface with reset the interface is deactivated.
configurable By appropriate configuration, the following functionalities for this interface
functionality may be enabled:
X3 • PROFIBUS DP master operation
• PROFIBUS DP slave operation
• PtP functionality
PtP functionality Using the PtP functionality the RS485 interface is allowed to connect via
serial point-to-point connection to different source res. target systems.
Here the following protocols are supported: ASCII, STX/ETX, 3964R, USS
and Modbus-Master (ASCII, RTU) .
The activation of the PtP functionality happens by embedding the
SPEEDBUS.GSD from VIPA in the hardware catalog. After the installation
the CPU may be configured in a PROFIBUS master system and here the
interface may be switched to PtP communication.
Memory The CPU has an integrated memory. Information about the capacity
management (min. capacity ... max capacity) of the memory may be found at the front of
the CPU.
The memory is divided into the following 3 parts:
• Load memory 2Mbyte
• Code memory (50% of the work memory)
• Data memory (50% of the work memory)
The work memory has 1Mbyte. There is the possibility to extend the work
memory to its maximum printed capacity 2Mbyte by means of a MCC
memory extension card.
Storage As external storage medium for applications and firmware you may use a
media slot MMC storage module (Multimedia card) or a MCC memory extension card.
The MCC can additionally be used as an external storage medium.
Both VIPA storage media are pre-formatted with the PC format FAT16 and
can be accessed via a card reader. An access to the storage media always
happens after an overall reset and PowerON.
After PowerON respectively an overall reset the CPU checks, if there is a
storage medium with data valid for the CPU.
Push the memory card into the slot until it snaps in leaded by a spring
mechanism. This ensures contacting. By sliding down the sliding
mechanism, a just installed memory card can be protected against drop
out.
MCC MCC
To remove, slide the sliding mechanism up again and push the storage
media against the spring pressure until it is unlocked with a click.
Note!
Caution, if the media was already unlocked by the spring mechanism, with
shifting the sliding mechanism, a just installed memory card can jump out
of the slot!
Battery backup for A rechargeable battery is installed on every CPU 31xS to safeguard the
clock and RAM contents of the RAM when power is removed. This battery is also used to
buffer the internal clock.
The rechargeable battery is maintained by a charging circuit that receives
its power from the internal power supply and that maintain the clock and
RAM for a max. period of 30 days.
Attention!
Please connect the CPU at least for 24 hours to the power supply, so that
the internal accumulator/battery is loaded accordingly.
After a power reset and with an empty battery the CPU starts with a BAT
error and executes an overall reset.
The loading procedure is not influenced by the BAT error.
The BAT error can be deleted again, if once during power cycle the time
between switching on and off the power supply is at least 30sec. and the
battery is fully loaded.
Otherwise with a short power cycle the BAT error still exists and an overall
reset is executed.
LEDs The CPU has got LEDs on its front side. In the following the usage and the
according colors of the LEDs is described.
LEDs CPU As soon as the CPU is supplied with 5V, the green PW-LED (Power) is on.
RN ST SF FC MC Meaning
(RUN) (STOP) (SYSFAIL) (FRCE) (MCC)
green yellow red yellow yellow
Boot-up after PowerON
● ☼* ● ● ● * Blinking with 10Hz: Firmware is loaded.
● ● ● ● ● Initialization: Phase 1
● ● ● ● ○ Initialization: Phase 2
● ● ● ○ ○ Initialization: Phase 3
○ ● ● ○ ○ Initialization: Phase 4
Operation
○ ● x x x CPU is in STOP state.
CPU is in start-up state, the RUN LED blinks during
☼ ○ x x x operating OB100 at least for 3s.
● ○ ○ x x CPU is in state RUN without error.
There is a system fault. More information may be found in
x x ● x x the diagnostics buffer of the CPU.
x x x ● x Variables are forced.
Overall reset
○ ☼ x x x Overall reset is requested.
Factory reset
● ● ○ ○ ○ Factory reset is executed.
Firmware update
The alternate blinking indicates that there is new firmware
○ ● ☼ ☼ ● on the memory card.
The alternate blinking indicates that a firmware update is
○ ○ ☼ ☼ ● executed.
○ ● ● ● ● Firmware update finished without error.
LEDs Ethernet The green L/A-LED (Link/Activity) indicates the physical connection of the
PG/OP channel Ethernet PG/OP channel to Ethernet. Irregular flashing of the L/A-LED
L/A, S indicates communication of the Ethernet PG/OP channel via Ethernet.
If the green S-LED (Speed) is on, the Ethernet PG/OP has a
communication speed of 100MBit/s otherwise 10MBit/s.
LEDs Dependent on the mode of operation the LEDs show information about the
PROFIBUS/PtP state of operation of the PROFIBUS part according to the following pattern:
interface X3
Master operation
RN ER DE IF Meaning
(RUN) (ERR)
green red green red
Master has no project, this means the interface is deactivated respectively
○ ○ ○ ○ PtP is active.
● ○ ○ ○ Master has bus parameters and is in RUN without slaves.
Master is in "clear" state (safety state). The inputs of the slaves may be
● ○ ☼ ○ read. The outputs are disabled.
Master is in "operate" state, this means data exchange between master and
● ○ ● ○ slaves. The outputs may be accessed.
● ● ● ○ CPU is in RUN, at least 1 slave is missing.
Slave operation
RN ER DE IF Meaning
(RUN) (ERR)
green red green red
○ ○ ○ ○ Slave has no project respectively PtP is active.
Operating mode With the operating mode switch you may switch the CPU between STOP
switch and RUN.
During the transition from STOP to RUN the operating mode START-UP is
driven by the CPU.
RUN
STOP
Placing the switch to MRES (Memory Reset), you request an overall reset
MRES
with following load from MMC, if a project there exists.
Technical Data
Type X3
Type of interface RS485
Connector Sub-D, 9-pin, female
Electrically isolated 9
MPI -
MP²I (MPI/RS232) -
DP master 9
DP slave 9
Overview This chapter describes the deployment of a CPU 315-2AG12 with SPEED7
technology in the System 300. The description refers directly to the CPU
and to the deployment in connection with peripheral modules, mounted on
a profile rail together with the CPU at the standard bus.
Assembly
Note!
Information about assembly and cabling may be found at chapter
"Assembly and installation guidelines".
Start-up behavior
Turn on power After the power supply has been switched on, the CPU changes to the
supply operating mode the operating mode lever shows.
Boot procedure The accumulator/battery is automatically loaded via the integrated power
with empty battery supply and guarantees a buffer for max. 30 days. If this time is exceeded,
the battery may be totally discharged. This means that the battery buffered
RAM is deleted.
In this state, the CPU executes an overall reset. If a MMC is plugged,
program code and data blocks are transferred from the MMC into the work
memory of the CPU.
If no MMC is plugged, the CPU transfers permanent stored "protected"
blocks into the work memory if available.
Information about storing protected blocks in the CPU is to find in this
chapter at "Extended Know-how protection".
Depending on the position of the operating mode switch, the CPU switches
to RUN res. remains in STOP.
This event is stored in the diagnostic buffer as: "Start overall reset
automatically (unbuffered PowerON)".
Attention!
After a power reset and with an empty battery the CPU starts with a BAT
error and executes an overall reset.
The BAT error can be deleted again, if once during power cycle the time
between switching on and off the power supply is at least 30sec. and the
battery is fully loaded.
Otherwise with a short power cycle the BAT error still exists and an overall
reset is executed.
Addressing
Addressing The CPU 315-2AG12 provides an I/O area (address 0 ... 8191) and a
Backplane bus process image of the in- and outputs (each address 0 ... 255).
I/O devices The process image stores the signal states of the lower address (0 ... 255)
additionally in a separate memory area.
The process image this divided into two parts:
• process image to the inputs (PII)
• process image to the outputs (PIQ)
Max. number of Maximally 8 modules per row may be configured by the CPU 315-2AG12.
pluggable For the project engineering of more than 8 modules you may use line
modules interface connections. For this you set in the hardware configurator the
module IM 360 from the hardware catalog to slot 3 of your 1. profile rail.
Now you may extend your system with up to 3 profile rails by starting each
with an IM 361 from Siemens at slot 3. Considering the max total current
with the CPU 315-2AG12 from VIPA up to 32 modules may be arranged in
a row. Here the installation of the line connections IM 360/361 from
Siemens is not required.
Define addresses You may access the modules with read res. write accesses to the
by hardware peripheral bytes or the process image.
configuration To define addresses a hardware configuration may be used. For this, click
on the properties of the according module and set the wanted address.
Start
address
digital: 0 4 8 12
analog: CPU 256 272 288 304
Example for The following sample shows the functionality of the automatic address
automatic address allocation:
allocation
Slot number: 4 5 6 7 8
DIO 16xDC24V
Bus
DO 16xDC24V
DI 16xDC24V
AO 4x12Bit
AI 8x12Bit
CPU 315
analog digital
255
255
256
.. 256
..
.. .
272 Input Byte Output Byte 320
..
.. .
. Output Byte 335
287 Input Byte ..
.. ..
.. ..
2048.. 2048 ..
. .
8191 8191
Requirements The hardware configuration of the VIPA CPU takes place at the Siemens
hardware configurator.
The hardware configurator is a part of the Siemens SIMATIC Manager. It
serves the project engineering. The modules, which may be configured
here are listed in the hardware catalog. If necessary you have to update
the hardware catalog with Options > Update Catalog.
For project engineering a thorough knowledge of the Siemens SIMATIC
manager and the Siemens hardware configurator are required!
Note!
Please consider that this SPEED7-CPU has 4 ACCUs. After an arithmetic
operation (+I, -I, *I, /I, +D, -D, *D, /D, MOD, +R, -R, *R, /R) the content of
ACCU 3 and ACCU 4 is loaded into ACCU 3 and 2.
This may cause conflicts in applications that presume an unmodified
ACCU2.
For more information may be found in the manual "VIPA Operation list
SPEED7" at "Differences between SPEED7 and 300V programming".
Proceeding To be compatible with the Siemens SIMATIC manager the following steps
should be executed:
Hardware After the hardware configuration place the System 300 modules in the
configuration of plugged sequence starting with slot 4.
the modules
Slot Module
1 Parameter DIO
2
X... CPU Param : ......... Param : .........
Param : ......... Param : .........
Param : ......... Param : .........
DI DO DIO AI AO Param : ......... Param : .........
CPU
3
4 DI
5 DO
6 DIO
7 AI
8 AO
9
10
11
Parameterization For parameterization double-click during the project engineering at the slot
overview on the module you want to parameterize In the appearing dialog
window you may set the wanted parameters.
Parameterization By using the SFCs 55, 56 and 57 you may alter and transfer parameters
during runtime for wanted modules during runtime.
For this you have to store the module specific parameters in so called
"record sets".
More detailed information about the structure of the record sets is to find in
the according module description.
Bus extension For the project engineering of more than 8 modules you may use line
with IM 360 and interface connections. For this you set in the hardware configurator the
IM 361 module IM 360 from the hardware catalog to slot 3 of your 1. profile rail.
Now you may extend your system with up to 3 profile rails by starting each
with an IM 361 from Siemens at slot 3. Considering the max total current
with the VIPA SPEED7 CPUs up to 32 modules may be arranged in a row.
Here the installation of the line connections IM 360/361 from Siemens is
not required.
Overview The CPU 315-2AG12 has an integrated Ethernet PG/OP channel. This
channel allows you to program and remote control your CPU.
The PG/OP channel also gives you access to the internal web page that
contains information about firmware version, connected I/O devices,
current cycle times etc.
With the first start-up respectively after an overall reset the Ethernet
PG/OP channel does not have any IP address.
For online access to the CPU via Ethernet PG/OP channel valid IP address
parameters have to be assigned to this by means of the Siemens SIMATIC
manager. This is called "initialization".
"Initialization" via The initialization via PLC functions takes place with the following
PLC functions proceeding:
• Determine the current Ethernet (MAC) address of your Ethernet PG/OP
channel. This always may be found as 1. address under the front flap of
the CPU on a sticker on the left side.
Ethernet address
Ethernet PG/OP
Assign IP address You get valid IP address parameters from your system administrator. The
parameters assignment of the IP address data happens online in the Siemens
SIMATIC manager starting with version V 5.3 & SP3 with the following
proceeding:
• Start the Siemens SIMATIC manager and set via Options > Set PG/PC
interface the access path to "TCP/IP -> Network card .... ".
• Open with PLC > Edit Ethernet Node the dialog window with the same
name.
• To get the stations and their MAC address, use the [Browse] button or
type in the MAC Address. The Mac address may be found at the 1. label
beneath the front flap of the CPU.
• Choose if necessary the known MAC address of the list of found
stations.
• Either type in the IP configuration like IP address, subnet mask and
gateway. Or your station is automatically provided with IP parameters by
means of a DHCP server. Depending of the chosen option the DHCP
server is to be supplied with MAC address, equipment name or client ID.
The client ID is a numerical order of max. 63 characters. The following
characters are allowed: "hyphen", 0-9, a-z, A-Z
• Confirm with [Assign IP configuration].
Note!
Direct after the assignment the Ethernet PG/OP channel may be reached
online by these address data.
The value remains as long as it is reassigned, it is overwritten by a
hardware configuration or an factory reset is executed.
Take IP address • Open the Siemens hardware configurator und configure the Siemens
parameters in CPU 318-2 (318-2AJ00-0AB00 V3.0).
project • Configure the modules at the standard bus.
• For the Ethernet PG/OP channel you have to configure a Siemens
CP 343-1 (SIMATIC 300 \ CP 300 \ Industrial Ethernet \CP 343-1 \
6GK7 343-1EX11 0XE0) always below the really plugged modules.
• Open the property window via double-click on the CP 343-1EX11 and
enter for the CP at "Properties" the IP address data, which you have
assigned before.
• Transfer your project.
2 CPU
X...
3
4 DI
DI DO DIO AI AO
CPU
5 DO
6 DIO
7 AI
Ethernet-PG/OP channel 8 AO
9 343-1EX11
10
11
Parameterization Since the CPU from VIPA is to be configured as Siemens CPU 318-2 (CPU
via Siemens 318-2AJ00 V3.0) in the Siemens hardware configurator, the standard
CPU 318-2AJ00 parameters of the VIPA CPU may be set with "Object properties" of the
CPU 318-2 during hardware configuration.
Via a double-click on the CPU 318-2 the parameter window of the CPU
may be accessed.
Using the registers you get access to every standard parameter of the
CPU.
Parameter CPU
Supported The CPU does not evaluate each parameter, which may be set at the
parameters hardware configuration.
The following parameters are supported by the CPU at this time:
General
Short description The short description of the Siemens CPU 318-2AJ00 is CPU 318-2.
Order No. / Order number and firmware are identical to the details in the "hardware
Firmware catalog" window.
Name The Name field provides the short description of the CPU. If you change
the name the new name appears in the Siemens SIMATIC manager.
Plant designation Here is the possibility to specify a plant designation for the CPU. This plant
designation identifies parts of the plant according to their function. This has
a hierarchical structure and confirms to IEC 1346-1.
Startup
Startup when If the checkbox for "Startup when expected/actual configuration differ" is
expected/actual deselected and at least one module is not located at its configured slot or if
configuration differs another type of module is inserted there instead, then the CPU does not
switch to RUN mode and remains in STOP mode.
If the checkbox for "Startup when expected/actual configuration differ" is
selected, then the CPU starts even if there are modules not located in their
configured slots of if another type of module is inserted there instead, such
as during an initial system start-up.
Monitoring time for This operation specifies the maximum time for the ready message of every
ready message by configured module after PowerON. Here connected PROFIBUS DP slaves
modules [100ms] are also considered until they are parameterized. If the modules do not
send a ready message to the CPU by the time the monitoring time has
expired, the actual configuration becomes unequal to the preset
configuration.
Monitoring time for The maximum time for the transfer of parameters to parameterizable
transfer of modules. If not every module has been assigned parameters by the time
parameters to this monitoring time has expired; the actual configuration becomes unequal
modules [100ms] to the preset configuration.
Cycle/Clock
memory
Update OB1 This parameter is not relevant.
process image
cyclically
Scan cycle Here the scan cycle monitoring time in milliseconds may be set. If the scan
monitoring time cycle time exceeds the scan cycle monitoring time, the CPU enters the
STOP mode. Possible reasons for exceeding the time are:
• Communication processes
• a series of interrupt events
• an error in the CPU program
Scan cycle load Using this parameter you can control the duration of communication
from Communi- processes, which always extend the scan cycle time so it does not exceed
cation a specified length.
If the cycle load from communication is set to 50%, the scan cycle time of
OB 1 can be doubled. At the same time, the scan cycle time of OB 1 is still
being influenced by asynchronous events (e.g. hardware interrupts) as
well.
Size of the process Here the size of the process image max. 2048 for the input/output
image input/output periphery may be fixed.
area
OB85 call up at I/O The preset reaction of the CPU may be changed to an I/O access error that
access error occurs during the update of the process image by the system.
The VIPA CPU is preset such that OB 85 is not called if an I/O access error
occurs and no entry is made in the diagnostic buffer either.
Clock memory Activate the check box if you want to use clock memory and enter the
number of the memory byte.
Note!
The selected memory byte cannot be used for temporary data storage.
Retentive Memory
Number of Memory Enter the number of retentive memory bytes from memory byte 0 onwards.
Bytes from MB0
Number of S7 Enter the number of retentive S7 timers from T0 onwards. Each S7 timer
Timers from T0 occupies 2bytes.
Interrupts
Priority Here the priorities are displayed, according to which the hardware interrupt
OBs are processed (hardware interrupt, time-delay interrupt, async. error
interrupts).
Time-of-day
interrupts
Priority Here the priorities may be specified according to which the time-of-day
interrupt is processed.
With priority "0" the corresponding OB is deactivated.
Active Activate the check box of the time-of-day interrupt OBs if these are to be
automatically started on complete restart.
Execution Select how often the interrupts are to be triggered. Intervals ranging from
every minute to yearly are available. The intervals apply to the settings
made for start date and time.
Start date / time Enter date and time of the first execution of the time-of-day interrupt.
Cyclic interrupts
Priority Here the priorities may be specified according to which the corresponding
cyclic interrupt is processed. With priority "0" the corresponding interrupt is
deactivated.
Execution Enter the time intervals in ms, in which the watchdog interrupt OBs should
be processed. The start time for the clock is when the operating mode
switch is moved from STOP to RUN.
Phase offset Enter the delay time in ms for current execution for the watch dog interrupt.
This should be performed if several watchdog interrupts are enabled.
Phase offset allows to distribute processing time for watchdog interrupts
across the cycle.
Diagnostics/Clock
Report cause of Activate this parameter, if the CPU should report the cause of STOP to PG
STOP respectively OP on transition to STOP.
Number of Here the number of diagnostics are displayed, which may be stored in the
messages in the diagnostics buffer (circular buffer).
diagnostics buffer
Synchronization You can specify whether the CPU clock should be used to synchronize
type other clocks or not.
- as slave: The clock is synchronized by another clock.
- as master: The clock synchronizes other clocks as master.
- none: There is no synchronization
Time interval Time intervals within which the synchronization is to be carried out.
Correction factor Lose or gain in the clock time may be compensated within a 24 hour period
by means of the correction factor in ms. If the clock is 1s slow after 24
hours, you have to specify a correction factor of "+1000" ms.
Protection
Level of protection Here 1 of 3 protection levels may be set to protect the CPU from
unauthorized access.
Protection level 1 (default setting):
• No password adjustable, no restrictions
Protection level 2 with password:
• Authorized users: read and write access
• Unauthorized user: read access only
Protection level 3:
• Authorized users: read and write access
• Unauthorized user: no read and write access
Parameter for DP The properties dialog of the PROFIBUS part is opened via a double click to
the sub module DP.
General
Short description Here the short description "DP" for PROFIBUS DP is specified.
Name Here "DP" is shown. If you change the name, the new name appears in the
Siemens SIMATIC manager.
Properties With this button the properties of the PROFIBUS DP interface may be
preset.
Comment You can enter the purpose of the DP master in this box.
Addresses
Operating mode Here the operating mode of the PROFIBUS part may be preset. More may
be found at chapter "Deployment PROFIBUS Communication".
Configuration Within the operating mode "DP-Slave" you may configure your slave
system. More may be found at chapter "Deployment PROFIBUS
communication".
Parameter for The properties dialog of the MPI interface is opened via a double click to
MPI/DP the sub module MPI/DP.
General
Short description Here the short description "MPI/DP" for the MPI interface is specified.
Name At Name "MPI/DP" for the MPI interface is shown. If you change the name,
the new name appears in the Siemens SIMATIC manager.
Type Please regard only the type "MPI" is supported by the VIPA CPU.
Properties With this button the properties of the MPI interface may be preset.
Comment You can enter the purpose of the MPI interface in this box.
Addresses
Diagnostics A diagnostics address for the MPI interface is to be preset here. In the
case of an error the CPU is informed via this address.
Overview Except of the VIPA specific CPU parameters the CPU parameterization
takes place in the parameter dialog of the CPU 318-2AJ00.
With installing of the SPEEDBUS.GSD the VIPA specific parameters may
be set during hardware configuration.
Here the following parameters may be accessed:
• Function RS485 (PtP, Synchronization DP master and CPU)
• Token Watch
• Number remanence flag, -timer, -counter
• Priority OB 28, OB 29, OB 33, OB 34
• Execution OB 33, OB 34
• Phase offset OB 33, OB 34
Requirements Since the VIPA specific CPU parameters may be set, the installation of the
SPEEDBUS.GSD from VIPA in the hardware catalog is necessary.
The CPU may be configured in a PROFIBUS master system and the
appropriate parameters may be set after installation.
VIPA_SPEEDbus
Slot Order No.
0 315-2AG12 ...
Object properties
Note!
The hardware configuration, which is shown here, is only required, if you
want to customize the VIPA specific parameters.
VIPA specific The following parameters may be accessed by means of the properties
parameters dialog of the VIPA-CPU.
Function RS485 Per default the RS485 interface is used for the PROFIBUS DP master.
Using this parameter the RS485 interface may be switched to PtP
communication (point to point) respectively the synchronization between
DP master system and CPU may be set:
Synchronization Normally the cycles of CPU and DP master run independently. The cycle
between master time of the CPU is the time needed for one OB1 cycle and for reading
system and CPU respectively writing the inputs respectively outputs. The cycle time of a DP
master depends among others on the number of connected slaves and the
baud rate, thus every plugged DP master has its own cycle time.
Due to the asynchronism of CPU and DP master the whole system gets
relatively high response times.
The synchronization behavior between every VIPA PROFIBUS DP master
and the CPU may be configured by means of a hardware configuration as
shown above.
The different modes for the synchronization are in the following described.
VIPA
Cycle Cycle ... ...
DP master system
whole cycle
PROFIBUS DP In this operating mode the cycle time of the VIPA DP master system
SyncOut depends on the CPU cycle time. After CPU start-up the DP master gets
synchronized.
As soon as their cycle is passed they wait for the next synchronization
impulse with output data of the CPU. So the response time of your system
can be improved because output data were directly transmitted to the DP
master system. If necessary the time of the Watchdog of the bus para-
meters should be increased at this mode.
RUN
Token Watch By presetting the PROFIBUS bus parameters within the hardware
configuration a token time for the PROFIBUS results. The token time
defines the duration until the token reaches the DP master again.
Per default this time is supervised. Due to this monitoring disturbances on
the bus can affect a reboot of the DP master. Here with the parameter
Token Watch the monitoring of the token time can be switched off
respectively on.
Default: On
Number Here the number of flag bytes may be set. With 0 the value Retentive
remanence flag memory > Number of memory bytes starting with MB0 set at the
parameters of the Siemens CPU is used. Otherwise the adjusted value
(1 ... 8192) is used.
Default: 0
Phase offset and The CPU offers additional cyclic interrupts, which interrupt the cyclic
execution of OB33 processing in certain distances. Point of start of the time interval is the
and OB34 change of operating mode from STOP to RUN.
To avoid that the cyclic interrupts of different cyclic interrupt OBs receive a
start request at the same time and so a time out may occur, there is the
possibility to set a phase offset respectively a time of execution.
The phase offset (0 ... 60000ms) serves for distribution processing times
for cyclic interrupts across the cycle.
The time intervals, in which the cyclic interrupt OB should be processed
may be entered with execution (1 ... 60000ms).
Default: Phase offset: 0
Execution: OB33: 500ms
OB34: 200ms
Priority of OB28, The priority fixes the order of interrupts of the corresponding interrupt OB.
OB29, OB33 and Here the following priorities are supported:
OB34 0 (Interrupt-OB is deactivated), 2, 3, 4, 9, 12, 16, 17, 24
Default: 24
Project transfer
Overview There are the following possibilities for project transfer into the CPU:
• Transfer via MPI/PROFIBUS
• Transfer via Ethernet
• Transfer via MMC
Transfer via For transfer via MPI/PROFIBUS there are the following 2 interfaces:
MPI/PROFIBUS • X2: MPI interface
• X3: PROFIBUS interface
Net structure The structure of a MPI net is electrically identical with the structure of a
PROFIBUS net. This means the same rules are valid and you use the
same components for the build-up. The single participants are connected
with each other via bus interface plugs and PROFIBUS cables. Per default
the MPI net runs with 187.5kbaud. VIPA CPUs are delivered with MPI
address 2.
MPI programming The MPI programming cables are available at VIPA in different variants.
cable The cables provide a RS232 res. USB plug for the PC and a bus enabled
RS485 plug for the CPU.
Due to the RS485 connection you may plug the MPI programming cables
directly to an already plugged plug on the RS485 jack. Every bus
participant identifies itself at the bus with an unique address, in the course
of the address 0 is reserved for programming devices.
Terminating resistor A cable has to be terminated with its surge impedance. For this you switch
on the terminating resistor at the first and the last participant of a network
or a segment.
Please make sure that the participants with the activated terminating
resistors are always power supplied. Otherwise it may cause interferences
on the bus.
STEP7
from Siemens
USB-MPI Adapter
VIPA
MPI
Error
Active
Power
VIPA 950-0KB31
Approach transfer • Connect your PC to the MPI jack of your CPU via a MPI programming
via MPI interface cable.
• Load your project in the SIMATIC Manager from Siemens.
• Choose in the menu Options > Set PG/PC interface
• Select in the according list the "PC Adapter (MPI)"; if appropriate you
have to add it first, then click on [Properties].
• Set in the register MPI the transfer parameters of your MPI net and type
a valid address.
• Switch to the register Local connection
• Set the COM port of the PC and the transfer rate 38400Baud for the
MPI programming cable from VIPA.
• Via PLC > Load to module you may transfer your project via MPI to the
CPU and save it on a MMC via PLC > Copy RAM to ROM if one is
plugged.
Approach transfer • Connect your PC to the DP-PB/PtP jack of your CPU via a MPI
via PROFIBUS programming cable.
interface • Load your project in the Siemens SIMATIC Manager.
• Choose in the menu Options > Set PG/PC interface
• Select in the according list the "PC Adapter (PROFIBUS)"; if appropriate
you have to add it first, then click on [Properties].
• Set in the register PROFIBUS the transfer parameters of your
PROFIBUS net and type a valid PROFIBUS address. The PROFIBUS
address must be assigned to the DP master by a project before.
• Switch to the register Local connection
• Set the COM port of the PCs and the transfer rate 38400Baud for the
MPI programming cable from VIPA.
• Via PLC > Load to module you may transfer your project via PROFIBUS
to the CPU and save it on a MMC via PLC > Copy RAM to ROM if one
is plugged.
Note!
Transfer via PROFIBUS is available by DP master, if projected as master
and assigned with a PROFIBUS address before.
Within selecting the slave mode you have additionally to select the option
"Test, commissioning, routing".
Transfer via For transfer via Ethernet the CPU has the following interface:
Ethernet • X4: Ethernet PG/OP channel
Initialization So that you may access the Ethernet PG/OP channel you have to assign
IP address parameters by means of the "initialization"(see "hardware
configuration - Ethernet PG/OP channel".
Information about the initialization of the Ethernet PG/OP channel may be
found at "Initialization of Ethernet PG/OP channel".
Transfer • For the transfer, connect, if not already done, the appropriate Ethernet
port to your Ethernet.
• Open your project with the Siemens SIMATIC Manager.
• Set via Options > Set PG/PC Interface the access path to "TCP/IP ->
Network card .... ".
• Click to PLC > Download → the dialog "Select target module" is opened.
Select your target module and enter the IP address parameters of the
Ethernet PG/OP channel for connection. Provided that no new hardware
configuration is transferred to the CPU, the entered Ethernet connection
is permanently stored in the project as transfer channel.
• With [OK] the transfer is started.
Note!
System dependent you get a message that the projected system differs
from target system. This message may be accepted by [OK].
→ your project is transferred and may be executed in the CPU after
transfer.
Transfer via The MMC (Memory Card) serves as external transfer and storage medium.
MMC There may be stored several projects and sub-directories on a MMC
storage module. Please regard that your current project is stored in the root
directory and has one of the following file names:
• S7PROG.WLD
• AUTOLOAD.WLD
With File > Memory Card File > New in the Siemens SIMATIC Manager a
new wld file may be created. After the creation copy the blocks from the
project blocks folder and the System data into the wld file.
Transfer The transfer of the application program from the MMC into the CPU takes
MMC → CPU place depending on the file name after an overall reset or PowerON.
• S7PROG.WLD is read from the MMC after overall reset.
• AUTOLOAD.WLD is read after PowerON from the MMC.
The blinking of the MCC-LED of the CPU marks the active transfer. Please
regard that your user memory serves for enough space, otherwise your
user program is not completely loaded and the SF LED gets on.
Transfer When the MMC has been installed, the write command stores the content
CPU → MMC of the battery buffered RAM as S7PROG.WLD on the MMC.
The write command is controlled by means of the block area of the
Siemens SIMATIC manager PLC > Copy RAM to ROM. During the write
process the MCC-LED of the CPU is blinking. When the LED expires the
write process is finished.
If this project is to be loaded automatically from the MMC with PowerON,
you have to rename this on the MMC to AUTOLOAD.WLD.
Transfer control After a MMC access, an ID is written into the diagnostic buffer of the CPU.
To monitor the diagnosis entries, you select PLC > Module Information in
the Siemens SIMATIC Manager. Via the register "Diagnostic Buffer" you
reach the diagnosis window.
When accessing a MMC, the following events may occur:
Event-ID Meaning
0xE100 MMC access error
0xE101 MMC error file system
0xE102 MMC error FAT
0xE104 MMC-error with storing
0xE200 MMC writing finished successful
0xE210 MMC reading finished (reload after overall reset)
0xE21F Error during reload, read error, out of memory
Access to the The Ethernet PG/OP channel provides a web page that you may access
web page via an Internet browser by its IP address. The web page contains
information about firmware versions, current cycle times etc.
The current content of the web page is stored on MMC by means of the
MMC-Cmd WEBPAGE. More information may be found at "MMC-Cmd -
Auto commands".
Web page The access takes place via the IP address of the Ethernet PG/OP
channel. The web page only serves for information output. The monitored
values are not alterable.
... continue
Operating modes
Operating mode • During the transition from STOP to RUN a call is issued to the start-up
START-UP organization block OB 100. The processing time for this OB is not
monitored. The START-UP OB may issue calls to other blocks.
• All digital outputs are disabled during the START-UP, i.e. outputs are
inhibited.
• RUN-LED blinks as soon as the OB 100 is operated and for at least
3s, even if the start-up time is shorter or the CPU gets to
STOP due to an error. This indicates the start-up.
• STOP-LED off
When the CPU has completed the START-UP OB, it assumes the
operating mode RUN.
Operating mode The CPU offers up to 3 breakpoints to be defined for program diagnosis.
HOLD Setting and deletion of breakpoints happens in your programming
environment. As soon as a breakpoint is reached, you may process your
program step by step.
Note!
The usage of breakpoints is always possible. Switching to the operating
mode test operation is not necessary.
With more than 2 breakpoints, a single step execution is not possible.
Function The CPUs include security mechanisms like a Watchdog (100ms) and a
security parameterizable cycle time surveillance (parameterizable min. 1ms) that
stop res. execute a RESET at the CPU in case of an error and set it into a
defined STOP state.
The VIPA CPUs are developed function secure and have the following
system properties:
Overall reset
Overview During the overall reset the entire user memory (RAM) is erased. Data
located in the memory card is not affected.
You have 2 options to initiate an overall reset:
• initiate the overall reset by means of the function selector switch
• initiate the overall reset by means of the Siemens SIMATIC Manager
Note!
You should always issue an overall reset to your CPU before loading an
application program into your CPU to ensure that all blocks have been
cleared from the CPU.
Overall reset
• Place the function selector in the position MRES and hold it in this
position for app. 3 seconds. → The STOP-LED changes from blinking to
permanently on.
• Place the function selector in the position STOP and switch it to MRES
and quickly back to STOP within a period of less than 3 seconds.
→ The STOP-LED blinks (overall reset procedure).
• The overall reset has been completed when the STOP-LED is on
permanently. → The STOP-LED is on.
1 2 3 4
PW PW PW PW
RN RN RN RN
ST ST ST ST
SF SF SF SF
FC FC FC FC
MC MC MC MC
3 Sec.
Automatic reload If there is a project S7PROG.WLD on the MMC, the CPU attempts to
reload this project from MMC → the MCC LED is on.
When the reload has been completed the LED expires. The operating
mode of the CPU will be STOP or RUN, depending on the position of the
function selector.
Overall reset
You may request the overall reset by means of the menu command PLC >
Clean/Reset.
In the dialog window you may place your CPU in STOP mode and start the
overall reset if this has not been done as yet.
The STOP-LED blinks during the overall reset procedure.
When the STOP-LED is on permanently the overall reset procedure has
been completed.
Automatic reload If there is a project S7PROG.WLD on the MMC, the CPU attempts to
reload this project from MMC → the MCC LED is on.
When the reload has been completed, the LED expires. The operating
mode of the CPU will be STOP or RUN, depending on the position of the
function selector.
Reset to factory A Factory reset deletes the internal RAM of the CPU completely and sets it
setting back to the delivery state.
Please regard that the MPI address is also set back to default 2!
More information may be found at the part "Factory reset" further below.
Firmware update
Overview There is the opportunity to execute a firmware update for the CPU and its
components via MMC. For this an accordingly prepared MMC must be in
the CPU during the startup.
So a firmware files can be recognized and assigned with startup, a pkg file
name is reserved for each updateable component an hardware release,
which begins with "px" and differs in a number with six digits.
The pkg file name of every updateable component may be found at a label
right down the front flap of the module.
After PowerON and CPU STOP the CPU checks if there is a *.pkg file on
the MMC. If this firmware version is different to the existing firmware
version, this is indicated by blinking of the LEDs and the firmware may be
installed by an update request.
Latest Firmware at The latest firmware versions are to be found in the service area at
www.vipa.de www.vipa.de.
For example the following files are necessary for the firmware update of
the CPU 315-2AG12 and its components with hardware release 1:
• 315-2AG12, Hardware release 1: Px000078.pkg
• PROFIBUS DP master: Px000062.pkg
Attention!
When installing a new firmware you have to be extremely careful. Under
certain circumstances you may destroy the CPU, for example if the voltage
supply is interrupted during transfer or if the firmware file is defective.
In this case, please call the VIPA-Hotline!
Please regard that the version of the update firmware has to be different
from the existing firmware otherwise no update is executed.
Display the The CPU has an integrated website that monitors information about
Firmware version of firmware version of the SPEED7 components. The Ethernet PG/OP
the SPEED7 system channel provides the access to this web site.
via Web Site
To activate the PG/OP channel you have to enter according IP parameters.
This can be made in Siemens SIMATIC manager either by a hardware
configuration, loaded by MMC respectively MPI or via Ethernet by means of
the MAC address with PLC > Assign Ethernet Address.
After that you may access the PG/OP channel with a web browser via the
IP address of the project engineering. More detailed information is to find in
the manual at "Access to Ethernet PG/OP channel and website".
Attention!
With a firmware update an overall reset is automatically executed. If your
program is only available in the load memory of the CPU it is deleted! Save
your program before executing a firmware update! After the firmware
update you should execute a "Set back to factory settings" (see following
page).
Transfer firmware 1. Switch the operating mode switch of your CPU in position STOP.
from MMC into Turn off the voltage supply. Plug the MMC with the firmware files
CPU into the CPU. Please take care of the correct plug-in direction of the
MMC. Turn on the voltage supply.
2. After a short boot-up time, the alternate blinking of the LEDs SF
and FC shows that at least a more current firmware file was found
on the MMC.
3. You start the transfer of the firmware as soon as you tip the
operating mode switch downwards to MRES within 10s.
4. During the update process, the LEDs SF and FC are alternately
blinking and MCC LED is on. This may last several minutes.
5. The update is successful finished when the LEDs PW, ST, SF, FC
and MC are on. If they are blinking fast, an error occurred.
6. Turn Power OFF and ON. Now it is checked by the CPU, whether
further current firmware versions are available at the MMC. If so,
again the LEDs SF and FC flash after a short start-up period.
Continue with point 3.
If the LEDs do not flash, the firmware update is ready.
Now a factory reset should be executed (see next page). After that
the CPU is ready for duty.
1 2 3 4 5 6
Factory reset
Proceeding With the following proceeding the internal RAM of the CPU is completely
deleted and the CPU is reset to delivery state. Please note that here also
the IP address of the Ethernet PG/OP channel is set to 0.0.0.0 and the MPI
address is reset to the address 2!
A factory reset may also be executed by the MMC-Cmd FACTORY_
RESET. More information may be found at "MMC-Cmd - Auto commands".
1 2 3 4 5
CPU in Request factory reset Start factory reset Factory reset Error: Only
STOP executed overall reset
executed
PLC PLC PLC PLC PLC PLC
PW PW PW PW PW PW
RN RN RN RN RN RN
ST ST ST ST ST ST
SF
Tip RUN
SF
6x SF
RUN Tip RUN
SF SF SF
FC FC FC FC FC FC
STOP STOP STOP
MC MC MC MC MC MC Power
MRES MRES MRES OFF/ON
30 Sec. 1 Sec.
Note!
After the firmware update you always should execute a Factory reset.
Overview At the front of the CPU there is a slot for storage media.
As external storage medium for applications and firmware you may use a
multimedia card (MMC) or a VIPA MCC memory extension card. The MCC
can additionally be used as an external storage medium.
It has the PC compatible FAT16 file format.
You can cause the CPU to load a project automatically respectively to
execute a command file by means of pre-defined file names.
Accessing the To the following times an access takes place on a storage medium:
storage medium
After overall reset • The CPU checks if there is a project S7PROG.WLD. If exists the project
is automatically loaded.
• The CPU checks if there is a project PROTECT.WLD with protected
blocks. If exists the project is automatically loaded. These blocks are
stored in the CPU until the CPU is reset to factory setting or an empty
PROTECT.WLD is loaded.
• The CPU checks if a MCC memory extension card is put. If exists the
memory extension is enabled, otherwise a memory expansion, which
was activated before, is de-activated.
Overview There is the possibility to extend the work memory of the CPU.
For this, a MCC memory extension card is available from VIPA. The MCC
is a specially prepared MMC (Multimedia Card). By plugging the MCC into
the MCC slot and then an overall reset the according memory expansion is
released. There may only one memory expansion be activated at the time.
On the MCC there is the file memory.key. This file may not be altered or
deleted. You may use the MCC also as "normal" MMC for storing your
project.
Approach To extend the memory, plug the MCC into the card slot at the CPU labeled
with "MCC" and execute an overall reset.
MMC
RN
ST
MR memory is extended for the MCC memory
configuration (diagnostic entry 0xE400)
Attention!
Please regard that the MCC must remain plugged when you’ve executed
the memory expansion at the CPU. Otherwise the CPU switches to STOP
after 72 hours. The MCC cannot be exchanged with a MCC of the same
memory configuration.
Behavior When the MCC memory configuration has been taken over you may find
the diagnosis entry 0xE400 in the diagnostic buffer of the CPU.
After pulling the MCC the entry 0xE401 appears in the diagnostic buffer,
the SF-LED is on and after 72 hours the CPU switches to STOP. A reboot
is only possible after plugging-in the MCC again or after an overall reset.
The remaining time after pulling the MCC is always been shown with the
parameter MCC-Trial-Time on the web page.
After re-plugging the MCC, the SF-LED extinguishes and 0xE400 is
entered into the diagnostic buffer.
You may reset the memory configuration of your CPU to the initial status at
any time by executing an overall reset without MCC.
HB140E - CPU - RE_315-2AG12 - Rev. 12/51 4-37
Chapter 4 Deployment CPU 315-2AG12 Manual VIPA System 300S SPEED7
Overview Besides the "standard" Know-how protection the SPEED7-CPUs from VIPA
provide an "extended" know-how protection that serves a secure block
protection for accesses of 3. persons.
Standard protection The standard protection from Siemens transfers also protected blocks to
the PG but their content is not displayed. But with according manipulation
the Know-how protection is not guaranteed.
Extended protection The "extended" know-how protection developed by VIPA offers the
opportunity to store blocks permanently in the CPU.
At the "extended" protection you transfer the protected blocks into a WLD-
file named protect.wld. By plugging the MMC and following overall reset,
the blocks in the protect.wld are permanently stored in the CPU.
You may protect OBs, FBs and FCs.
When back-reading the protected blocks into the PG, exclusively the block
header are loaded. The block code that is to be protected remains in the
CPU and cannot be read.
PC CPU OVERALL_RESET
Tip
Blocks 3Sec.
MMC
RN
ST
MR
Protect blocks Create a new wld-file in your project engineering tool with File > Memory
with protect.wld Card file > New and rename it to "protect.wld".
Transfer the according blocks into the file by dragging them with the mouse
from the project to the file window of protect.wld.
Transfer Transfer the file protect.wld to a MMC storage module, plug the MMC into
protect.wld to CPU the CPU and execute an overall reset with the following approach:
with overall reset
1 2 3 4
PW PW PW PW
RN RN RN RN
ST ST ST ST
SF SF SF SF
FC FC FC FC
MC MC MC MC
3 Sec.
The overall reset stores the blocks in protect.wld permanently in the CPU
protected from accesses of 3. persons.
Change respectively Protected blocks in the RAM of the CPU may be substituted at any time by
delete protected blocks with the same name. This change remains up to next overall reset.
blocks Protected blocks may permanently be overwritten only if these are deleted
at the protect.wld before.
By transferring an empty protect.wld from the MMC you may delete all
protected blocks in the CPU.
Usage of Due to the fact that reading of a "protected" block from the CPU monitors
protected blocks no symbol labels it is convenient to provide the "block covers" for the end
user.
For this, create a project out of all protected blocks. Delete all networks in
the blocks so that these only contain the variable definitions in the
according symbolism.
Command file The command file is a text file, which consists of a command sequence to
be stored as vipa_cmd.mmc in the root directory of the MMC.
The file has to be started by CMD_START as 1. command, followed by the
desired commands (no other text) and must be finished by CMD_END as
last command.
Text after the last command CMD_END e.g. comments is permissible,
because this is ignored. As soon as the command file is recognized and
executed each action is stored at the MMC in the log file logfile.txt. In
addition for each executed command a diagnostics entry may be found in
the diagnostics buffer.
Example 1
Example 2
Note!
The parameters IP address, subnet mask and gateway may be received
from the system administrator.
Enter the IP address if there is no gateway used.
Entries in the You may read the diagnostic buffer of the CPU via the Siemens SIMATIC
diagnostic buffer Manager. Besides of the standard entries in the diagnostic buffer, the VIPA
CPUs support some additional specific entries in form of event-IDs.
The current content of the diagnostics buffer is stored on MMC by means
of the MMC-Cmd DIAGBUF. More information may be found at "MMC-Cmd
- Auto commands".
Note!
Every register of the module information is supported by the VIPA CPUs.
More information may be found at the online help of the Siemens SIMATIC
manager.
Monitoring the To monitor the diagnostic entries you choose the option PLC > Module
diagnostic entries Information in the Siemens SIMATIC Manager. Via the register "Diagnostic
Buffer" you reach the diagnostic window:
Module information
VIPA-ID
12 ... ... ...
13 ... ... ...
Details:
...
The diagnosis is independent from the operating mode of the CPU. You
may store a max. of 100 diagnostic entries in the CPU.
The following page shows an overview of the VIPA specific Event-IDs.
Overview of the
Event-IDs
Event-ID Description
0xE003 Error at access to I/O devices
Zinfo1: I/O address
Zinfo2: Slot
0xE004 Multiple parameterization of a I/O address
Zinfo1: I/O address
Zinfo2: Slot
0xE005 Internal error - Please contact the VIPA-Hotline!
0xE006 Internal error - Please contact the VIPA-Hotline!
0xE007 Configured in-/output bytes do not fit into I/O area
0xE008 Internal error - Please contact the VIPA-Hotline!
0xE009 Error at access to standard back plane bus
0xE010 Not defined module group at backplane bus recognized
Zinfo2: Slot
Zinfo3: Type ID
0xE011 Master project engineering at Slave-CPU not possible or wrong slave configuration
0xE012 Error at parameterization
0xE013 Error at shift register access to standard bus digital modules
0xE014 Error at Check_Sys
0xE015 Error at access to the master
Zinfo2: Slot of the master (32=page frame master)
0xE016 Maximum block size at master transfer exceeded
Zinfo1: I/O address
Zinfo2: Slot
0xE017 Error at access to integrated slave
0xE018 Error at mapping of the master periphery
0xE019 Error at standard back plane bus system recognition
0xE01A Error at recognition of the operating mode (8 / 9 Bit)
0xE01B Error - maximum number of plug-in modules exceeded
0xE020 Error - interrupt information is not defined
0xE030 Error of the standard bus
0xE033 Internal error - Please contact the VIPA-Hotline!
0xE0B0 SPEED7 is not stoppable (probably undefined BCD value at timer)
0xE0C0 Not enough space in work memory for storing code block (block size exceeded)
0xE0CC Communication error MPI / Serial
Zinfo1: Code
1: Wrong Priority
2: Buffer overflow
3: Frame format error
7: Incorrect value
8: Incorrect RetVal
9: Incorrect SAP
10: Incorrect connection type
11: Incorrect sequence number
12: Faulty block number in the telegram
13: Faulty block type in the telegram
14: Inactive function
15: Incorrect size in the telegram
20: Error writing to MMC
90: Incorrect Buffer size
98: Unknown error
99: Internal error
Event-ID Description
0xE0CD Error at DPV1 job management
0xE0CE Error: Timeout at sending of the i-slave diagnostics
Event-ID Description
0xEA09 SBUS: Parameterized output data width unequal to plugged output data width
Zinfo1: Parameterized output data width
Zinfo2: Slot
Zinfo3: Output data width of the plugged module
0xEA10 SBUS: Input address outside input area
Zinfo1: I/O address
Zinfo2: Slot
Zinfo3: Data width
0xEA11 SBUS: Output address outside output area
Zinfo1: I/O address
Zinfo2: Slot
Zinfo3: Data width
0xEA12 SBUS: Error at writing record set
Zinfo1: Slot
Zinfo2: Record set number
Zinfo3: Record set length
0xEA14 SBUS: Multiple parameterization of a I/O address (Diagnostic address)
Zinfo1: I/O address
Zinfo2: Slot
Zinfo3: Data width
0xEA15 Internal error - Please contact the VIPA-Hotline!
0xEA18 SBUS: Error at mapping of the master I/O devices
Zinfo2: Master slot
0xEA19 Internal error - Please contact the VIPA-Hotline!
0xEA20 Error - RS485 interface is not set to PROFIBUS DP master but there is a
PROFIBUS DP master configured.
0xEA21 Error - Project engineering RS485 interface X2/X3:
PROFIBUS DP master is configured but missing
Zinfo2: Interface x
0xEA22 Error - RS485 interface X2 - value is out of range
Zinfo: Configured value X2
0xEA23 Error - RS485 interface X3 - value is out of range
Zinfo: Configured value X3
0xEA24 Error - Project engineering RS485 interface X2/X3:
Interface/Protocol is missing, the default settings are used.
Zinfo2: Configured value X2
Zinfo3: Configured value X3
Event-ID Description
0xEA54 Error - PROFINET IO controller reports multiple configuration at one peripheral
addr.
Zinfo1: Peripheral address
Zinfo2: User slot of the PROFINET IO controller
Zinfo3: Data width
0xEA64 PROFINET configuration error:
Zinfo1: error word
Bit 0: too many IO devices
Bit 1: too many IO devices per ms
Bit 2: too many input bytes per ms
Bit 3: too many output bytes per ms
Bit 4: too many input bytes per device
Bit 5: too many output bytes per device
Bit 6: too many productive connections
Bit 7: too many input bytes in the process image
Bit 8: too many output bytes in the process image
Bit 9: Configuration not available
Bit 10: Configuration not valid
0xEA65 Communication error CPU - PROFINET-IO-Controller
Pk : CPU or PROFINET-IO-Controller
Zinfo1: Service ID, with which the error arose
Zinfo2: Command, with which the error arose
0xEA66 Internal error - Please contact the VIPA-Hotline!
0xEA67 Error - PROFINET-IO-Controller - reading record set
Pk: Error type
0: DATA_RECORD_ERROR_LOCAL
1: DATA_RECORD_ERROR_STACK
2: DATA_RECORD_ERROR_REMOTE
OBNr: PROFINET-IO-Controller slot
DatId: Device no.
Zinfo1: Record set number
Zinfo2: Record set handle
Zinfo3: Internal error code for service purposes
0xEA68 Error - PROFINET-IO-Controller - writing record set
Pk: Error type
0: DATA_RECORD_ERROR_LOCAL
1: DATA_RECORD_ERROR_STACK
2: DATA_RECORD_ERROR_REMOTE
OBNr: PROFINET-IO-Controller slot
DatId: Device no.
Zinfo1: Record set number
Zinfo2: Record set handle
Zinfo3: Internal error code for service purposes
Overview For troubleshooting purposes and to display the status of certain variables
you can access certain test functions via the menu item Debug of the
Siemens SIMATIC Manager.
The status of the operands and the VKE can be displayed by means of the
test function Debug > Monitor.
You can modify and/or display the status of variables by means of the test
function PLC > Monitor/Modify Variables.
Debug > Monitor This test function displays the current status and the VKE of the different
operands while the program is being executed.
It is also possible to enter corrections to the program.
Note!
When using the test function “Monitor” the PLC must be in RUN mode!
PLC > This test function returns the condition of a selected operand (inputs,
Monitor/Modify outputs, flags, data word, counters or timers) at the end of program-
Variables execution.
This information is obtained from the process image of the selected
operands. During the "processing check" or in operating mode STOP the
periphery is read directly from the inputs. Otherwise only the process
image of the selected operands is displayed.
Control of outputs
It is possible to check the wiring and proper operation of output-modules.
You can set outputs to any desired status with or without a control
program. The process image is not modified but outputs are no longer
inhibited.
Control of variables
The following variables may be modified:
I, Q, M, T, C and D.
The process image of binary and digital operands is modified
independently of the operating mode of the CPU.
When the operating mode is RUN the program is executed with the
modified process variable. When the program continues they may,
however, be modified again without notification.
Process variables are controlled asynchronously to the execution sequence
of the program.
Overview Content of this chapter is the deployment of the RS485 interface for serial
PtP communication.
Here you’ll find every information about the protocols, the activation and
project engineering of the interface, which are necessary for the serial
communication using the RS485 interface.
Fast introduction
General Via a hardware configuration you may de-activate the PROFIBUS part
integrated to the SPEED7 CPU and thus release the RS485 interface for
PtP (point-to-point) communication.
The RS485 interface supports in PtP operation the serial process
connection to different source res. destination systems.
Protocols The protocols res. procedures ASCII, STX/ETX, 3964R, USS and Modbus
are supported.
Switch of RS485 Per default, every CPU uses the RS485 interface for PROFIBUS
for ptp operation communication. A hardware configuration allows you to switch the RS485
interface to point-to-point operation using Object properties and the
parameter "Function RS485".
Parameterization The parameterization of the serial interface happens during runtime using
the SFC 216 (SER_CFG). For this you have to store the parameters in a
DB for all protocols except ASCII.
Communication The SFCs are controlling the communication. Send takes place via
SFC 217 (SER_SND) and receive via SFC 218 (SER_RCV).
The repeated call of the SFC 217 SER_SND delivers a return value for
3964R, USS and Modbus via RetVal that contains, among other things,
recent information about the acknowledgement of the partner station.
The protocols USS and Modbus allow to evaluate the receipt telegram by
calling the SFC 218 SER_RCV after SER_SND.
The SFCs are included in the consignment of the CPU.
Overview SFCs The following SFCs are used for the serial communication:
for serial
communication
SFC Description
SFC 216 SER_CFG RS485 parameterize
SFC 217 SER_SND RS485 send
SFC 218 SER_RCV RS485 receive
Overview The data transfer is handled during runtime by using SFCs. The principle of
data transfer is the same for all protocols and is shortly illustrated in the
following.
Principle Data, which are written into the according data channel by the PLC, is
stored in a FIFO send buffer (first in first out) with a size of 2x1024byte
and then put out via the interface.
When the interface receives data, this is stored in a FIFO receive buffer
with a size of 2x1024byte and can there be read by the PLC.
If the data is transferred via a protocol, the adoption of the data to the
according protocol happens automatically.
In opposite to ASCII and STX/ETX, the protocols 3964R, USS and Modbus
require the acknowledgement of the partner.
An additional call of the SFC 217 SER_SND causes a return value in
RetVal that includes among others recent information about the
acknowledgement of the partner.
Further on for USS and Modbus after a SER_SND the acknowledgement
telegram must be evaluated by call of the SFC 218 SER_RCV.
IN RS485
SER_RCV RECEIVE 1024Byte
SFC 218
1024Byte
SER_CFG
CFG
SFC 216 OUT
1024Byte
SER_SND
SFC 217 SEND 1024Byte
Switch to PtP Per default, the RS485 interface X3 of the CPU is used for the PROFIBUS
operation DP master. Via hardware configuration the RS485 interfaces may be
switched to point-to-point communication via the Parameter Function
RS485 X3 of the Properties.
For this a hardware configuration of the CPU is required, which is
described below.
Requirements Since the VIPA specific CPU parameters may be set, the installation of the
SPEEDBUS.GSD from VIPA in the hardware catalog is necessary.
The CPU may be configured in a PROFIBUS master system and the
appropriate parameters may be set after installation.
VIPA_SPEEDbus
Slot Order No.
0 315-2AG12 ...
Object properties
Note!
The hardware configuration, which is shown here, is only required, if you
want to customize the VIPA specific parameters.
Setting PtP • By double clicking the CPU 315-2AG12 placed in the slave system the
parameters properties dialog of the CPU may be opened.
• Switch the Parameter Function RS485 X3 to "PtP".
Properties RS485 • Logical states represented by voltage differences between the two cores
of a twisted pair cable
• Serial bus connection in two-wire technology using half duplex mode
• Data communications up to a max. distance of 500m
• Data communication rate up to 115.2kbaud
3
RxD/TxD-P (B) RxD/TxD-P (B)
shield
Periphery
RxD/TxD-P (B)
RxD/TxD-N (A)
Periphery
RxD/TxD-P (B)
RxD/TxD-N (A)
Parameterization
SFC 216 The parameterization happens during runtime deploying the SFC 216
(SER_CFG) (SER_CFG). You have to store the parameters for STX/ETX, 3964R, USS
and Modbus in a DB.
Parameter All time settings for timeouts must be set as hexadecimal value. Find the
description Hex value by multiply the wanted time in seconds with the baudrate.
Protocol Here you fix the protocol to be used. You may choose between:
1: ASCII
2: STX/ETX
3: 3964R
4: USS Master
5: Modbus RTU Master
6: Modbus ASCII Master
Note!
The start res. end sign should always be a value <20, otherwise the sign is
ignored!
Parity The parity is -depending on the value- even or odd. For parity control, the
information bits are extended with the parity bit that amends via its value
("0" or "1") the value of all bits to a defined status. If no parity is set, the
parity bit is set to "1", but not evaluated.
0: NONE 1: ODD 2: EVEN
StopBits The stop bits are set at the end of each transferred character and mark the
end of a character.
1: 1bit 2: 1.5bit 3: 2bit
Communication
Overview The communication happens via the send and receive blocks SFC 217
(SER_SND) and SFC 218 (SER_RCV).
The SFCs are included in the consignment of the CPU.
SFC 217 This block sends data via the serial interface.
(SER_SND) The repeated call of the SFC 217 SER_SND delivers a return value for
3964R, USS and Modbus via RetVal that contains, among other things,
recent information about the acknowledgement of the partner station.
The protocols USS and Modbus require to evaluate the receipt telegram by
calling the SFC 218 SER_RCV after SER_SND.
Parameter
Name Declaration Type Comment
DataPtr IN ANY Pointer to Data Buffer for sending data
DataLen OUT WORD Length of data sent
RetVal OUT WORD Error Code ( 0 = OK )
DataPtr Here you define a range of the type Pointer for the send buffer where the
data that has to be sent is stored. You have to set type, start and length.
Example: Data is stored in DB5 starting at 0.0 with a length of
124byte.
DataPtr:=P#DB5.DBX0.0 BYTE 124
STX/ETX
Value Description
9000h Buffer overflow (no data send)
9001h Data too long (>1024byte)
9002h Data too short (0byte)
9004h Character not allowed
3964R
Value Description
2000h Send ready without error
80FFh NAK received - error in communication
80FEh Data transfer without acknowledgement of partner or error
at acknowledgement
9000h Buffer overflow (no data send)
9001h Data too long (>1024byte)
9002h Data too short (0byte)
Principles of The following text shortly illustrates the structure of programming a send
programming command for the different protocols.
Busy ? J Busy ? J
N N
N N
N N
SFC 218
RetVal 2000h ? J RetVal 2000h ? J
SER_RCV
N N
Data evaluation Data evaluation
End End
ASCII / STX/ETX
SFC 217
SER_SND
RetVal 900xh J
Error evaluation
N
End
SFC 218 This block receives data via the serial interface.
(SER_RCV) Using the SFC 218 SER_RCV after SER_SND with the protocols USS and
Modbus the acknowledgement telegram can be read.
Parameter
Name Declaration Type Comment
DataPtr IN ANY Pointer to Data Buffer for received data
DataLen OUT WORD Length of received data
Error OUT WORD Error Number
RetVal OUT WORD Error Code ( 0 = OK )
DataPtr Here you set a range of the type Pointer for the receive buffer where the
reception data is stored. You have to set type, start and length.
Example: Data is stored in DB5 starting at 0.0 with a length of 124byte.
DataPtr:=P#DB5.DBX0.0 BYTE 124
Error This word gets an entry in case of an error. The following error messages
may be created depending on the protocol:
ASCII
Bit Error Description
0 overrun Overflow, a sign couldn’t be read fast enough from the
interface
1 framing error Error that shows that a defined bit frame is not
coincident, exceeds the allowed length or contains an
additional Bit sequence (Stopbit error)
2 parity Parity error
3 overflow Buffer is full
STX/ETX
Bit Error Description
0 overflow The received telegram exceeds the size of the receive
buffer.
1 char A sign outside the range 20h...7Fh has been received.
3 overflow Buffer is full
Principles of The following picture shows the basic structure for programming a receive
programming command. This structure can be used for all protocols.
SFC 218
SER_RCV
RetVal 0000h ? J
N Data evaluation
End
RetVal 8xxxh ? J
N
Error evaluation
End
ASCII ASCII data communication is one of the simple forms of data exchange.
Incoming characters are transferred 1 to 1.
At ASCII, with every cycle the read-SFC is used to store the data that is in
the buffer at request time in a parameterized receive data block. If a
telegram is spread over various cycles, the data is overwritten. There is no
reception acknowledgement. The communication procedure has to be
controlled by the concerning user application. An according Receive_ASCII
FB may be found within the VIPA library in the service area of www.vipa.com.
STX/ETX STX/ETX is a simple protocol with start and end ID, where STX stands for
Start of Text and ETX for End of Text.
The STX/ETX procedure is suitable for the transfer of ASCII characters. It
does not use block checks (BCC). Any data transferred from the periphery
must be preceded by a Start followed by the data characters and the end
character.
Depending of the byte width the following ASCII characters can be
transferred: 5Bit: not allowed: 6Bit: 20...3Fh, 7Bit: 20...7Fh, 8Bit: 20...FFh.
The effective data, which includes all the characters between Start and End
are transferred to the PLC when the End has been received.
When data is send from the PLC to a peripheral device, any user data is
handed to the SFC 217 (SER_SND) and is transferred with added Start-
and End-ID to the communication partner.
Message structure:
STX1 STX2 Z1 Z2 Zn ETX1 ETX2
ZVZ
3964R The 3964R procedure controls the data transfer of a point-to-point link
between the CPU 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.
The procedure employs the following control characters:
STX
Monitor delayed acknowledgment
DLE
Message-data
DLE
ETX
BCC
Monitor delayed acknowledgment
DLE
Note!
When a DLE is transferred as part of the information it is repeated to
distinguish between data characters and DLE control characters that are
used to establish and to terminate the connection (DLE duplication). The
DLE duplication is reversed in the receiving station.
The 3964R procedure requires that a lower priority is assigned to the
communication partner. When communication partners issue simultaneous
send commands, the station with the lower priority will delay its send
command.
You may connect 1 master and max. 31 slaves at the bus where the single
slaves are addressed by the master via an address sign in the telegram.
The communication happens exclusively in half-duplex operation.
After a send command, the acknowledgement telegram must be read by a
call of the SFC 218 SER_RCV.
The telegrams for send and receive have the following structure:
Master-Slave telegram
STX LGE ADR PKE IND PWE STW HSW BCC
02h H L H L H L H L H L
Slave-Master telegram
STX LGE ADR PKE IND PWE ZSW HIW BCC
02h H L H L H L H L H L
Broadcast with set bit 5 A request can be directed to a certain slave ore be send to all slaves as
in ADR-Byte broadcast message. For the identification of a broadcast message you
7 6 5 4 3 2 1 0 have to set bit 5 to 1 in the ADR-Byte. Here the slave addr. (bit 0 ... 4) is
1 ignored. In opposite to a "normal" send command, the broadcast does not
require a telegram evaluation via SFC 218 SER_RCV. Only write
Broadcast commands may be sent as broadcast.
The request telegrams send by the master and the respond telegrams of a
slave have the following structure:
Broadcast with A request can be directed to a special slave or at all slaves as broadcast
slave address = 0 message. To mark a broadcast message, the slave address 0 is used.
In opposite to a "normal" send command, the broadcast does not require a
telegram evaluation via SFC 218 SER_RCV.
Only write commands may be sent as broadcast.
The mode selection happens during runtime by using the SFC 216 SER_CFG.
Supported Modbus The following Modbus Protocols are supported by the RS485 interface
protocols • Modbus RTU Master
• Modbus ASCII Master
Range definitions Normally the access at Modbus happens by means of the ranges 0x, 1x, 3x
and 4x.
0x and 1x gives you access to digital Bit areas and 3x and 4x to analog
word areas.
For the CPs from VIPA is not differentiating digital and analog data, the
following assignment is valid:
1x0001
1x0002 1x0022
1x0003
IN
3x0001 3x0002 3x0003
0x0001
0x0002 0x0022
0x0003
OUT
4x0001 4x0002 4x0003
Overview 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. The description always takes place from the
point of view of the master:
Point of View of The description always takes place from the point of view of the master.
"Input" and Here data, which were sent from master to slave, up to their target are
"Output" data designated as "output" data (OUT) and contrary slave data received by the
master were designated as "input" data (IN).
IN
Respond of the If the slave announces an error, the function code is send back with an
slave "ORed" 80h. Without an error, the function code is sent back.
Slave answer: Function code OR 80h → Error
Function code → OK
Byte sequence For the Byte sequence in a Word is always valid: 1 Word
in a Word High Low
Byte Byte
Check sum CRC, The shown check sums CRC at RTU and LRC at ASCII mode are
RTU, LRC automatically added to every telegram. They are not shown in the data
block.
Command telegram
Slave address Function code Address Number of Check sum
1. Bit Bits CRC/LRC
1Byte 1Byte 1Word 1Word 1Word
Respond telegram
Slave address Function code Number of Data Data Check sum
read Bytes 1. Byte 2. Byte ... CRC/LRC
1Byte 1Byte 1Byte 1Byte 1Byte 1Word
max. 250Byte
Command telegram
Slave address Function code Address Number of Check sum
1. Bit Words CRC/LRC
1Byte 1Byte 1Word 1Word 1Word
Respond telegram
Slave address Function code Number of Data Data Check sum
read Bytes 1. Word 2. Word ... CRC/LRC
1Byte 1Byte 1Byte 1Word 1Word 1Word
max. 125 Words
Command telegram
Slave address Function Address Status Check sum
code Bit Bit CRC/LRC
1Byte 1Byte 1Word 1Word 1Word
Respond telegram
Slave address Function Address Status Check sum
code Bit Bit CRC/LRC
1Byte 1Byte 1Word 1Word 1Word
Respond telegram
Slave address Function Address Value Check sum
code word word CRC/LRC
1Byte 1Byte 1Word 1Word 1Word
Write n Bits 0Fh Code 0Fh: Write n Bits to master output area 0x
Please regard that the number of Bits has additionally to be set in Byte.
Command telegram
Slave address Function Address Number of Number of Data Data Check sum
code 1. Bit Bits Bytes 1. Byte 2. Byte ... CRC/LRC
1Byte 1Byte 1Word 1Word 1Byte 1Byte 1Byte 1Byte 1Word
max. 250 Byte
Respond telegram
Slave address Function Address Number of Check sum
code 1. Bit Bits CRC/LRC
1Byte 1Byte 1Word 1Word 1Word
Write n Words 10h Code 10h: Write n Words to master output area 4x
Command telegram
Slave address Function Address Number of Number of Data Data Check sum
code 1. Word words Bytes 1. Word 2. Word ... CRC/LRC
1Byte 1Byte 1Word 1Word 1Byte 1Word 1Word 1Word 1Word
max. 125 Words
Respond telegram
Slave address Function Address Number of Check sum
code 1. Word Words CRC/LRC
1Byte 1Byte 1Word 1Word 1Word
The following page shows the structure for the according PLC programs for
master and slave.
Master Slave
OB100:
Start Start
N
N
OB1:
SFC 217
SER_SND
(mit Slave-Nr., Code,
Bereich) SFC 217
SER_SND
RetVal 700xh? J
RetVal 8xxxh /
J Error evaluation
90xxh ?
RetVal 0000h ? J
N
RetVal 2001h ? J
N
SFC 218
SER_RCV
N N
RetVal 0000h ? J
N
RetVal 8xxxh ? J Error evaluation
SER_SND Data evaluation
N
RetVal 2001h ?
N
J
Overview Content of this chapter is the deployment of the CPU 315-2AG12 with
PROFIBUS. After a short overview the project engineering and parameteri-
zation of a CPU 315-2AG12 with integrated PROFIBUS-Part from VIPA is
shown.
Further you get information about usage as DP master and DP slave of the
PROFIBUS part.
The chapter is ending with notes to commissioning and start-up behavior.
Overview
Deployment of the Via the PROFIBUS DP master PROFIBUS DP slaves may be coupled to
DP-Master with the CPU. The DP master communicates with the DP slaves and links up its
CPU data areas with the address area of the CPU.
At every POWER ON res. overall reset the CPU fetches the I/O mapping
data from the master. At DP slave failure, the ER-LED is on and the OB 86
is requested. If this is not available, the CPU switches to STOP and BASP
is set. As soon as the BASP signal comes from the CPU, the DP master is
setting the outputs of the connected periphery to zero. The DP master
remains in the operating mode RUN independent from the CPU.
DP slave operation For the deployment in a super-ordinated master system you first have to
project your slave system as Siemens CPU in slave operation mode with
configured in-/output areas. Afterwards you configure your master system.
Couple your slave system to your master system by dragging the CPU 31x
from the hardware catalog at Configured stations onto the master system,
choose your slave system and connect it.
Fast introduction
Steps of For the configuration of the PROFIBUS DP master please follow the
configuration following approach:
Note
To be compatible to the Siemens SIMATIC manager, the CPU 315-2AG12 from VIPA is
to be configured as
The integrated PROFIBUS DP master (X3) is to be configured and connected via the
sub module X2 (DP).
The Ethernet PG/OP channel of the CPU 315-2AG12 is always to be configured as 1.
module after the really plugged modules at the standard bus as CP343-1 (343-1EX11)
from Siemens.
Requirements The hardware configuration of the VIPA CPU takes place at the Siemens
hardware configurator.
The hardware configurator is a part of the Siemens SIMATIC Manager. It
serves the project engineering. The modules, which may be configured
here are listed in the hardware catalog. If necessary you have to update
the hardware catalog with Options > Update Catalog.
For project engineering a thorough knowledge of the Siemens SIMATIC
manager and the Siemens hardware configurator are required!
Note!
Please consider that this SPEED7-CPU has 4 ACCUs. After an arithmetic
operation (+I, -I, *I, /I, +D, -D, *D, /D, MOD, +R, -R, *R, /R) the content of
ACCU 3 and ACCU 4 is loaded into ACCU 3 and 2.
This may cause conflicts in applications that presume an unmodified
ACCU2.
For more information may be found in the manual "VIPA Operation list
SPEED7" at "Differences between SPEED7 and 300V programming".
Proceeding To be compatible with the Siemens SIMATIC manager the following steps
should be executed:
Proceeding • Open the properties dialog of the DP interface of the CPU by means of
a double-click at DP.
• Set Interface type to "PROFIBUS"
• Connect to PROFIBUS and preset an address (preferably 2) and
confirm with [OK].
• Switch at Operating mode to "DP master" and confirm the dialog with
[OK]. A PROFIBUS DP master system is inserted.
Slot Module
1
2 CPU ... PROFIBUS DP master system
X2 DP
X1 MPI/DP
3
Slot Module
1
2 CPU ... PROFIBUS DP master system
X2 DP
X1 MPI/DP
3
Fast introduction In the following the deployment of the PROFIBUS section as "intelligent"
DP slave on master system is described, which exclusively may be
configured in the Siemens SIMATIC manager.
The following steps are required:
• Configure a station with a CPU with operating mode DP slave.
• Connect to PROFIBUS and configure the in-/output area for the slave
section.
• Save and compile your project.
• Configure another station with another CPU with operating mode DP
master.
• Connect to PROFIBUS and configure the in-/output ranges for the
master section
• Save, compile and transfer your project to your CPU.
Project • Start the Siemens SIMATIC manager and configure a CPU as described
engineering of the at "Hardware configuration - CPU".
slave section • Designate the station as "...DP slave"
• Add your modules according to the real hardware assembly.
• Open the properties dialog of the DP interface of the CPU by means of
a double-click at DP.
• Set Interface type to "PROFIBUS"
• Connect to PROFIBUS and preset an address (preferably 3) and
confirm with [OK].
• Switch at Operating mode to "DP slave"
• Via Configuration you define the in-/output address area of the slave
CPU, which are to be assigned to the DP slave.
• Save, compile and transfer your project to your CPU.
Slave section
Master section
Standard bus
Slot Module
1
2 CPU ...
DP master system
X2 DP
X1 MPI/DP
3 ... 2
Modules S7-300
1 ... Hardware catalog: CPU 31x
from configured stations
3
Object properties Object properties
Operating mode: DP master Configuration:
Connect: PROFIBUS Input area slave CPU = Output area master-CPU
PROFIBUS address: > 1 Output area slave CPU = Input area Master-CPU
Transfer medium As transfer medium PROFIBUS uses an isolated twisted-pair cable based
upon the RS485 interface.
The RS485 interface is working with voltage differences. Though it is less
irritable from influences than a voltage or a current interface. You are able
to configure the network as well linear as in a tree structure.
Max. 32 participants per segment are permitted. Within a segment the
members are linear connected. The segments are connected via
repeaters. The maximum segment length depends on the transfer rate.
PROFIBUS DP uses a transfer rate between 9.6kbaud and 12Mbaud, the
slaves are following automatically. All participants are communicating with
the same transfer rate.
The bus structure under RS485 allows an easy connection res.
disconnection of stations as well as starting the system step by step. Later
expansions don’t have any influence on stations that are already
integrated. The system realizes automatically if one partner had a fail down
or is new in the network.
Bus connection The following picture illustrates the terminating resistors of the respective
start and end station.
6 6
P5V P5V
330 330
220 220
330 330
5 5
M5V M5V
Note!
The PROFIBUS line has to be terminated with its ripple resistor. Please
make sure to terminate the last participants on the bus at both ends by
activating the terminating resistor.
EasyConn In PROFIBUS all participants are wired parallel. For that purpose, the bus
bus connector cable must be feed-through.
Via the order number VIPA 972-0DP10 you may order the bus connector
"EasyConn". This is a bus connector with switchable terminating resistor
and integrated bus diagnostic.
0° 45° 90°
A A A
B B B C
0° 45° 90°
A 64 61 66
B 34 53 40
C 15.8 15.8 15.8
all in mm
Note!
To connect this EasyConn plug, please use the standard PROFIBUS cable
type A (EN50170). Starting with release 5 you also can use highly flexible
bus cable: Lapp Kabel order no.: 2170222, 2170822, 2170322.
With the order no. 905-6AA00 VIPA offers the "EasyStrip" de-isolating tool
that makes the connection of the EasyConn much easier.
11 6
Dimensions in mm
Termination with The "EasyConn" bus connector is provided with a switch that is used to
"EasyConn" activate a terminating resistor.
Wiring
1./last further Attention!
bus participant participants The terminating resistor is only
effective, if the connector is installed at
a bus participant and the bus participant
is connected to a power supply.
Note!
A complete description of installation
and deployment of the terminating
resistors is delivered with the connector.
Please note: The green line must be connected to A, the red line to B!
Start-up on In delivery the CPU is overall reset. The PROFIBUS part is deactivated and
delivery its LEDs are off after Power ON.
Online with bus The DP master can be served with bus parameters by means of a
parameter without hardware configuration. As soon as these are transferred the DP master
slave project goes online with his bus parameter. This is shown by the RUN LED. Now
the DP master can be contacted via PROFIBUS by means of his
PROFIBUS address. In this state the CPU can be accessed via
PROFIBUS to get configuration and DP slave project.
Slave If the master has received valid configuration data, he switches to Data
configuration Exchange with the DP Slaves. This is indicated by the DE-LED.
CPU state controls After PowerON respectively a receipt of a new hardware configuration the
DP master configuration data and bus parameter were transferred to the DP master.
Dependent on the CPU state the following behavior is shown by the DP
master:
Master behavior at • The global control command "Clear" is sent to the slaves by the master.
CPU STOP Here the DE-LED is blinking.
• DP slaves with fail safe mode were provided with output telegram length
"0".
• DP slaves without fail safe mode were provided with the whole output
telegram but with output data = 0.
• The input data of the DP slaves were further cyclically transferred to the
input area of the CPU.
Master behavior at • The global control command "Operate" is sent to the slaves by the
CPU RUN master. Here the DE-LED is on.
• Every connected DP slave is cyclically attended with an output telegram
containing recent output data.
• The input data of the DP slaves were cyclically transferred to the input
area of the CPU.
LEDs Dependent on the mode of operation the LEDs show information about the
PROFIBUS/PtP state of operation of the PROFIBUS part according to the following pattern:
interface X3
Master operation
RN ER DE IF Meaning
(RUN) (ERR)
green red green red
Master has no project, this means the interface is deactivated respectively
○ ○ ○ ○ PtP is active.
● ○ ○ ○ Master has bus parameters and is in RUN without slaves.
Master is in "clear" state (safety state). The inputs of the slaves may be
● ○ ☼ ○ read. The outputs are disabled.
Master is in "operate" state, this means data exchange between master and
● ○ ● ○ slaves. The outputs may be accessed.
● ● ● ○ CPU is in RUN, at least 1 slave is missing.
Slave operation
RN ER DE IF Meaning
(RUN) (ERR)
green red green red
○ ○ ○ ○ Slave has no project respectively PtP is active.
Chapter 7 WinPLC7
Overview In this chapter the programming and simulation software WinPLC7 from
®
VIPA is presented. WinPLC7 is suited for every with Siemens STEP 7
programmable PLC.
Besides the system presentation and installation here the basics for using
the software is explained with a sample project.
More information concerning the usage of WinPLC7 may be found in the
online help respectively in the online documentation of WinPLC7.
System presentation
General WinPLC7 is a programming and simulation software from VIPA for every
®
PLC programmable with Siemens STEP 7.
This tool allows you to create user applications in FBD, LAD and STL.
Besides of a comfortable programming environment, WinPLC7 has an
integrated simulator that enables the simulation of your user application at
the PC without additional hardware.
This “Soft-PLC” is handled like a real PLC and offers the same error
behavior and diagnosis options via diagnosis buffer, USTACK and
BSTACK.
Note!
Detailed information and programming samples may be found at the online
help respectively in the online documentation of WinPLC7.
Alternatives There is also the possibility to use according configuration tools from
Siemens instead of WinPLC7 from VIPA.
Here the proceeding is part of this manual.
Source You may receive a demo version from VIPA. Without any activation with
the demo version the CPUs 11x of the System 100V from VIPA may be
configured.
To configure the SPEED7 CPUs a license for the "profi" version is
necessary. This may be online received and activated.
There are the following sources to get WinPLC7:
Installation
Preconditions The project engineering of a SPEED7 CPU from VIPA with WinPLC7 is
only possible using an activated "Profi" version of WinPLC7.
Installation The installation and the registration of WinPLC7 has the following
WinPLC7 approach:
Demo • For installation of WinPLC7 start the setup program of the
corresponding CD respectively execute the online received exe file.
• Choose the according language.
• Agree to the software license contract.
• Set an installation directory and a group assignment and start the
installation.
Installation of To find a station via Ethernet (accessible nodes) you have to install the
WinPCAP for WinPCAP driver. This driver may be found on your PC in the installation
station search via directory at WinSPS-S7-V5/WinPcap_... .exe.
Ethernet Execute this file and follow the instructions.
Hardware • For the call of the hardware configurator it is necessary to set WinPLC7
configuration from the Simulator-Mode to the Offline-Mode. For this and the communi-
cation via Ethernet set "Target: TCP/IP Direct".
• Enter a station name. Please consider that the name does not contain
any spaces.
• After the load animation choose in the register Select PLC-System the
system "VIPA SPEED7" and click to [Create]. A new station is created.
• Save the empty station.
• By double click or drag&drop the according VIPA CPU in the hardware
catalog at CPU SPEED7 the CPU is inserted to your configuration.
• For output place a digital output module and assign the start address 124.
• Save the hardware configuration.
Online access via • Open the CPU-Properties, by double clicking to the CPU at slot 2 in the
Ethernet PG/OP hardware configurator.
channel • Click to the button [Ethernet CP-Properties (PG/OP-channel)]. The
Properties CP343 is opened.
• Chose the register Common Options.
• Click to [Properties Ethernet].
• Choose the subnet "PG_OP_Ethernet".
• Enter a valid IP address-and a subnet mask. You may get this from your
system administrator.
• Close every dialog window with [OK].
• Select, if not already done, "Target: External TCP/IP direct".
• Open with Online > Send configuration to the CPU a dialog with the
same name.
• Click to [Accessible nodes]. Please regard to use this function it is
necessary to install WinPCap before!
• Choose your network card and click to [Determining accessible nodes].
After a waiting time every accessible station is listed. Here your CPU
with IP 0.0.0.0 is listed, too. To check this the according MAC address is
also listed. This MAC address may be found at a label beneath the front
flap of the CPU.
• For the temporary setting of an IP address select you CPU and click to
[Temporary setting of the IP parameters]. Please enter the same IP
parameters, you configured in the CPU properties and click to [Write
Parameters].
• Confirm the message concerning the overall reset of the CPU. The IP
parameters are transferred to the CPU and the list of accessible stations
is refreshed.
• Select you CPU and click to [Confirm]. Now you are back in the dialog
"Send configuration".
Transfer hardware • Choose your network card and click to [Send configuration]. After a
configuration short time a message is displayed concerning the transfer of the
configuration is finished.
Note!
Usually the online transfer of the hardware configuration happens within
the hardware configurator.
With File > Save active station in the WinPL7 sub project there is also the
possibility to store the hardware configuration as a system file in WinPLC7
to transfer it from WinPLC7 to the CPU.
The hardware configuration is finished, now and the CPU may always be
accessed by the IP parameters as well by means of WinPLC7.
• Enter "FC1" as block and confirm with [OK]. The editor for FC 1 is
called.
Creating In the upper part of the editor there is the parameter table. In this example
parameters the 2 integer values value1 und value2 are to be compared together. Since
both values are read only by the function, these are to be defined as "in".
• Select the "in -->" row at the parameter table and enter at the field
Name "value1". Press the [Return] key. The cursor jumps to the column
with the data type.
• The data type may either directly be entered or be selected from a list of
available data types by pressing the [Return] key. Set the data type to
INT and press the [Return] key. Now the cursor jumps to the Comment
column.
• Here enter "1. compare value" and press the [Return] key. A new "in -->"
row is created and the cursor jumps to Name.
• Proceed for value2 in the same way as described for value1.
• Save the block. A note that the interface of the block was changed may
be acknowledged with [Yes].
Enter the program As requested in the job definition, the corresponding output is activated
depending on the comparison of value1 and value2. For each comparison
operation a separate network is to be created.
• The program is to be created as FBD (function block diagram). Here
change to the FBD view by clicking at FBD.
• Click to the input left above and insert value1. Since these are block
parameters a selection list of block parameters may be viewed by
entering "#".
• Type in "#" and press the [Return] key.
• Choose the corresponding parameter and confirm it with the [Return]
key.
• Proceed in the same way with the parameter value2.
The allocation to the corresponding output, here Q 124.0, takes place with
the following proceeding:
• Click to the output at the right side of the operator.
• Open in the catalog the category "Bit logic" and select the function
"--[=]". The inserting of "--=" corresponds to the WinPLC7 shortcut [F7].
• Insert the output Q 124.0 by clicking to the operand.
Adding a new For further comparisons the operations "CMP>I" at Q 124.1 and "CMP<I"
network at Q 124.2 are necessary. Create a network for both operations with the
following proceeding:
FC1 After you have programmed the still missing networks, the FC 1 has the
following structure:
Test the PLC With WinPLC7 there is the possibility to test your project in a simulator.
program in the • Here select "Target: Simulator".
Simulator
• Transfer the blocks to the simulator with [Load all blocks into the PLC].
• Switch the CPU to RUN, by clicking at RUN in the "CPU Control Center"
of "Edit project". The displayed state changes from STOP to RUN.
• To view the process image select View > Display process image
window or click at . The various areas are displayed.
• Double click to the process image and enter at "Line 2" the address
PQB 124. Confirm with [OK]. A value marked by red color corresponds
to a logical "1".
• Open the OB 1.
• Change the value of one variable, save the OB 1 and transfer it to the
simulator. According to your settings the process image changes
immediately. The status of your blocks may be displayed with Block >
Monitoring On/Off.
Visualization via A further component of the simulator is the PLC mask. Here a CPU is
PLC mask graphically displayed, which may be expanded by digital and analog
peripheral modules.
As soon as the CPU of the simulator is switched to RUN state, inputs may
be activated by mouse and outputs may be displayed.
• Open the PLC mask with view > PLC mask. A CPU is graphically
displayed.
• Double-click to the output module, open its properties dialog and enter
the Module address 124.
• Switch the operating mode switch to RUN by means of the mouse. Your
program is executed and displayed in the simulator, now.
Transfer PLC • For transfer to the CPU set the transfer mode to "Target: TCP/IP-
program to CPU Direct".
and its execution • If there are more network adapters in your PC, the network adapter may
be selected via Extras > Select network adapter.
• For presetting the Ethernet data click to [...] and click to
[Accessible nodes].