1. • Position detection by pulse counting/speed control
• Absolute And incremental displacement measurment
• useful in many technical installations which have been equipped with incremental measuring systems, like
tooling machines, robots etc.
• Position counting: The actual position of the workpiece carrier is to be measured by counting pulses from the
pulse sensor as a function of the conveyor belt's movement direction. Each pulse corresponds to
a specific distance travelled by the workpiece.
• The pulse generator is an incremental displacement measurement system. For that reason the workpiece
carrier has to be located at a defined reference location at the start of the operation.
• Initial condition, Carrier at left-hand end position , achieve the following objectives:
When the workpiece carrier is moving to the right, i.e. push button I_IMS1_TR (travel right) has
been pressed, the number of pulses detected should be counted upwards.
When the workpiece carrier is travelling to the left, i.e. push button I_IMS1_TL (travel left) has been pressed,
then the number of pulses detected should decrease.
The motor is switched off when either of the two end position sensors is triggered.
2. incremental measurement: provide an output signal based on relative movement from a known, or reference, position.
Often, incremental position sensors provide a series of pulses.
The number of pulses is relative to the amount of linear position movement from the starting, or home, point.
The potential disadvantage of an incremental system is that the actual position value is lost if system power is lost, which
requires that the system be re-homed. On the other hand, incremental systems are well-suited for high-speed applications
and position measurement over very long distances
Absolute linear position sensors, provide a unique output at a given position. For example, a linear position sensor with
analog voltage (0-10 Vdc) output produces a constant, repeatable output at any position within its total travel. Continuing
the example, assume a linear transducer with 100” of total travel, over which it produces a 0 to 10 Vdc output. At 50” (half
its total travel), the sensor would indicate 5Vdc on the output. If power is lost and re-applied, and the system hasn’t moved,
the output would still be 5 Vdc. magnetostrictive linear displacement transducer (called a MLDT)
Both incremental and absolute position sensors have a place in
industrial automation. The individual application requirements
will dictate the proper choice.
3. Speed monitoring
Conveyor equipment often requires monitoring for a minimum speed level to permit detection of excessive
friction or breakage of the drive shaft, for instance. If a problem is diagnosis, the conveyor belt and connected
units can be de-energized to avoid blockage, and alarm lamps can be activated.
A function block is to be implemented for speed monitoring say MONSPEED.
INIT is a signal for controlling the conveyor belt's motor; this signal is processed further by the function block.
MOTOR is a signal used to directly control the motor via a dedicated binary output. If the monitoring system is
OK, MOTOR is equivalent to INIT. If the monitoring system malfunctions, i.e. ALARM is issued and MOTOR is
always zero.
When the MOTOR signal changes from 0 to 1, the speed monitor is to remain disabled in an initial TSTART
phase to allow for the fact that the motor always starts at speed 0.
If the TSTART phase is over and the time interval between any 2 pulses from the IMP sensor exceeds the
monitoring time TMON, the MOTOR signal is to be set to zero, and ALARM set to one. At the same time, the
elapsed starting time is to be reset so that the motor can be restarted after the alarm signal has been
acknowledged.
ACK is used to reset to ALARM signal.
4. Input variables:
INIT (BOOL): trigger signal from the control unit for the
conveyor belt motor
IMP (BOOL): signal from pulse sensor
ACK (BOOL): acknowledge button
TMON (TIME): monitoring period
TSTART (TIME): period of time that the speed monitoring
function is suppressed during start-up
Output variables
MOTOR (BOOL): Direct control of the conveyor belt motor
ALARM (BOOL): Alarm signal
5. Speed monitoring: logic diagram 1
implement a speed monitoring using pulse sensors.
Detects whether an excessive time gap or interval elapses
between pulses, that would indicate that the speed has
dropped below a preset minimum, it then also switches the
motor off and generates an alarm signal which continues until
it is acknowledged. In addition, take into account that when the
motor is switched back on, the motor will always start from a
stationary position (zero speed), so that the monitoring logic
needs to be by-passed for a pre-determined time period at the
start while the motor runs up to speed.
8. Distributed I/O:Distributed I/O is the term used for input/output modules connected to the central PLC station over a bus system.
SIMATIC S7 uses the PROFIBUS DP, PROFINET IO, and actuator/sensor interface (AS-i) bus systems.
The distributed I/O is handled like the central I/O. The distributed inputs/outputs are in the same address volume as
the central inputs/outputs, and therefore the addresses of the distributed I/O must not overlap with those of the
central I/O.
Data transfer to and from the distributed I/O is controlled from a central point: With PROFIBUS DP it is the DP master,
with PROFINET IO it is the IO controller, and with AS-Interface it is the AS-i master. The distributed stations – these are
the DP slaves with PROFIBUS DP, the IO devices with PROFINET IO, and the AS-i slaves with AS-Interface – are the
passive partners in the data transfer.
The distributed I/O is configured using the hardware configuration. PROFIBUS DP, PROFINET IO, and actuator/sensor
interface (with the CP 343-2P module as AS-I master) are configured as a subnet. The connections required for data
transfer are then present “automatically”.
A subnet, or subnetwork, is a network inside a network. Subnets make networks more efficient. Through subnetting,
network traffic can travel a shorter distance without passing through unnecessary routers to reach its destination.
IPv4 addresses, which are presented in the form of four decimal numbers separated by periods, like 203.0.113.112.
Every IP address has two parts. The first part indicates which network the address belongs to. The second part
specifies the device within that network. However, the length of the "first part" changes depending on the network's
class. Networks are categorized into different classes, labeled A through E. Class A networks can connect millions of
devices. Class **networks and Class C networks are progressively smaller in size. (Class D and Class E networks are
not commonly used.)
9. The memory submodule for the newer S7-300 CPUs is a micro memory card (MMC). The data on the MMC are saved non-
volatile, but can be read, written and deleted as with a RAM. The complete load memory is present on the MMC, meaning that
an MMC is always required for operation.
Work memory:Work memory is designed in the form of high speed RAM fully integrated in the CPU. The operating system of
the CPU copies the program code “relevant to execution” and the user data into the work memory.
System memory contains the addresses (variables) that you access in your program. The addresses are combined into areas
(address areas) containing a CPU-specific number of addresses. The system memory on a CPU contains the following
address areas:
Inputs (I)Inputs are an image (“process image”) of the digital input modules.
Outputs (Q)Outputs are an image (“process image”) of the digital output modules.
Bit memories (M) are information stores which are directly accessible from any point in the user program.
Timers (T) Timers are locations used to implement waiting and monitoring times.
Counters (Z) Counters are software-level locations, which can be used for up and down counting.
Temporary local data (L) Locations used as dynamic intermediate buffers during block processing. The temporary
local data are located in the L stack, which the CPU occupies dynamically during program execution.
10. Field bus systems
Unlike the office-IT environment, industrial automation environs required that additional conditions be planned for in
order to ensure safe and reliable network operations. This is guaranted by the so-called field bus. The most important
demands of a bus in automation applications are as follows:
Reliability, if necessary, error tolerance
Low sensitivity to disturbance (EMC)
Flexibility in network structures
Installation and assembly technology (sensors, actuators)
Real time capability
11. PROFIBUS-DP is a PROFIBUS model optimised for data transfer speed. It has been especially designed to meet the demands
for rapid, efficient data exchange between automation devices and the decentralised equipment, like, e.g. binary or analog
input/output modules and electrical drives.
short reaction times high degree of interference immunity
12. Profibus : protocol structure In order to transmit 8 bits of data with PROFIBUS DP 8, you
need 154 bits. PROFIBUS (Process Field Bus) is a fieldbus which is being used for high speed
cyclic data communication in the world of automation. PROFIBUS has two different applications:
Factory automation
Process automation
For each application PROFIBUS can use a different protocol. PROFIBUS DP (Decentralized
Peripherals) is the high-speed version, which is mostly used for factory automation (i.e. logistics,
production areas, etc). PROFIBUS PA (Process Automation) is mostly used in industries such as
water treatment, oil, gas, chemicals, etc.
PROFIBUS PA runs at a fixed transmission speed of
31.25 kbps, where PROFIBUS DP can be configured
to run at a maximum speed of 12 Mbps. PROFIBUS
communication is half duplex, which means that
only one device is communicating at the time.
PROFIBUS DP is based on the RS485 protocol and
PROFIBUS PA is based on the MBP-IS protocol,
which is a bus-powered protocol.
13. The access methods used in PROFIBUS-DP are organised according to the hybrid method "Token passing master-slave“.
Here a distinction is made between active and passive devices.
Active devices obtain the "token", the right to transmit, which is passed on from one active device to the next within a
pre-specified time frame. In the process it is automatically recognised whether a user is disabled or whether a new
device is enabling the bus. Passive devices do not obtain a right to transmit. They are accessed directly by the master
unit to which they are allocated.
All devices in the network must be set to the same transmission rate. To achieve an almost equal interchangeability
between the devices, the system response has also been standardised for PROFIBUS-DP.
There are three different types of subscribers in the network:
DP-Master class 1 (DPM1)
DP-Master class 2 (DPM2)
DP-Slave
14. PROFIBUS DP provides a standardized interface for transferring predominantly binary process data between an “interface
module” in the (central) programmable controller and the field devices. This “interface module” is called the DP master and
the field devices are the DP slaves. There can be up to 32 stations in one segment and up to 127 stations in the entire
network. A DP master can control a number of DP slaves specific to itself. You can also connect programming devices to the
PROFIBUS DP network as well.
PROFIBUS devices must be split into 2 categories, devices without addresses and devices with addresses.Devices without
addresses are either Bus Monitors (things that listen but do not participate in communication on the bus) or bus
infrastructure devices. Examples of infrastructure devices are RS-485 repeaters and Fiber Optical Repeaters. All of these
devices have RS-485 drivers.
RS-485 uses the concept of segmentation on the bus. A segment can be thought of as the maximum length of cable that can
be used at a given baud rate before the signal has to be refreshed back to the standard voltage levels and reformed into a
square wave. RS-485 stipulates that the maximum number of devices (entities with RS-485 drivers) on a segment is 32.
15. We can have a total of 126 master and slave devices on the bus including an Engineering tool. To achieve that number we
have to have a minimum of 4 RS-485 repeaters.
0 Reserved for Class 2 master/Engineering tool
1 Sometimes used for a programming tool, but available as a master or slave address.
2-125 Available for master or slave addressing
126Reserved for use of slaves without address switches. The slave must be set to an address <126 before it can be used
127 Reserved as a broadcast address
16. PROFIBUS DP is usually operated as a “mono master system”, that is, one DP master controls several DP slaves. The DP
master is the only master on the bus, with the exception of a temporarily available programming device (diagnostics
and service device).
You can also install several DP master systems on one PROFIBUS subnet (multi master system).
DP master
The DP master is the active node on the PROFIBUS network. It exchanges cyclic data with “its” DP slaves. A DP master
can be A CPU with integral DP master interface, or plug-in interface submodule,(e.g. CPU 315-2DP, CPU 417), An
interface module in conjunction with a CPU (e.g. IM 467) , A CP in conjunction with a CPU.
There are “Class 1 masters” for data exchange in process operation and “Class 2 masters” for service and diagnostics.
PROFINET: provider consumer model rather than master slave. Unlike OSI model which has 7 layers. Ethernet has 4
layers physical and datalink and transportation and application layer.
To configure profinet you need a a tool to act as a supervisor and general description file which is generally provided
by device vendor( resembles like files used in profibus). Its XML based is called GSML.
17. S7 300 With PROFIBUS
Procedure:
1.Open TIA Portal, Create new project
2.Click on portal View, Add new device
3.Select CPU S 300-CPU 314C-2PN/1 DP -314-6EH04-0ABO
4.Go to devices and networks, see PLC, Double click on it, Change IP address to 0, Default may be 136
5. To be able to insert the conveyor belt system as a slave, the corresponding .gsd file has to be imported. Subsequently the slave
can be inserted in the network view of the equipment configuration out of the catalogue and connected with the S7-300.
6.Untick the filter on right side-Go to other field devices-Profibus DP- I/O-Lucass Nulle-IMS interface-IMS interface-IMS
Interface.Select the IMS interface(cms 1243-5-slave 1) and drag it into topology view
18. 7.Now in network view do the connection using PROFIBUS point(Violet port)
19. 8. The address of the DP slave (conveyor belt transport system) also has to be set. To do this select the slave in the
equipment window and set the Profibus address to 5 (corresponding to the address set on the transport system).
9.Double click on IMS interface -in parameters set address to 5
10.. check the I/O addresses of slave.Click on device view. see address. Input address may be 3-4 and output address may be
2-3. To select the I/O addresses for the slave, double click on the slave. The I/O addresses of the DP slave are automatically
set depending on how the I/O addresses of the PLC are set, but can also be selected randomly within a certain value range.
20. 11.For finding the I/O address of slave ,see the charts and make tag table accordingly. Here only the variables which are
used for communication between the transport system and the S7-300 are changed. Variables which are assigned to the
push buttons remain unchanged
e.g For input X=3
so for, start_belt address is I(X+1).3=I(3+1).3= I4.3
end_belt I(X+1).4= IX4.4
For output X=2
right_move Q(X+1).0=Q(2+1).0= Q3.0
left_move Q(X+1).1=Q(2+1).1= Q3.1
21. 12.Write the program for given logic
13.Right click on PLC -Compile,check for any errors
14.Right click on PLC load it.Select proper options PN/IE etc depending on the means used for establishing communication
15.Put the PLC on Run mode
16.Press the coreesponding START button of PLC to check the output
Code
22. PROFIBUS 1200
Hardware Setup
1.Connect the ethernet cable from CPU to PLC for Communication
2.Connect Profibus cable from Conveyor belt to PLC profibus slot.
3.Connect Power supply to conveyor belt.Before Positive wire(+24V) connect Ground wire always .
TIA Portal Steps
1.Open TIA Portal,Create new project
2.Click on portal View, Add new device
3.Select CPU S1200
4.Go to devices and networks,see PLC,Double click on it,Change IP address to 0,Default may be
136
5. To be able to insert the conveyor belt system as a slave, the corresponding .gsd file has to be
imported. Subsequently the slave can be inserted in the network view of the equipment
configuration out of the catalogue and connected with the S7-1200
6.Untick the filter on right side-Go to other field devices-Profibus DP-I/O-Lucass Nulle-IMS
interface-IMS interface-IMS Interface.Select the IMS interface(CMS 1243-5-slave 1) and drag it
into topology view
7.In 1200 PLC there is no slot of profibus in software so need to add it in software,so search the module CMS 1243-5 in catalog.
OR Tick filter.In controllers 1200-communication module-profibus-CMS 1243-5-6GKJ……Drag and drop the module in to the
available slot in device view as below.
23. 7.Now in network view do the connection using PROFIBUS point(Violet port)
24. 8. The address of the DP slave (conveyor belt transport system) also has to be set. To do this select the slave in the
equipment window and set the Profibus address to 5 (corresponding to the address set on the transport system).
9.Double click on IMS interface -in parameters set address to 5
10.. check the I/O addresses of slave.Click on device view.see address.Input address may be 2-3 and output address may
be 2-3. To select the I/O addresses for the slave, double click on the slave. The I/O addresses of the DP slave are
automatically set depending on how the I/O addresses of the PLC are set, but can also be selected randomly within a
certain value range.
11.For finding the I/O address of slave ,see the charts and make tag table accordingly. Here only the variables which are
used for communication between the transport system and the S7-1200 are changed. Variables which are assigned to the
push buttons remain unchanged(0-1 address for input and output)
25. e.g For input X=2
so for, start_belt address is I(X+1).3=I(2+1).3= I3.3
end_belt I(2+1).4= I3.4
For output X=2
right_move Q(X+1).0=Q(2+1).0= Q3.0
left_move Q(X+1).1=Q(2+1).1= Q3.1
11. Prepare the tag table
12.Write the program for given logic
13.Right click on PLC -Compile,check for any errors
14.Right click on PLC load it.Seect proper options PN/IE etc depending on the means used for establishing communication
15.S7 1200 don’t have Run button on hardware.So need to access it through Software.To bring RUN button in software click
Online-Click on editor window-click on Goggle button.It shows Run option in Software.Click on RUN button
16.Press the corresponding START button of PLC to check the output.
26. The OSI Model (Open Systems Interconnection Model) is a conceptual framework used to describe the
functions of a networking system. seven different abstraction layers: Physical, Data Link, Network, Transport, Session,
Presentation, and Application
27. Ethernet permits each user or station to exchange data with other users in the LAN. This data is sent
in so-called frames (telegrams) or packets.
In 1993 more that 50 manufacturers agreed to proceed with the development of Ethernet to a speed
of 100 Mbits/s. Just two years later so-called Fast Ethernet had a specification in IEEE 802.3u.
Further advances and optimisations followed in 1999 (Gigabit Ethernet) and 2001 (IEEE 802.3ae, 10
gigabit Ethernet).
An Ethernet data packet according to IEEE 802.3 has the following format:
28. The minimum data length must amount to 46 bytes, to detect collisions. If less data is present then
the data field is padded up to the minimum 46 bytes.
TCP/IP
This protocol is comprised of the protocols TCP (Transmission Control Protocol) and IP (Internet Protocol). Here TCP is
responsible for data traffic, whereas IP is used to unequivocally identify devices in a network. For this purpose, each
device possesses a specific address, its so-called IP address. The TCP protocol permits reliable transmission between a
transmitter or sender and a receiver. The TCP protocol (layer 4) is inserted into the user data of the IP protocol (layer 3).
29. UDP/IP
The User Datagram Protocol describes a transport protocol for networks in which there is no requirement for a
secure connection between users (e.g. in local networks). The UDP protocol is embedded into the user data of
the IP protocol just as in the case of TCP/IP.
30. PROFINET is bus system based on Ethernet with real time functions. One advantage this system
offers is the integration of existing field buses. Thus field bus systems like e.g. PROFIBUS or AS-i
can be integrated without having to modify the field equipment. Since Ethernet supports TCP/IP, the
use of web technologies is possible, such as access to integrated web servers by field devices.
31. When working with Profinet, copper cables, but also fibre optic cables can be deployed. The copper
version consists of four single wires, whereby two wires each are twisted and as in the case of
Profibus they are screened with aluminium foil and a solder-coated copper wire mesh. The standard
Profinet cables are green.
32. There are various cable types depending on the type of installation. A
distinction is drawn between
cable types A, B and C.
Cable type A is used for stationary installations, in which no movement
occurs after installation.
Cable type B is used for flexible installations which may be subject to the
occurrence of movements or vibrations.
Cable type C is used above all for highly flexible installations
subject to constant movement or torsion (e.g. chain conveyors). A
difference exists in the design of the individual wires. In the case of cable
type A, each line consists of a single copper wire, whereas
with cable types B and C the wires are comprised of multiple braided
copper wires
RJ-45 connector plugs are recommended as the connectors for Profinet
communication. They areinserted into the IP-20 model in the switching
cabinets.
33. Producer-consumer model
Since all devices are able to transmit in full duplex mode, there is no bus access process needed
(producer-consumer model). The I/O controller sets the transmission clock pulse rate, in which it
sends real-time data to the user stations. The network devices in turn transmit real-time date to the
I/O controller in this clock pulse rate. The data are transmitted unsecured and with acknowledgement.
The transmission clock pulse is a whole number multiple of the base time unit of 31.25 μs and is set
by the device. The transmission clock pulse forms the time frame between two communication
intervals.
TIA Portal sets the transmission clock pulse to a default value of 1 ms. Accordingly, refreshment
times are reached that are greater than or equal to 1 ms. The refreshment time is a time interval at
which the I/O controller provides data to I/O devices in cycles. The minimum refreshment time
depends on the lowest setting possible for the transmission clock pulse of the I/O controller.
34. PROFINET IO equipment classes
IO controllers
IO controllers are typically programmable logic control (PLC) units. They contain the automation
program and correspond to a master (class 1) with PROFIBUS.
IO supervisors
IO supervisors can be programmable devices (PDs), PCs or HMIs, which are integrated for
commissioning or diagnostic tasks (corresponding to master class 2 for PROFIBUS)
IO devices
IO devices are non-centralised I/O field equipment, which are connected via PROFINET and
correspond to the slaves for PROFIBUS.
As also in the case of Profibus-DP, GSDML files must be imported for PROFINET. These describe
the communication attributes of the individual equipment types.
35. AS-i is a simple, cost-effective field bus, which was developed for binary sensors and actuators. The
binary signals of the process system are transmitted via this bus system to other field buses or
directly to the control unit while energy required for the sensors and actuators is also transmitted via
the bus system. A two-wire cable without screening and without a terminating resistor is used as the
transmission medium.
Topology:Random
Medium:Special ribbon band cable
Max. user stations 31 Single slaves, 62 A/B slaves
Transmission rate (kbits/s) 167
Max. length 100 m per segment, max. 300 m
36. Electrical transmission Alternating pulse modulation (APM)
Transmission rate (kbits/s) 167
Max. length 100 m per segment, max. 300 m
Bus accessing method Master-slave method
Transmission frame Master call-up, slave response
An AS-i cable is a special ribbon band cable with two single wires. The standard AS-i cable is yellow
and is used for both power supply and communication functions. Actuators which need an additional
power supply are connected with an additional black cable (for 30 V DC voltage) or an additional red
cable
37. Master-slave procedure
In the master-slave procedure, the master is responsible for establishing connection to the slaves
(passive devices). The connection to individual slaves is made in cycles according to a polling list.
Accordingly, the master can send data, such as the outputs of an analogue or binary output card to
the slave, and also prompt the slave to send data such as the inputs of an analogue or binary input
card back. To do this the master sends a packet which contains a certain slave address. The slave
addressed then responds within a certain period of time. Since communication is coordinated
exclusively by the master, switching of the bus connection to the slaves can be implemented simply
and cost efficiently. However, should the master fail the consequence is that no more communication
is possible any longer.
39. Specification 3.0:
In specification 3.0 up to 992 digital inputs/outputs can be connected. Here each slave has 8 digital
inputs and 8 digital outputs (62 Slaves * 16 inputs/outputs = 992 inputs/outputs). The information is
exchanged as "combined" messages. That means that during transmissions of messages comprising
more than 4 bits of cohesive information, a string of master call-ups (select) and corresponding slave
responses are repeated in cycles.
Initialising phase
In the initialising phase the master creates and compares the configuration of the connected slaves
with a target configuration. If any error in the initialisation phase is identified, this is then output. Only
after the initialisation phase has been completed without error does the master go into normal
operating mode.
Normal operation
In normal operation mode cyclical data exchange and slave monitoring take place. In the case of
faulty packets, these are identified and repeated. Also any malfunction or removal of slaves is
immediately registered. A special master function permits the simple replacement of defective
equipment. If, for example, the slave with address 15 malfunctions, this is detected by the master and
reported. An identical replacement device can then be deployed in place of the malfunctioning slave,
even though it still has the default address 0 as provided by the manufacturer. The master compares
the newly deployed device based on its identification code. If the comparison proves to be positive,
the address 15 is reallocated to the new slave.
40. ET 200 is the device family for the distributed I/Os on PROFIBUS DP and PROFINET IO.
ET 200M with IM 153-4 PN
The maximum data transfer rate on the PROFIBUS DP is 12 Mbit/s and 100 Mbit/s on
the PROFINET IO.
41. PROFINET IO components
PROFINET IO offers a standardized interface in accordance with IEC 61158 for industrial automation over Industrial
Ethernet. An IO controller in the central programmable controller controls the data exchange with the distributed field
devices which are referred to as IO devices
Industrial Ethernet can be designed physically as an electrical, optical, or wireless network. FastConnect Twisted Pairs (FC
TP) with RJ45 connections, or Industrial Twisted Pairs (ITP) with sub-D connections are available for implementing the
electrical cabling. Wireless transmission uses the frequencies 2.4 GHz and 5 GHz with data transfer rates up to 54 Mbit/s
(depending on the national approvals).
42. IO controller The IO controller is the active participant on the PROFINET. It exchanges data cyclically
with “its” IO devices. An IO controller can be: b A CPU with integral PROFINET interface (with the letters “PN” in the short
designation, e.g. CPU 317-2 PN/DP) b A communication module in the PLC station (e.g. CP 343-1)
43. Set the IP address on the programmingdevice
• To program the SIMATIC S7-1200 controller from the PC, the
programming device or a laptop, you need a TCP/IP connection or an
optional PROFIBUS connection.
• For the PC and SIMATIC S7-1200 to communicate with each other via
TCP/IP, it is important that the IP addresses of both devices match.