Professional Documents
Culture Documents
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 3
1.4.10 Word Logic Instructions
1.5 Introduction and overview of blocks
1.5.1 Function blocks
1.5.2 Data blocks
1.5.3 Functions
1.5.4 System Function Blocks (SFB)
1.5.5 System Functions (SFC)
1.6 Organization Blocks
1.6.1What Are Organization Blocks?
1.6.2 Which OBs Are Available?
1.6.3 Time-of-Day Interrupt Organization Blocks
1.6.4 Time-Delay Interrupt Organization Blocks
1.6.5 Cyclic Interrupt Organization Blocks (OB30 to OB38)
1.6.6 I/O Redundancy Error OB (OB70)
1.6.7 CPU Redundancy Error OB (OB72)
1.6.8 Communication Redundancy Error OB (OB73)
1.6.9 Time Error Organization Block (OB80)
1.6.10 Power Supply Error Organization Block (OB81)
1.7 Fault Finding
1.7.1 Testing the Program with Program Status
1.7.2 Testing with Variable Tables
1.7.3 Fault Finding
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 5
1.0 Basics of Siemens PLC system
1.1 Introduction to PLC
The first Programmable Logic Controller (PLC) was developed by a group of engineers at General Motors in
1968, when the company were looking for an alternative to replace complex relay control systems.
The new control system had to meet the following requirements:
• Simple programming
• Program changes without system intervention (no internal rewiring)
• Smaller, cheaper and more reliable than corresponding relay control systems
• Simple, low cost maintenance
Subsequent development resulted in a system, which enabled the simple connection of binary signals. The
requirements as to how these signals were to be connected were specified in the control program. With the
new systems it became possible for the first time to plot signals on a screen and to file these in electronic
memories.
The original task of a PLC involved the interconnection of input signals according to a specified program and,
if "true", to switch the corresponding output. Boolean algebra forms the mathematical basis for this operation,
which recognizes precisely two defined statuses of one variable: "0" and "1. Accordingly, an output can only
assume these two statuses. For instance, a connected motor could therefore be either switched on or off, i.e.
controlled. This function has coined the name PLC: Programmable logic controller, i.e. the input/output
behavior is similar to that of an electromagnetic relay or pneumatic switching valve controller; the program is
stored in an electronic memory.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 6
However, the tasks of a PLC have rapidly multiplied: Timer and counter functions, memory setting and
resetting, mathematical computing operations all represent functions, which can be executed by practically
any of today’s PLCs.
The networking of several PLCs as well as that of a PLC and master computer is affected via special
communication interfaces. To this effect, many of the more recent PLCs are compatible with open,
standardized bus systems, such as Profibus. Thanks to the enormously increased performance capacity of
advanced PLCs, these can even directly assume the function of a master computer.
Many PLCs can be expanded by means of additional input/output, analogue, positioning and communication
modules. Special PLCs are available for safety technology, shipping or mining tasks. Yet further PLCs are
able to process several programs simultaneously – (multitasking). Finally, PLCs are coupled with other
automation components, thus creating considerably wider areas of application.
1.1.2 From where does a PLC get information about the state of a process?
A PLC receives information about the process from Signal generators, which are wired to the inputs of the
PLC. These signal generators can be e.g. sensors, which recognize whether a working part, switches or
buttons lie in a certain position. This position can be closed or opened. Please note the variation between NC
contacts, which are inactive when closed, and NO contacts, which are inactive when open.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 7
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 8
Note: The time that the processor requires for this execution is called a cycle time. This time is independent
from the number and types of commands.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 9
- In addition to the areas above, the system memory of the CPU also provides temporary memory (local
data stack) that contains temporary data for a block when it is called. This data only remains valid as
long as the block is active.
Bit No 7 6 5 4 3 2 1 0
Byte 0
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 10
Byte 1
Byte 2
Bit Addressing
V B 100
byte address MSB LSB
access as byte VB100 7 VB100 0
memory area identifier
V W 100
byte address MSB LSB
access as word
memory area identifier VW100 7 VB100 0 7 VB101 0
V D 100
byte address
access as double word
memory area identifier
MSB LSB
7 VB100 0 7 VB101 0 7 VB102 0 7 VB103 0
VD100
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 11
Data Types In STEP 7
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 12
1.2 Hardware Information
1.2.1 Assembly and operation of the Simatic S7-300.
The SIMATIC S7-300 is a modular miniature control system and provides the following device spectrum:
CP:
PS: IM: SM: FM:
Power supply Interface modules Communication
Signal modules Function modules
processors
DI/DO Servo motor
ASI- Bus system
AI/AO PID Control
Profibus DP
e.g. PS 307 2A e.g. IM 365 e.g. SM 323 e.g. FM 365 C
e.g. FM 365 C
- Central processing units (CPUs) with different power ranges, partly integrated with In-/Outputs
o (e.g. CPU312IFM/CPU314IFM) or integrated with a PROFIBUS- Interface (e.g.
CPU318-2DP)
- Power supply devices (PS) with 2A, 5A or 10A.
o PS 307 5A
- Interface modules (IMs) for a more interconnecting design of the SIMATIC S7-300
o IM 365
- Signal modules (SMs) for digital and analog in and output.
o E.g. SM 321Digital Input 16x 24V DC
o SM 322 Digital Output 16x 24V DC, 0.5A
o SM 322 Digital Output 8x 230V AC Relay
o SM 331 Analog Input 2x 12 Bit
o SM 332 Analog Output 2x12 Bit
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 13
o SM DI/DO
o SM 334 AI 4/AO 2x 8 bit
- Function modules (FMs) for special functions (e.g. stepping motor control, closed loop control)
o FM
- Communication processors (CP) for network connection.
o CP 341-1 Ethernet
o CP 341 RS 485
Status indicator
Supply voltage
selector switch
MPI- Interface:
Each CPU possesses an MPI interface for the networking of program devices (e.g. PC adapter). This is found
behind a flap at the front of the CPU.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 15
Work type switch/ Mode selector:
Each CPU possesses a code switch for the switching of the modes of operation. Certain programmed
functions are allowed depending upon the position of the code switch. The following modes of operation are
possible:
1.3 STEP 7
Using the STEP 7 software, you can create your S7 program within a project. The S7 programmable
controller consists of a power supply unit, a CPU, and input and output modules (I/O modules). The
programmable logic controller (PLC) monitors and controls your machine with the S7 program. The I/O
modules are addressed in the S7 program via the addresses.
With STEP 7, the following functions can be used for the automation construction:
- Configuring and parameterization of hardware
- Generation of a user program
- Debug, commissioning, and service
- Documentation, archiving
- Operation-/Diagnostic functions
11. When the button Accessible Nodes is clicked and all parameters were correctly selected, the
screen will display the following picture with a folder for the reached MPI interface. The MPI-
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 17
• If you want to change the default parameters of a module (for example, enable a hardware interrupt for a
module)
• If you want to configure communication connections
• For stations with a distributed I/O (PROFIBUS-DP)
• For S7-400 stations with a number of CPUs (multicomputing) or expansion racks
• For fault-tolerant (H) programmable control systems (optional package)
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 18
Procedure for Configuring and Assigning
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 19
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 20
Arranging Modules in a Rack
1. Select a module (for example, a CPU) from the ”Hardware Catalog" window. The slots available for
this module are highlighted in color.
2. Drag & drop the module into the appropriate row of the rack (configuration table). STEP 7 checks
whether any slot rules are violated (an S7-300 CPU must not, for example, be inserted in slot 2).
Displaying the Version of the CPU Operating System in the 'Hardware Catalog' window
When a CPU has more than one operating system this CPU is shown as a folder with different order number
icons in the "Hardware Catalog" window. The different versions of the CPU operating system are arranged
under the order number icons. Please check the version of your CPU's operating system and select the correct
version in the "Hardware Catalog" window.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 21
Assigning Addresses
There is a difference between assigning addresses to nodes and assigning input/output addresses (I/O
addresses).
Node addresses are addresses of programmable modules (MPI, PROFIBUS, Industrial Ethernet addresses);
they are required in order to be able to address the various nodes in a subnet, for example, in order to
download a user program to a CPU. You will find information on assigning node addresses in the subnet in
the chapter on networking stations.
Input/output (I/O) addresses are required in order to read inputs and set outputs in the user program.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 22
You can only assign symbols to the inputs and outputs of digital or analog modules when configuring the
hardware. With integrated inputs/outputs (for example, CPU 312 IFM), in CPs, FMs, and S5 modules (for
example, configured via the adapter module) you must assign the symbols in the symbol table.
The assigned symbols are not downloaded to the station (menu command: PLC > Download). The
consequence of this is: when you upload a station configuration back into the programming device (menu
command: PLC > Upload), no symbols are displayed.
1. Select the digital/analog module to whose addresses you want to assign symbols.
2. Select the menu command Edit > Symbols or press the right mouse button and select the Symbols
command in the pop-up menu.
You can assign symbols in the dialog box that appears.
If you click the "Add Symbol" button in the dialog box, the name of the address is entered as the
symbol.
Before downloading, use the Station > Check Consistency menu command to make sure there are no errors
in your station configuration. STEP 7 then checks to see whether downloadable system data can be created
from the present configuration. Any errors found during consistency checking are displayed in a window.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 23
Requirements for Downloading
• The programming device (PG) is connected to the MPI interface of the CPU using an MPI cable.
• In a networked system (programming device is connected to a subnet): All modules in a subnet must have
different node addresses and the actual configuration must match the network configuration you created.
• The present configuration must match the actual station structure. A configuration can only be downloaded
to the station if it is consistent and free of errors. Only then can system data blocks (SDBs) be created which
can in turn be downloaded to the modules.
• If the station structure contains modules that were configured and assigned parameters using optional
software packages: The optional package must be authorized.
Procedure
• Select the menu command PLC > Download To Module. STEP 7 guides you by means of dialog boxes to
the result.
The configuration for the complete programmable controller is downloaded to the CPU. The CPU parameters
become active immediately. The parameters for the other modules are transferred to the modules during
startup.
Changing the CPU Operating Mode During Downloading
When you trigger the function PLC > Download, you can execute the following actions on the programming
device guided by the dialog boxes:
• Switch the CPU to STOP
(if the mode selector is set to RUN-P or the connection to the CPU is authorized by password)
• Compress the memory
(if not enough continuous free memory is available)
• Switch the CPU back to RUN
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 25
Absolute Addresses
Every input and output has an absolute address predefined by the hardware configuration. This address is
specified directly; that is, absolutely. The absolute address can be replaced by any symbolic name you choose.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 26
- In the symbol table, you assign a symbolic name and the data type to all the absolute addresses
which you will address later on in your program; for example, for input I 0.1 the symbolic name
Key 1. These names apply to all parts of the program and are known as global variables.
- Using symbolic programming, you can considerably improve the legibility of the S7 program you
have created.
- Navigate in the project window "Getting Started" until you reach S7 Program (1) and double-click
to
- open the Symbols component.
- Your symbol table currently only consists of the predefined organization block OB1.
- Click Cycle Execution and overwrite it with "Main Program" for our example.
- Enter the symbol you want to use and "Q 4.0" in row 2. The data type is added automatically.
- Click in the comment column of row 1 or 2 to enter a comment on the symbol. You complete your
entries in a row by pressing Enter, which then adds a new row.
- Enter another symbol and "Q 4.1" in row 3 and press Enter to complete the entry.
- Save the entries or changes you have made in the symbol table and close the window.
The user must implement the following steps in order to provide a project in which the solution program can
be written.
1. The main tool in STEP 7 is the SIMATIC Manager, which can be opened with a double click on the icon (
=> SIMATIC Manager).
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 27
2. STEP 7- Programs are managed in projects. Each project can be newly created ( => File => New).
3. Give the project the Name startup. ( => startup => OK)
4. Insert a new S7-Program into startup. ( => startup => Insert => Program => S7-Program)
5. The program execution is written into blocks in STEP 7. According to standards, the organization block
OB1 is already present. This represents the interface for the operating system of the CPU, which will be
automatically called and cyclically worked on.
From this organization block, further blocks e.g. the function FC1 can be called for a program routine. This
serves as a process to divide a total task into sub-problems, which are then simpler to solve and simpler to test
for functionally.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 28
1.3.4 Blocks in the User Program
The STEP 7 programming software allows you to structure your user program, in other words to break down
the program into individual, self-contained program sections. This has the following advantages:
Block Types
There are several different types of blocks you can use within an S7 user program:
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 29
Organization Block Priority
Organization blocks determine the sequence (start events) by which individual program sections are executed.
An OB call can interrupt the execution of another OB. Which OB is allowed to interrupt another OB depends
on its priority. Higher priority OBs can interrupt lower priority OBs. The background OB has the lowest
priority.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 30
Programming OB1 in Ladder Logic
In the following section, you will program a series circuit, a parallel circuit, and the set / reset memory
function in Ladder Logic (LAD).
Set LAD as the programming language in the View menu.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 31
You must have already established an online connection in order to download the program.
Resetting the CPU and Switching it to RUN.
- Turn the operating mode switch to the MRES position and hold it there for at least 3 seconds until
the red "STOP" LED starts flashing slowly.
- Release the switch and, after a maximum of 3 seconds, turn it to the MRES position again. When
the "STOP" LED flashes quickly, the CPU has been reset.
- If the "STOP" LED does not start flashing quickly, repeat the procedure.
STOP Mode
Set the operating mode from RUN to STOP before you do the following:
- Download the complete user program or parts of it to the CPU
- Execute a memory reset on the CPU
- Compress the user memory\
Programming online
In practice, you may need to change the blocks already downloaded to the CPU for test purposes. To do this,
double-click the required block in the online window to open the LAD/STL/FBD program window. Then
program the block as usual. Note that the programmed block immediately becomes active in your CPU.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 33
Saving Information from the Programmable Controller
This measure may be necessary if, for example, the offline project data of the version running on the CPU are
not, or only partially, available. In this case, you can at least retrieve the project data that are available online
and upload them to your programming device.
Fast Configuring
Entering the station configuration is easier if you upload the configuration data from the programmable
controller to your programming device after you have configured the hardware and restarted (warm restart)
the station. This provides you with the station configuration and the types of the individual modules. Then all
you have to do is specify these modules in more detail (order number) and assign them parameters.
Uploading a Station
Using the menu command PLC > Upload Station you can upload the current configuration and all blocks
from the programmable controller of your choice to the programming device.
To do this, STEP 7 creates a new station in the current project under which the configuration will be saved.
You can change the preset name of the new station (for example, "SIMATIC 300-Station(1)"). The inserted
station is displayed both in the online view and in the offline view.
The menu command can be selected when a project is open. Selecting an object in the project window or the
view (online or offline) has no effect on the menu command.
You can use this function to make configuring easier.
• For S7-300 programmable controllers, the configuration for the actual hardware configuration is uploaded
including the expansion racks, but without the distributed I/O (DP).
• For S7-400 programmable controllers, the rack configuration is uploaded without the expansion racks and
without the distributed I/O.
With S7-300 systems without distributed I/O, all you have to do is specify the modules in more detail (order
number) and assign them parameters.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 34
1.4 Commonly used instructions
1.4.1. Bit logic instructions
Bit logic instructions work with two digits, 1 and 0. These two digits form the base of a number system called
the binary system. The two digits 1 and 0 are called binary digits or bits. In the world of contacts and coils, a
1 indicates activated or energized, and a 0 indicates not activated or not energized.
The bit logic instructions interpret signal states of 1 and 0 and combine them according to Boolean logic.
These combinations produce a result of 1 or 0 that is called the “result of logic operation” (RLO).
The logic operations that are triggered by the bit logic instructions perform a variety of functions.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 35
• ---( SE ) Extended Pulse Timer Coil
• ---( SD ) On-Delay Timer Coil
• ---( SS ) Retentive On-Delay Timer Coil
• ---( SA ) Off-Delay Timer Coil
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 36
Time Value
Bits 0 through 9 of the timer word contain the time value in binary code. The time value specifies a number of
units. Time updating decrements the time value by one unit at an interval designated by the time base.
Decrementing continues until the time value is equal to zero. You can load a time value into the low word of
accumulator 1 in binary, hexadecimal, or binary coded decimal (BCD) format.
You can pre-load a time value using either of the following formats:
• W#16#wxyz
- Where w = the time base (that is, the time interval or resolution)
- Where xyz = the time value in binary coded decimal format
• S5T#aH_bM_cS_dMS
- Where H = hours, M = minutes, S = seconds, and MS = milliseconds; a, b, c, d are defined by the user.
- The time base is selected automatically, and the value is rounded to the next lower number with that time
base.
The maximum time value that you can enter is 9,990 seconds, or 2H_46M_30S.
S5TIME#4S = 4 seconds
s5t#2h_15m = 2 hours and 15 minutes
S5T#1H_12M_18S = 1 hour, 12 minutes, and 18 seconds.
Time Base
Bits 12 and 13 of the timer word contain the time base in binary code. The time base defines the interval at
which the time value is decremented by one unit. The smallest time base is 10 ms; the largest is 10 s.
Values that exceed 2h46m30s are not accepted. A value whose resolution is too high for the range limits (for
example, 2h10ms) is truncated down to a valid resolution. The general format for S5TIME has limits to range
and resolution as shown below:
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 37
Counters have an area reserved for them in the memory of your CPU. This memory area reserves one 16-bit
word for each counter address. The ladder logic instruction set supports 256 counters.
The counter instructions are the only functions that have access to the counter memory area.
Count Value
Bits 0 through 9 of the counter word contain the count value in binary code. The count value is moved to the
counter word when a counter is set. The range of the count value is 0 to 999.
You can vary the count value within this range by using the following counter instructions:
• S_CUD Up-Down Counter
• S_CD Down Counter
• S_CU Up Counter
• ---( SC ) Set Counter Coil
• ---( CU ) Up Counter Coil
• ---( CD ) Down Counter Coil
IN1 and IN2 are compared according to the type of comparison you choose:
= = IN1 is equal to IN2
<> IN1 is not equal to IN2
> IN1 is greater than IN2
< IN1 is less than IN2
>= IN1 is greater than or equal to IN2
<= IN1 is less than or equal to IN2
If the comparison is true, the RLO of the function is "1". It is linked to the RLO of a rung network by AND if
the compare element is used in series, or by OR if the box is used in parallel.
The following comparison instructions are available:
• CMP ? I Compare Integer
• CMP ? D Compare Double Integer
• CMP ? R Compare Real
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 38
CMP ? I Compare Integer Symbols
MOVE (Assign a Value) is activated by the Enable EN Input. The value specified at the IN input is copied to
the address specified at the OUT output. ENO has the same logic state as EN. MOVE can copy only BYTE,
WORD, or DWORD data objects. User-defined data types like arrays or structures have to be copied with
the system function "BLKMOVE" (SFC 20).
Example
The instruction is executed if I0.0 is "1". The content of MW10 is copied to data word 12 of the currently
open DB.
Q4.0 is "1" if the instruction is executed.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 39
1.4.6 Integer Math Instructions
Using integer math, you can carry out the following operations with two integer numbers (16 and 32 bits):
• ADD_I Add Integer
• SUB_I Subtract Integer
• MUL_I Multiply Integer
• DIV_I Divide Integer
• ADD_DI Add Double Integer
• SUB_DI Subtract Double Integer
• MUL_DI Multiply Double Integer
• DIV_DI Divide Double Integer
• MOD_DI Return Fraction Double Integer
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 40
If similar measurements with a PLC are processed, then the inputted voltage, current or resistance value must
be converted into digital information. One indicates this conversion as analog--digital conversion (A/D
conversion). This means, that e.g. the voltage value of 3.65V is deposited as information into a row of
equivalent binary digits. The more equivalent binary digits are used for the digital representation, thus the
resolution becomes finer. If one would have used 1 bit e.g. for the voltage range 0... +10V, only one statement
could be met, if the measured voltage in the range 0...+5V or in the range +5V...+10V. With 2 bits, the range
can be partitioned into 4 single areas, 0... 2.5/2.5... 5/5... 7.5/7.5... 10V. Usually A/D conversion in control
systems engineering changes with 8 or 11 bit. You have 256 single areas with 8 bits and with 11 bit a
resolution of 2048 single areas.
For analog value processing, Data types INT and REAL play a big role, because inputted analog values exist
as real numbers in the format INT. Due rounding errors by INT, only real numbers REAL come into question
for an accurate further processing.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 41
Input And Normalize Analog Value
If an analog value is presented as a digitized value, it must still be normalized before it can be processed in
the PLC.
Likewise, the analog output from the peripheral output value follows after the normalization of the output
value. In a STEP 7- Program, normalizing is caught in the math operation.
For this reason, the math operation can take place as accurately as possible. The values to be normalized must
be converted into the data type REAL so that the rounding errors are at a minimum.
Normalize And Output Analog Value
If a standardized value is present and is to be used on an analog output module, then it must be normalized.
In a STEP 7- Program, normalizing is caught in the math operation. This occurs in the data type REAL so that
the rounding errors are at a minimum. This value is only then rounded to an integer value. The places behind
the decimal point are however lost.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 42
1.4.9 Floating Point Math Instructions
The IEEE 32-bit floating-point numbers belong to the data type called REAL. You can use the floating-point
math instructions to perform the following math instructions using two 32-bit IEEE floating-point numbers:
• ADD_R Add Real
• SUB_R Subtract Real
• MUL_R Multiply Real
• DIV_R Divide Real
Using floating-point math, you can carry out the following operations with one 32-bit IEEE floating-point
number:
• Establish the Absolute Value (ABS)
• Establish the Square (SQR) and the Square Root (SQRT)
• Establish the Natural Logarithm (LN)
• Establish the Exponential Value (EXP) to base e (= 2.71828)
• Establish the following trigonometrical functions of an angle represented as a 32-bit IEEE floating-point
number
- Sine (SIN) and Arc Sine (ASIN)
- Cosine (COS) and Arc Cosine (ACOS)
- Tangent (TAN) and Arc Tangent (ATAN)
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 43
1.5 Introduction and overview of blocks
1.5.1 Function blocks
Creating and Opening Function Blocks (FB)
The function block (FB) is below the organization block in the program hierarchy. It contains a part of the
program which can be called many times in OB1. All the formal parameters and static data of the function
block are saved in a separate data block (DB), which is assigned to the function block.
Function blocks (FBs) belong to the blocks that you program yourself. A function block is a block ”with
memory." It is assigned a data block as its memory (instance data block). The parameters that are transferred
to the FB and the static variables are saved in the instance DB. Temporary variables are saved in the local
data stack.
Data saved in the instance DB are not lost when execution of the FB is complete. Data saved in the local data
stack are, however, lost when execution of the FB is completed.
Applications
An FB contains a program that is always executed when the FB is called by a different logic block. Function
blocks make it much easier to program frequently occurring, complex functions.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 44
An instance data block is assigned to every function block call that transfers parameters. The actual
parameters and the static data of the FB are saved in the instance DB. The variables declared in the FB
determine the structure of the instance data block. Instance means a function block call. If, for example, a
function block is called five times in the S7 user program, there are five instances of this block.
Creating an Instance DB
Before you create an instance data block, the corresponding FB must already exist. You specify the number
of the FB when you create the instance data block.
1.5.3 Functions
Programming a Function
Functions, like function blocks, are below the organization block in the program hierarchy. In order for a
function to be processed by the CPU, it must also be called in the block above it in the hierarchy. In contrast
to the function block, however, no data block is necessary.
With functions, the parameters are also listed in the variable declaration table, but static local data are not
permitted. You can program a function in the same way as a function block using the LAD/STL/FBD
program window.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 45
Functions (FCs) belong to the blocks that you program yourself. A function is a logic block ”without
memory." Temporary variables belonging to the FC are saved in the local data stack. This data is then lost
when the FC has been executed. To save data permanently, functions can also use shared data blocks.
Since an FC does not have any memory of its own, you must always specify actual parameters for it. You
cannot assign initial values for the local data of an FC.
Application
An FC contains a program section that is always executed when the FC is called by a different logic
block. You can use functions for the following purposes:
• To return a function value to the calling block (example: math functions)
• To execute a technological function (example: single control function with a bit logic operation).
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 46
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 47
System Function Blocks
A system function block (SFB) is a function block integrated on the S7 CPU. SFBs are part of the
operating system and are not loaded as part of the program. Like FBs, SFBs are blocks ”with memory."
You must also create instance data blocks for SFBs and download them to the CPU as part of the
program.
S7 CPUs provide the following SFBs:
• For communication via configured connections
• For integrated special functions (for example, SFB29 ”HS_COUNT" on the CPU 312 IFM and the CPU
314 IFM).
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 48
1.6.1What Are Organization Blocks?
Organization Blocks (OBs) are the interface between the operating system of the CPU and the user
program. OBs are used to execute specific program sections:
• At the startup of the CPU
• In a cyclic or clocked execution
• Whenever errors occur
• Whenever hardware interrupts occur.
Organization blocks are executed according to the priority they are allocated.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 49
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 50
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 51
1.6.4 Time-Delay Interrupt Organization Blocks
(OB20 to OB23)
S7 provides up to four OBs (OB20 to OB23) which are executed after a specified delay. Every time-delay
OB is started by calling SFC32 (SRT_DINT). The delay time is an input parameter of the SFC.
When your program calls SFC32 (SRT_DINT), you provide the OB number, the delay time, and a user-
specific identifier. After the specified delay, the OB starts.
You can also cancel the execution of a time-delay interrupt that has not yet started.
S7 provides up to nine cyclic interrupt OBs (OB30 to OB38) which interrupt your program at fixed
intervals. The following table shows the default intervals and priority classes for the cyclic interrupt OBs.
Note: If OB80 is called twice during the same scan cycle due to the scan time being exceeded, the CPU
changes to the STOP mode. You can prevent this by calling SFC43 "RE_TRIGR" at a suitable point in
the program.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 53
1.6.10 Power Supply Error Organization Block (OB81)
The operating system of the S7-300 CPU calls OB81 whenever an event occurs that is triggered by an
error or fault related to the power supply (only on an S7-400) or the back-up battery (when entering and
when outgoing event).
In S7-400, OB81 is only called in the event of a battery fault if the battery test function has been activated
with the BATT.INDIC switch. The CPU does not change to the STOP mode if OB81 is not programmed.
You can disable or delay and re-enable the power supply error OB using SFCs 39 to 42.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 55
In "Monitor/Modify Variables":
- You can use the menu command Table > New to create a new variable table which is not yet
assigned to any S7 or M7 program. You can open existing tables with Table > Open. You can use
the corresponding symbols in the toolbar to create or open variable tables.
- Once you have created a variable table, you can save it, print it out, and use it again and again for
monitoring and modifying.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 56
4. Select the station that you want to examine.
5. Select the menu command PLC > Diagnostics/Settings > Module Information to display the module
information for the CPU in this station.
6. Select the menu command PLC > Diagnostics/Settings > Diagnose Hardware to display the "quick view"
with the CPU and the failed modules in this station. The display of the quick view is set as default (menu
command Option > Customize, "View" tab).
7. Select a faulty module in the quick view.
8. Click the "Module Information" button to obtain the information on this module.
9. Click the "Open Station Online" button in the quick view to display the diagnostic view. The diagnostic
view contains all the modules in the station in their slot order.
10. Double-click a module in the diagnostic view in order to display its module information. In this way, you
can also obtain information for those modules that are not faulty and therefore not displayed in the quick
view. You do not necessarily have to carry out all of the steps; you can stop as soon as you have obtained the
diagnostic information you require.
Diagnosing Hardware
Quick View:
The quick view offers you a quick way of using "Diagnosing Hardware" with less information than the more
detailed displays in the diagnostic view of HW Configuration. The quick view is displayed as default when
the "Diagnose Hardware" function is called.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 57
Calling the Diagnostic View
Using this method you can open the "Module Information" dialog box for all modules in the rack. The
diagnostic view (configuration table) shows the actual structure of a station at the level of the racks and DP
stations with their modules.
Module Information
You can display the "Module Information" dialog box from different starting points. The following
procedures are examples of frequently used methods of calling module information:
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 58
• In the SIMATIC Manager from a window with the project view "online" or "offline."
• In the SIMATIC Manager from an "Accessible Nodes" window
• In the diagnostic view of HW Config.
In order to display the status of a module with its own node address, you require an online connection to the
programmable controller. You establish this connection via the online view of a project or via the "Accessible
Nodes" window.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 59
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 61
If the appropriate OB is not available, the CPU goes into STOP mode. Otherwise, it is possible to store
instructions in the OB as to how it should react to this error situation. This means the effects of an error can be
reduced or eradicated.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 62
2.0 Introduction to Industrial communication
By complex systems with a large number of in-/output signals, it is no longer practical to realize the
automation task with a signal, central controller.
Then one has skipped the control tasks in order to distribute more smaller automation devices. These
devices are coordinated from higher order controllers or mainframes, which are integrated over a bus
system in the whole process.
The in- and outputs are no longer connected to the central signal modules directly on the controller, but
are distributed in a process from location by I/O modules that are connected over a field bus with a signal
controller.
This distribution of the automation task with the connection of the peripherals from location has the
following advantages:
- Simpler programming through smaller programs,
- Minimization of the cabling cost, (Cabling errors are reduced),
- Breaking down system structures,
- Simple expansion resp. modification,
- Short positions by critical signals e.g. analog values or counter frequencies, digitalized into
- I/O range,
- Flexibility from automation systems is increased by the assignment of the peripherals
- Higher system availability by faults through self-sustaining controllers,
- Comprehensive self monitoring and error diagnostic of the transmission system,
- Installation and maintenance is simplified,
In the following pages, the different field bus systems should be visualized for realization of each solution
in order to then be responsive to the bus systems of the SIMATIC S7-300.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 63
PROFIBUS-FMS
b) The PROFIBUS
PROFIBUS is a bus system that is used in the field range as well as for cell networks with a small amount
of nodes.
There are three protocol profiles for the PROFIBUS that can be operated together on a circuit (RS 485
fiber-optic cable).
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 64
- PROFIBUS-FMS (Fieldbus Message Specification) is suited for the communication of
automation devices in small cell nets under one another and for the communication with field
devices with a FMS interface.
- PROFIBUS-DP (Distributed Peripheral) is the protocol profile for the connection of
distributed I/Os in the field area e.g. ET 200 modules with very fast reaction time.
- PROFIBUS-PA (Process Automation) is the communication compatible addition from the
PROFIBUS-DP about a transmission technology that allows the users into the EX-area. The
transmission technology of the PROFIBUS-PA corresponds to the international Standard IEC
1158-2.
c) Ethernet
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 65
communications modules (CP) are switched directly over the MPI with the K-Bus connection
from the PG.
- The connection from operator panels/operator stations to the SIMATIC S7 PLCs is simply
realistic with the MPI. There the communication services default can be supported and
standard FBs are no longer necessary by the SIMATIC S5.
The following performance data from the company SIEMENS is entered for the MPI:
- Max. of 32 MPI nodes
- Each CPU has a possibility of a max. of 8 dynamic communication connections for the basic
communication to SIMATIC S7/M7-300/-400.
- Each CPU can operate a max. of 4 statistic communication connections for the additional
communication to the PG/PC, SIMATIC HMI-Systems and SIMATIC S7/M7-300/400.
- Data transmission speed 187,5 kbit/s or 12Mbit/s
- Flexible configuration possibilities in the bus or tree structure (with repeaters)
- Max. wire length 10km
- Interface: RS485
Up to 32 nodes can be connected with one another. Each is monitored. It should be taken into account
that communication processors (CPs) and function modules that are in the SIMATIC S7-300 must also
have MPI addresses and be counted towards the number of nodes.
The addresses of several nodes can be assigned between 0 and 31 (standard setting).
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 66
It makes sense, however, not to assign the address 0 (standard setting for program devices) in a closed
network configuration in order to carry though a diagnosis by the MPI with additional program devices,
without needing to adjust the MPI addresses of the program devices.
For an eventually available operator panel, the address 1 (standard setting for an operation panel) should
be assigned.
To avoid cable reflections, make sure the first and last nodes of the MPI network are hooked up to the
slots‘ integrated terminator.
The MPI network is compiled with a shielded and a stranded filter 2 wire cable and can be used up to a
length of 50 m. These 50 m are measured from the first node to the last node of the MPI network.
Should this large distance be used, then the PS 485 repeaters must be used. A cable length can be up to
1000 m in length between 2 RS 485 repeaters when no other node is found between the 2 repeaters. One
can place up to 10 repeaters in a row.
The components that come by the configuration of the MPI configuration for operation, are the same bus
cables like the bus connectors and RS 485 repeaters that are used by the electrical net of the PROFIBUS.
Therefore the electrical net can be configured as either cables or a tree structure with the help of the
repeater.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 67
2.2 PROFIBUS
A field bus standard was made with the PROFIBUS which is open and company neutral. Devices of
different manufacturers are equipped with a proper interface.
Due to it’s comprehension and also differentiated functionality, the PROFIBUS masks large areas of
sensors/actors next to the field and cell levels and guarantees a good uniformity for the higher level bus
systems of the process control level.
The characteristics of the PROFIBUS are thoroughly described in the following sections.
- PROFIBUS- FMS
- PROFIBUS- PA
- PROFIBUS- DP
These 3 compatible variants of the PROFIBUS co-ordinate properties and user ranges. They make a
transparent communication from sensor/actor to the systems in the process control level possible.
Planning, installation and maintenance are therefore economic and technically simple to implement.
- The maximum number of nodes per bus segment amounts to 32. More lines can connected
under one another through performance enhancements (repeaters) where by it is noted that
each repeater counts as a node. In total a maximum of 128 nodes are connectable (over all bus
segments).
- By 1,5 MBaud repeaters 10 bus segments can be operated in a row (9 repeaters), by 12
MBaud-repeaters only 4 bus segments (3 repeaters).
- Transmission distances to 12 km are possible by electrical configuration and to 23.8 km with
optical configuration. The distances are dependent on the transmission rate, like shown here
(electrical configuration).
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 69
2.2.3.2 DP-Slave
A peripheral device (sensor/actuator) is identified as a DP slave when the input data is read in and the
output data is given to the peripherals. It is also possible for the devices to provide only input or output
information. Typical DP slaves are devices with binary in-/outputs for 24 or 200 V, analog inputs, analog
outputs, counters, and also:
- Pneumatic valve islands
- Code reading devices
- Proximity switches
- Measurement value sensors
- Drive controllers
Most of the input and output data is device dependent and is allowed to contain a maximum of 246 bytes
for inputs and 246 bytes for outputs. From cost and implementation technological principles, many of the
available devices have a maximal user data length of 32 bytes.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 71
PROFIBUS-DP-Mono-Master-System
You find more masters on the bus in a multi master operation. You can either construct independent sub
systems existing from each master and the additional slaves or function these systems as additional
configuration and diagnostic devices. The input and output images of the slaves can be read by all
masters. The description of the outputs is only possible for a master (class 1). Naturally, the masters can
also exchange data frames with one another over the AGAG-Connection. Multi master systems obtain an
average bus cycle.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 72
PROFIBUS-DP-Multi-Master –System
2.2.4 Bus Access Process
The bus access process is naturally in tight connection with the topology of the PROFIBUS system.
Basically the communication network is differentiated from the star, ring, and bus network. With a star
configuration, all attached nodes communicate over a central computer that appoints the whole
performance capability and function security. The nodes of a ring network build a closed ring
configuration. The advantage is that a node always knows from where it’s information comes. The
disadvantages are described below:
a) When a node is filled in, the whole system fills as a result of the ring interruption.
b) The cable cost is relatively high because the first node must be connected with the last node.
The PROFIBUS therefore uses the bus (resp. the line network). By these systems all nodes are
attached over a small drop cable on a whole cable. From this principle each message from each
node is recognized.
The sending capability must be governed through the bus access process. Two processes come to
the PROFIBUS for use. Token passing and Master/Slave processes. Therefore the PROFIBUS
access process is also referred to as “hybrid”. The master occupies the right of the bus access by
the master/slave process. The passive slaves only answer to the instruction of the master. The
other method is by the token passing process. Here the access right over the “Token” is allocated
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 73
and assigned to the active nodes one after the other. Only the master that occupies the tokens can
communicate with the other active and passive nodes on the bus access.
2.3 Ethernet
The Ethernet is a worldwide spread and manufacturer-neutral technology for the transmission of data in a
LAN (Local Area Network) at a rate of 10, 100 or 1000 millon bit per second (MBps). LANs are
specified in IEEE 802 and are differing from other types of networks by:
- The total length of cabling or rather the extension of network (10-1000 m)
- The technology of transmission (coaxial cable, twisted pair and fibre-optic cable systems)
- The network topology (bus-, ring-, star- and tree structure)
Ethernet is a part of this specification and is defined in IEEE 802.3 resp. IEEE 802.3u for Fast Ethernet.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 74
On realizing, that no more data transfer exists, the participant himself starts sending his data. By using
this procedure, it could occur that several participants are waiting on a break during the data transfer and
afterwards start together for transmitting (Multiple Access).
If this occurs, it is a so-called collision. The Ethernet communication is designed to recognize such
collisions.
If the CSMA/CD protocol of the network is recognizing a collision, the transfer is being interrupted and
the data packages are deleted. After a randomized period the network is starting the transmission cycle
again.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 75
Optical Fibre cables are mainly applied for long transmissions or higher transmission speed. Suitable for
the different types of cables, there are different variations of plugs. For example the RJ45-plug of the
twisted pair cable:
In general, twisted-pair cables with connection of cores in a ratio of 1:1 are used. This means, each sender
cores (TD) and each receiver cores (RD) are connected. These cables are used to connect network
participants like PCs or Ethernet-CPs with respective network devices.
However, if two of these network participants should be connected directly, for example a PC directly to
an Ethernet-CP, a special network cable is necessary. Such cable, known as crossover cable, has each
connected sender- (TD) and receiver cores (RD). See these cable crossings in the following diagram.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 76
Repeaters or hubs are forwarding the received data transparently. Logically they are acting like a piece of
network cable, which means a collision domain is extending to several network segments, which are
separated by repeaters or hubs.
Therefore, repeaters are applied to connect different types of cables (for ex. coaxial- and twisted-pair
cables). Hubs normally are serving to connect several network participants by logic.
Bridges and switches can connect Ethernet segments of different transmission rates (for ex. 10 Mbit/s
100Mbit/s) without downgrading the entire network to the lower transmission rate.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 77
2.3.5 Router / Gateway:
Another step ahead of the bridge or the switch is a router and its functionality. A router is not only
interpreting the various Ethernet packages, but also their contents, which means the data area of the
Ethernet package. The data area comprises also addressing information, which are analysed by the router
and the data packages are specificly forwarded. Normally, routers are applied to enable connections
between independent networks.
A router example is the Ethernet-ISDN router (in short: ISDN router). This one is coupling an Ethernet
network to an ISDN telephone network.
Differences:
The reason for the difference of the two networks lies in the increased speed of Fast Ethernet:
The maximum network extension depends on the signal transit time. It is reduced in accordance with the
number and type of active network components used.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 79
2.3.7 Cabling and Connections
In the 100BaseTX specification transmission of 100 Mbps on 2 twisted pair cables of category 5 is
described. Category 5 cables are suitable for data transmission up to 100 MHz. The connection
components used (plugs, connection outlets, patch panels, patch cords) must also correspond to category
5. The RJ45 connector familiar to 10BaseT as well as the sub-D9 connector for STP cables are specified.
A cabling system meets the requirements of a link class if a complete link from the active component to
the terminal (patch cord, patch panel, installation line, connection outlet, connection lead) is within the
specified limits. If components of different manufacturers are used, this is not always the case. Link class
D describes the link specified for data transmission of up to 100 MHz. SIMATIC NET industrial twisted
pair cables and connection components exceed category 5 requirements by far.
The 100BaseT4 specification describes transmission of 100 Mbps on 4 twisted conductor pairs of
categories 3, 4 and 5. The 3 conductor pairs are used for data transmission. The 4th Twisted pair is used
for transmission of collisions.
Category 3 cables were specified for transmission up to10 MHz in 10BaseT networks. Compared with
cables of category 5, category 3 cables are somewhat less expensive but have not been successful in
Europe due to its restrictions. Category 4 cables are familiar from token ring networks and are specified
for transmission of data up to 20 MHz. By far the largest proportion of twisted pair based Fast Ethernet
networks is designed in accordance with
100Base TX. One reason for this is that no full duplex mode is possible in 100Base T4 networks.
The 100BaseFX specification defines 100 Mbps transmission on two 62.5/125 mm fiber optic cables. The
MIC, ST, and SC connector types familiar from 10BaseFL or FDDI are used. Fiber optic technology is
suitable to cover large distances. In half duplex mode the maximum fiber-optic cable length is 412 meters
(point–to-point coupling of two network nodes). Of particular interest for connection of switches or
routers is the distance of up to 2000 meters with full duplex operation.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 81
3.0 Other Topics
Drive is nothing but the product that takes the available electrical power, converts it into the required
form and then gives it to the motor and in addition, provides required protection to the motor and the
system. Variable Speed Drives gives variable frequency, variable voltage to the motor in order to vary
speed of the motor.
Various VSDs are available to control speed of motors. E.g. Siemens MICROMASTER, SIMOVERT
Parameters to the VSD can be given by a PLC and communicated using Bus systems such as Profibus.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 82
3.2.1 Basic Information on Programming in STL Source Files
You can enter your program or parts of it as an STL source file and then compile it into blocks in one
step. The source file can contain the code for a number of blocks, which are then compiled as blocks in
one compilation run.
Creating programs using a source file has the following advantages:
- You can create and edit the source file with any ASCII editor, then import it and compile it into
blocks using this application. The compilation process creates the individual blocks and stores them
in the S7 user program.
- You can program a number of blocks in one source file.
- You can save a source file even if it contains syntax errors. This is not possible if you create logic
blocks using an incremental syntax check. However, the syntax errors are only reported once you
compile the source file.
The source file is created in the syntax of the programming language representation Statement List (STL).
The source file is given its structure of blocks, variable declaration, and networks using keywords.
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 85
4.0 SAGT Plant Configuration
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252
SIEMENS S7-300 and STEP 7 86
4.1.4 Accessories
- Din Rail L=482mm Rail for mounting
- PS 307 5A: Load supply voltage 120 / 230 VAC:24 VDC / 5 A
- PC adapter Connect PG (Computer) and PLC via MPI port for programming
- STEP 7- Professional software Programming, debugging and fault finding.
Other Items
- Ethernet Access points (computer and printer, antenna to transmit data to Maintenance office)
- Simovert Inverters (VSD) controlled via Profibus-DP
- Transponder reader via RS 422
- Cabin Terminal at Operator’s Cabin communicated via RS 232C
- Faulty Display unit at Operator’s Cabin communicated via RS 232C
Nikini Automation Technology Training Center 247, High level Rd, Colombo 05. Tel: 2826894 / Fax: 2826252