Tuesday, 19 September 2017

Liquid Level Sensor – Different Types of Level Sensors and their Workings

Liquid Level Sensor
Liquid Level Sensor
A wide range of level sensor measurement systems are made available for addressing the various parameters such as a wide range of applications, high-accuracy needs, and system installation requirements and practices. Measurement technologies are made available in different versions to address a wide range of measurement needs, or to address a specific application.

Classification of Level Sensor Measuring Systems

The family of level Sensor measurement systems is classified into different categories such as:
  • Liquids or Solids Level Measurement
  • Point or Continuous Level Measurement
  • Electromagnetic or Electromechanical Level Measurement
  • Contacting or Non-Contacting Level Measurement

General Considerations for Liquid Level Sensor Selection:

  • Density and viscosity
  • Vapors mist and dust
  • Chemical composition
  • Interfaces and gradients
  • Ambient temperature
  • Humidity/moisture
  • Process temperature
  • Process pressure
  • Regulated environment
Out of these four types of measurement systems, this article describes about the point level measurement and detection system, and the Continuous Level Measurement and Detection Systems are explained briefly in the following paragraphs. These both measurement systems cover different types of level sensors.

Point/ Liquid Level Switch Measurement and Detection Systems

Point level measurement sensors are used for the purpose of marking a single liquid height or for presetting a level condition. Usually, this sensor works as a high alarm that measures the overflow conditions in tanks through liquid level sensors, or works as a marker to note down the low alarm conditions. The different types of sensors are given below:
  • Float Sensor
  • Capacitance Sensors
  • Conductivity Probes

1. Level Detection and Measurement by Using a Float Sensor

 Level Detection Using a Float Sensor
Level Detection Using a Float Sensor
Principle of Operation: A liquid level control system by using a float sensor works on the principle of buoyancy, which states, “A float immersed in a liquid is buoyed towards upward direction by an applied equal force to the weight of the displaced liquid”. As a result, the body drives partially and gets submerged upon the liquid surface and covers the same distance the liquid level moves.
Construction: A level measurement float system consists of a float, a sensor stem, a magnet, a reed switch and a weight suspended on the outside of the open tank. A scale is fixed on the outside of the tank, and the contents of the tank’s level are indicated by the position of the weight along the scale.
Working: Level detection of liquids is often done with a float-type liquid level switch. The float transfers on a mechanical arm or sliding pole and activates a switch when the level moves towards upward direction. Sometimes the float itself contains a small magnet that varies the state of a switch when the liquid level gets moving up and moves into the original position. This type of level sensor comes with many advantages like it is very simple, highly accurate, and best suitable for various products.
The Disadvantages of this sensor are that it requires various mechanical equipment, especially the pressure vessels.
Primary Areas of Float Sensor Application: In view of the requirements pertaining to the increase in usage of sealed tanks, the current industrial systems make use of this type of float method for precise reading and accuracy, which is a good example of electronics and mechanical engineering, making it the most accurate level-measuring system for various applications in very large storage tanks.

2. Level Detection and Measurement by Using Capacitance Sensor

Level Detection Using Capacitance Sensor
Level Detection Using Capacitance Sensor
Capacitance level sensors are made available for wide range of solids, aqueous, organic liquids and slurries. This technique is frequently stated as the radio-frequency signals applied to a capacitance circuit. The capacitive sensors are designed to sense material with dielectric constants as low as 1.1 for coke and fly ash, and as high as 88 for water or other liquids.
Principle of operation: The principle of capacitive level measurement is based on the change of capacitance. There are two plates in capacitive sensor: one plate acts as an insulated electrode and the other plate acts as a tank wall. The capacitance depends on the liquid level. An empty tank has low capacitance while a filled tank has higher capacitance. A simple capacitor consists of two electrode plates separated by a small thickness of an insulator such as solid, fluid, gas, or vacuum.
The Value of C depends on dielectric constant used, area of the plate and also on the distance between the plates.
C=E(KA/d) Where: C = Capacitance in Pico farads (pF) E = a constant known as the absolute permittivity of free space K = Relative dielectric constant of the insulating material A = Effective area of the conductors d = Distance between the conductors
This change in capacitance can be measured by using an AC Bridge.
Construction and Working
The measurement of liquid level is done by applying a Radio Frequency signal between the conductive probe and the vessel wall. The Radio Frequency signal results in a very-low current which flows through the dielectric process material in the tank from the probe to the vessel wall. If the liquid level in the tank drops, then the dielectric constant decreases, which leads to the drop in capacitance reading as well as minute drop in current flow.
This change can be detected by the liquid-level switch’s internal circuitry and translated into relay state changes of the level switch in case of a point level detection.
The main advantages of these capacitance systems include easy installation, broad application range, good accuracy suitable for variety of applications and highly recognized and well -proven technology.
The disadvantages include sensitivity to changes in the measurable properties such as dielectric constant and conductivity which creates an issue; furthermore, it is an intrusive system.
Primary Areas of Capacitance Sensor Application: Capacitance level sensor probes are used for measuring the levels of:
  • Fluids
  • Liquid metals at very-high temperature range
  • Dissolved gases at very-low level of temperature
  • Very-high density industrial processes.
3. Level Detection by Using Conductivity Probes
Level Detection by Using Conductivity Probes
Level Detection by Using Conductivity Probes
Principle of operation: The principle used in this system states that “the presence of a product will make a change in the resistance between the two conductors.”
Construction and Working
This system is applicable for level measurement in conductive liquids. The conductivity of the insulated material can be varied if the probe is covered or not covered within the conductive product. There are two electrodes: one is used as a metal wall of the tank, and the other electrode is inserted into the tank. This principle can be explained with a practical application.
A Conductive probe is used as a liquid level indicator for measuring the level of electrically conductive products in a metal water tank, or other container, which can be obtained by means of a probe isolated from the container and a conductivity amplifier. When the product is not in connection with the probe, the electrical resistance is relatively high or infinite between the probe and the metal tank wall. If the level of the liquid rises completely between the probe and the tank wall, then the resistance gradually decreases.
This method is Advantageous as it is very simple, low cost and well suited for dual or multiple point control.
The method is disadvantageous as the probe must not get contaminated with grease or any other deposits and has limited suitability for products of varying conductivity.
As a practical example of this detection here we have shown figure of intelligent overhead tank water level indicator with block diagram which uses conducting probes for detecting the water in tank. This system is built by using priority encoder, BCD-seven segment decoder, seven segment display and other miscellaneous components.
Intelligent Overhead Tank Water Level Indicator
Intelligent Overhead Tank Water Level Indicator
The probes are connected to +5V and the return or ground terminal is kept at the bottom of the tank. Nine active-low inputs of priority encoder are converted to active- low BCD output by internal circuitry and then the water level is indicated in seven segment display interms of percentage of water. As the water level is increases probes get shorted and correspondingly priority encoder gives BCD values and later the information is displayed on seven segment display through BCD to seven segment decoder IC.

Continuous Level Measurement and Detection Systems

A continuous level sensor is most sophisticated and also provides liquid level monitoring of an entire system. This liquid level sensor is used to measure the fluid level within a specified range, moderately than at a one point, which produces an analog output and directly correlates to the level in the vessel. To create a liquid level management system, the output signal is interconnected to process a control loop and linked as a visual liquid level indicator. This measurement system consists of variety of sensors such as
  • Ultrasonic Sensor
  • Radar level sensor
  • Optical Sensor

1. Level Detection and Measurement by Using Ultrasonic Sensor

Level Detection Using Ultrasonic Sensor
Level Detection Using Ultrasonic Sensor
Ultrasonic level instruments works on the basic time-of-flight principle which states that sending a sound wave from a peizo electric transducer to the contents of the vessel, which may contain liquid, solid or slurries level.
This liquid level sensor comprises two elements such as an associated electronic transceiver and a transducer with relatively high efficiency. In case of a liquid level controller, the fluid level can be determined by measuring the trip time difference between a transmitted ultrasonic pulse and a reflected echo.
The frequency range for ultrasonic methods varies from a range of 15-200 kHz for transmitting and receiving ultrasonic waves. The lower frequency instruments are used for the measurement of difficult applications such as longer distances and solid-level measurements, and the instruments with higher frequency are used for shorter liquid level measurements.
The ultrasonic sensors are advantageous as they are not in direct contact with the product, and the level measurement is done without involving any physical contact. They do not have any moving parts.
As a disadvantage, these types of sensors are not suitable for higher pressures in a vacuum and temperature limits of up to 170 degree centigrade.

2. Level Detection and Measurement by Using Radar Level Sensor

Level Detection Using Radar Level Sensor
Level Detection Using Radar Level Sensor
Radar level measurement system is based on the principle of measuring the time required for the microwave pulse and its reflected echo to make a complete return trip between the non-contacting transducer and the sensed liquid level. Then, the transceiver converts this electrical signal into distance/level and presents it as an analogue and/or digital signal. The transducer’s signal output can be selected by the user to be directly or inversely proportional to the span.
Construction and Working
The working of a radar level sensor is explained here to measure the level of liquid or solid. The radar signals are transmitted from the antenna placed at the top of the water tank or vessel as shown in the above figure. The radar signal gets reflected by the liquid surface and echo is carried out by the antenna.
By varying the signal, the frequency gets varied during the time of echo and the time of the signal transmission comparison. The difference of frequency is proportional to the distance of the liquid, and this statement is used to determine the accurate level of the liquid.
The advantages of this radar level sensor include high accuracy and least specificity as it can measure liquid levels in plastic tanks without establishing any contact with the liquid.
The disadvantages of this type of sensor include the cost, which is very high and the price increases with the increase in accuracy. Moreover, these sensors are very sensitive to the buildup on the sensor surface.
Primary Areas of Radar Level Sensor Applications
Radar level sensors are widely used to measure the level of liquids as well as solids in storage tanks and tank terminals. These liquid level sensors operate at a wide range of temperature, pressure and various process conditions.

3. Level Detection and Measurement by Using Optical Sensors

Level Detection Using Optical Sensors
Level Detection Using Optical Sensors
The optical sensor consists of an infrared LED and a light receiver. The light emitted from the LED is directed towards a prism which forms the tip of the level sensor. If there is no liquid present in the tank, then the light from the LED is reflected within the prism and the receiver.
When the liquid level raises and immerses the sensing prism, the light gets refracted out into the liquid, leaving little amount of light or no light to reach the receiver. Sensing this change, the receiver activates electronic switching within the level unit for operating external alarm or control circuit.
The advantages of this optical sensor are that they are not in contact with the process, and perform accurate measurements of small level movements.
The disadvantages of these sensors include limited applicability and sometimes a high-cost of installation.
This is about liquid level sensors and their types with advantages and disadvantages. As an electronics kitsdeveloper company, we have numerous electronic project kits based on these types of level sensors for various applications. Therefore, you can contact us regarding such projects or any sort of further information on this topic by commenting in the comments section below.

Thursday, 21 July 2016

The gravest fear that has rippled through humanity from the technology industry is that, someday, almost all of our jobs will be replaced by robots.
While that fear is often laughed off as something that will only happen far into the future, the truth is that it's actually happening right now.
In Dongguan City, located in the central Guangdong province of China, a technology company has set up a factory run almost exclusively by robots, and the results are fascinating.
The Changying Precision Technology Company factory in Dongguan has automated production lines that use robotic arms to produce parts for cell phones. The factory also has automated machining equipment, autonomous transport trucks, and other automated equipment in the warehouse.
There are still people working at the factory, though. Three workers check and monitor each production line and there are other employees who monitor a computer control system. Previously, there were 650 employees at the factory. With the new robots, there's now only 60. Luo Weiqiang, general manager of the company, told the People's Daily that the number of employees could drop to 20 in the future.
The robots have produced almost three times as many pieces as were produced before. According to the People's Daily, production per person has increased from 8,000 pieces to 21,000 pieces. That's a 162.5% increase.
The increased production rate hasn't come at the cost of quality either. In fact, quality has improved. Before the robots, the product defect rate was 25%, now it is below 5%.
Shenzhen Evenwin Precision Technology, also based in Dongguan, announced a similar effort in May 2015. This region of China is often referred to as the "world's workshop" due to the high number of factories located there.
The shift happening with automation has been in the works for many similar companies in the area for quite some time. Foxconn, the controversial manufacturer of many gadgets such as the iPhone and iPad announced itsrobot initiative back in 2011.
Dongguan is about an hour's car ride north of Shenzhen, which is widely regarded as one of the top regions in the world for gadget manufacturing. The growth of robotics in the area's factories comes amidst a particularly harsh climate around factory worker conditions, highlighted by strikes in the area. One can only wonder whether automation will add fuel to the fire or quell some of the unrest.
Some of the influx of robotics in the region is due to the Made in China 2025initiative, and we will continue to see automation affect the area and potentially reduce the number of manufacturing jobs. Additionally, in March, 2015, the Guangdong government announced a three year plan to increase automation in the region by subsidizing the purchase of robots.
According to the International Federation of Robotics (IFR), electronics production was one of the biggest growth drivers for the sales of industrial robots. China was the largest market for industrial robotics in 2014 with nearly 60,000 robots sold.

Saturday, 2 July 2016

Nikon Digital Camera - PLC - Raspberry Pi 2

This PLC application about how to use Nikon Digital Camera for connecting to PLC with using Raspberry Pi 2. this application for photographing, example:
Automatically take picture when:
  1. products that are not good (NG) or reject
  2. at a certain time, the worker does not exist in the machine
  3. emergency stop in the machine, and etc.
In Nikon Digital Camera using USB Picture Transfer Protocol (PTP protocols) or another digital camera that is PTP Protocols support.
In Raspberry Pi using Raspberry pi 2 with Raspbian Wheezy OS and use python 2.7
In PLC using Siemens S7-200 with Modbus Support or another PLC with Modbus Support.


Hardware needed for Digital Camera Application

  1. Digital Camera with PTP Support, I use Nikon COOLPIX S2800 Compact Digital Camera
  2. Raspberry Pi 2
  3. PLC that is Modbus Support, I use Siemens PLC S7-200
  4. Male RS232 - TTL Module
  5. RS232 PLC Cable
  6. Power Supply for Raspberry Pi
  7. 2 pieces Push Button Switch for test

Hardware Connection for Digital Camera Application

Software needed for Digital Camera Application

  1. Raspbian Wheezy OS : https://www.raspberrypi.org/downloads/raspbian/
  2. gphoto2 reference : http://gphoto.sourceforge.net/doc/manual/ref-gphoto2-cli.html
  3. Project file for Raspberry Pi Setup, click here

Raspberry Pi Setup for Digital Camera Application

A. Serial Modbus Setup on Raspberry Pi 2

STEP 1:

In LXTerminal:

sudo cp /boot/cmdline.txt /boot/cmdline.bak
sudo cp /etc/inittab /etc/inittab.bak

sudo nano /boot/cmdline.txt

Remove "console=ttyAMA0,115200"

Ctrl+X to exit, Y to save followed by enter twice

sudo nano /etc/inittab

Put a '#' before "T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

Ctrl+X to exit, Y to save followed by enter twice

STEP 2:

Copy Paste All Project file to folder /home/pi on Raspberry Pi 2

STEP 3:


In LXTerminal

cd /home/pi
cd pyserial-2.7
sudo python setup.py install

STEP 4:

In LXTerminal

cd /home/pi
cd MinimalModbus-0.6
sudo python setup.py install

B. gphoto2 Setup on Raspberry Pi 2

STEP 1:

Raspberry Pi Connected to Internet via Ethernet/LAN
Install via Internet Access:
Open LX-Terminal and type:

cd ~
sudo apt-get install libltdl-dev libusb-dev libusb-1.0 libexif-dev libpopt-dev

Optional: Raspberry Pi Disconnected from Internet

STEP 2:

Camera do not Connected to Raspberry Pi
Already Project file to folder /home/pi on Raspberry Pi 2

STEP 3: libgphoto2-2.5.8 setup

in LX-Terminal and type:

cd ~
cd libgphoto2-2.5.8
sudo chmod 777 * -R
./configure
sudo make install

STEP 4: gphoto2-2.5.8 setup

in LX-Terminal and type:

cd ~
cd gphoto2-2.5.8
sudo chmod 777 * -R
./configure
sudo make install

STEP 5: Check the installed gphoto2 is Success

in LX Terminal type:

cd ~
gphoto2 --version

If Error:
gphoto2: error while loading shared libraries: libgphoto2.so.6: cannot open shared object file: No such file or directory

in LX Terminal type:

sudo ln -s /usr/local/lib/libgphoto2.so.6 /usr/lib/libgphoto2.so.6

If Error:
gphoto2: error while loading shared libraries: libgphoto2_port.so.12: cannot open shared object file: No such file or directory

in LX Terminal type:

sudo ln -s /usr/local/lib/libgphoto2_port.so.12 /usr/lib/libgphoto2_port.so.12

STEP 6: Camera Check

Camera Connected to Raspberry Pi via USB
in LX Terminal type:

cd ~
gphoto2 --auto-detect
gphoto2 --summary

If Error:
Camera already ..
From Remove Camera such as Storage Mass

sudo killall gvfs-gphoto2-volume-monitor 
sudo chmod -x /usr/lib/gvfs/gvfs-gphoto2-volume-monitor

C. Auto Startup Python Script on Raspberry Pi 2

STEP 1:

in LX Terminal type:

cd ~
sudo nano auto-startup.sh

in editor, type in this script:

#!/bin/sh
cd /
cd home/pi
sudo python take-photo-plc.py
cd /
and then:
CTRL+X ,  press Y, enter

STEP 2:


in LX Terminal type:

cd ~
sudo chmod 755 auto-startup.sh

STEP 3:

Script Test, in LX Terminal type:

sudo sh auto-startup.sh

CTRL+C for  Stop

STEP 4:

in LX Terminal type:

sudo crontab -e

In editor, go to bottom and type:

@reboot sh /home/pi/auto-startup.sh >/home/pi/startuplog 2>&1
CTRL+X ,  press Y, enter

STEP 5:


Auto Start the Desktop (LXDE)
  1. in LX Terminal type: sudo raspi-config
  2. 2.Select Enable Boot to Desktop/Scratch from the menu and press Enter
  3. 3.Select Desktop Login as user pi at the Graphical Desktop.
  4. 4.Select <Finish> and Enter, then select <Yes> to reboot.

PLC Programming for Automatic Capture Image

  1. Project file for Siemens PLC S7-200, click here
  2. Download PLC Ladder Programming to PLC using PLC Software











Wednesday, 29 June 2016

plc and scada interface using DDE.

Industrial control systems are always very complex and cumbersome to handle. For electronics engineers, it is becoming very essential to understand the computer control system using a programmable logic controller (PLC) and supervisory control and data acquisition (SCADA) system.
Here is a very efficient and expandable robust control system solution for industrial purposes. For the proposed system, we have used AB Allen Bradley MicroLogix 1400 PLC 1766, Wonderware InTouch 2012R2 SCADA system and KEPServer version 5 software for communicating between the PLC and SCADA. Wonderware InTouch SCADA is becoming increasingly popular due to its powerful user-friendly graphics as shown in Fig. 1.
Fig. 1: A typical Wonderware InTouch graphical user interface
Fig. 2: MicroLogix 1000 PLC (Model 1761-L10BWA features 120V/240V AC power, six 24V DC digital inputs and four relay outputs)
1. The RSLogix family of IEC-1131-compliant Ladder logic programming packages help you maximise performance, save project development time and improve productivity. This family of products has been developed to operate on Microsoft Windows operating systems. Supporting Allen Bradley SLC 500 and MicroLogix families of processors, RSLogix 500 was the first PLC programming software to offer unbeatable productivity with an industry-leading user interface. PLC is programmed using Ladder programming in RSLogix software. Different inputs and outputs have different addresses. Mostly the field devices, which are to be controlled, are connected to the PLC via digital input, analogue input, digital output and RS232, among others. The address of each device, module and register is specific to each PLC manufacturer, including Allen Bradley, Siemens, Schneider, Mitsubishi, Hitachi and Delta.
Fig. 5: Schematic diagram for PLC connections

2. The PLC is connected to the PC via the Ethernet. Since both PLC and SCADA are from different manufacturers, we used an intermediate OPC link (communicator) between these. This job is done by
KEPServer, which is installed on the PC.
3. The PLC IP address is configured using software tool BOOTPServer.
4. When the main SCADA is running, applications like KEPServer should be running in the background and PLC should be in online mode.
5. Using SCADA, a graphical user interface (GUI) is built to monitor and control various parameters like current/voltage and to switch on/off various devices.
Fig. 6: Interfacing the PLC via the Ethernet to a PC to make it available to software for configuration and programming
Fig. 7: Setting BOOTP server properties

Fig. 10: SCL instruction set
For a beginner, it is better to start with the MicroLogix family of PLCs from Allen Bradley. MicroLogix 1000 controller offers control capabilities in an affordable, compact package. MicroLogix 1200 provides features and options to handle an extensive range of applications. The expandable MicroLogix 1500 controller helps you achieve high-level control in a variety of applications. MicroLogix 1100 and MicroLogix 1400 controllers increase application coverage with enhanced network communications at affordable prices. RSLogix 500 programming software and RSLogix Micro programming software provide an instruction set that is common to MicroLogix and SLC 500 controller families.
MicroLogix 1000 PLC system. MicroLogix 1000 PLC (Fig. 2) is available in 10-point, 16-point or 32-point digital input/output (I/O) versions. Analogue versions available with 20 digital I/O points, four analogue inputs (two voltage and two current) and one analogue output (configurable for either voltage or current) provides a compact form factor, with footprints as small as 120mm x 80mm x 40mm (4.72 x 3.15 x 1.57 inches).
It offers fast processing with typical throughput time of 1.5ms for a 500-instructions program and has a pre-configured 1kB program and data memory to ease configuration. It includes built-in EEPROM memory; hence, there is no need for battery back-up or a separate memory module.
The device offers peer-to-peer messaging (up to 32 controllers on a DH-485 network) through a 1761-NET-AIC communication interface. Communication takes place via DeviceNet and EtherNet/IP through 1761-NET-DNI and 1761-NET-ENI communication interfaces.
It also includes a built-in high-speed counter (only on controllers with 24V DC inputs) and lets you customise input response times and noise rejection using adjustable DC input filters.
The device supports simple connectivity through an RS232 communication channel to a PC for program upload, download and monitoring.
Fig. 12: A typical address for AB PLC
MicroLogix 1400 PLC system. The 1766 MicroLogix 1400 PLC system (Fig. 3) is built upon critical MicroLogix 1100 features, including EtherNet/IP, online editing and a built-in LCD panel. These controllers feature a higher I/O count, faster high-speed counters, pulse train output, enhanced network capabilities and a backlight on the LCD panel. Controllers without embedded analogue I/O points provide 32 digital I/O points, while analogue versions offer 32 digital I/O points and six analogue I/O points. You can expand all versions with up to seven 1762 expansion I/O modules.
The Ethernet port provides Web server capability, email capability and protocol support for DNP3 protocol support. The built-in LCD with a backlight lets you view the controller and I/O status. It also provides a simple interface for messages, bit/integer monitoring and manipulation.
Application capabilities can be expanded through support for up to seven 1762 MicroLogix Expansion I/O modules with 256 discrete I/Os, up to six embedded 100kHz high-speed counters (only on controllers with DC inputs), two serial ports with DF1, DH-485, Modbus RTU, DNP3 and ASCII protocol support.
There are 10kB words in the user program memory with 10kB words in the user data memory, and up to 128kB for data logging and 64kB for recipe.
PLC connections
One can buy a compact AB Allen Bradley MicroLogix 1400 PLC 1766, with eight DIO and two built-in serial ports (model 1766) for initial development. We used MicroLogix 1400 controllers, which are suitable for use in an industrial environment. Specifically, this equipment is intended for use in clean, dry environments.
Typical PLC connections for automation of an experimental facility are shown in Fig. 5. Allen Bradley Micro Logix 1400 has various digital input and digital output pins operated by +24V DC. An analogue input module is added separately. Another high-current 1000A power supply device is connected via RS232 protocol, where only three lines, namely, TX, RX and GND, are used for communication via a PLC serial port. Finally, AB PLC is connected to the PC via an Ethernet port.
RS232. RS232 is a serial protocol that converts parallel data to serial bits (pulses) and sends these across three wires, that is, TX, RX and GND. In most cases, the number of wires required is just three, but in special circumstances it may go up to nine wires, say, an RS232 modem.
Allen Bradley 1400 series has two serial ports. The first one is through a PPI cable with a 9-pin D connector at the other end. This needs a NULL modem connector to connect to any PC having a serial port or USB serial adaptor. NULL modem connections are shown in Fig. 4.
Interfacing the PLC to a computer. MAX1400 has three ports. First is COM1 (round connector); second is COM2 (9-pin D connector), which is for RS485/RS232 communications; and the third is Ethernet for Ethernet/IP driver based communications. Therefore it is pretty easy for anyone to configure Ethernet as download port and COM1 as serial port for RS232 communications.
Allen Bradley PLC is connected to the computer via the Ethernet. We need to interface the programmable controller in order to configure and program (Fig. 6).
Adding drivers. Adding a driver is required for RSLOGIX classic software. To do so, you need to click on the middle icon and add RS232 DF1 driver to it.
Software for interfacing. RSLinx Classic is a software tool from Rockwell Automation Networks and Devices. It is a comprehensive factory communication solution, providing Allen Bradley PLC access to a wide variety of Rockwell Software and Allen Bradley applications, ranging from device programming and configuration applications such as RSLogix.
fig. 13: Setting RS232 channel configuration

Fig. 14: Downloading the Ladder program to the PLC
BOOTP server is a suitable server to establish communication between PC and Rockwell PLC.
Communicating to hyper terminal. How does one know that the PLC is transmitting characters out of its serial port? You can view the pulses or protocol produced using a hyper terminal window.
For that, you need to set the hyper terminal settings to 19200, N, 8, 1, which is same as the settings of PLC serial DF1 driver.
Double-click MAC and enter the IP (Fig. 7).
Ladder programming. Once the AB PLC is successfully interfaced to the PC, we need to properly program it using RSLOGIX provided by Rockwell Automation. For programming the PLC, we use Ladder programming. Typical PLC programs use blocks like timers on and off, counters, digital I/Os, RS232 communication blocks and others.
Ladder program is similar to the wiring diagram of the circuit. We redraw the wiring diagram using two vertical lines to represent input power rails and stringing the rest of the circuit between these. Sub-routines are implemented as another ladder.
A typical example of a block used for RS232 programming is AWA (Fig. 9).
ASCII write append (AWA). The AWA instruction sends a specified number of characters (for example, 50) of the source tag (ST14:0) to a PLC serial port 2 and appends either one or two pre-defined characters. It is used for RS232 communication.
Similarly, an SCL is an instruction used to read and scale an analogue input to a corresponding physical value like temperature or pressure.
In the above example, the address for the analogue input is I: 1.0 and the converted raw data is divided by 10,000 and added to offset to implement a linear transfer function like
y = mx + c
A number of free Ladder programming tutorials are available on the Internet. Inside the PLC, we have various registers like output, input, status and binary. Each bit in these registers specifies a function. Addresses of the devices are built on the basis of names, PLC slot numbers, words and bit numbers. Address representations differ from manufacturer to manufacturer.
The table above shows some of the bit addresses of the PLC and how these are related to field devices.
A typical address of an AB PLC for output coil is built as in Fig. 12.
Once you write your Ladder code for the PLC, download the code into the PLC. Let the PLC be in Run mode after that.
Fig. 13 shows how an RS232 port can be configured for handshaking a power supply device, which has settings 9600, N, 8, 1.
Wonderware InTouch SCADA
Wonderware’s InTouch HMI software for visualisation and industrial process control offers outstanding ease of use and simple-to-configure graphics. For having an interactive GUI to control outputs of PLC, RS232 devices via PLC, we use Wonderware InTouch SCADA. A simple GUI can be made in Wonderware by following simple steps:
1. Open Wonderware Development tool by double-clicking on Desktop icon.
2. Start a new project.
3. From the palette on the right side, choose the appropriate graphical object to be inserted.
4. Click on the screen to insert the object.
5. Double-click on the object to add a suitable tag name and type of object. Type defines usage; it may be analogue or discrete.
6. Double-click on the tag to assign properties to the object. Different operations like visibility or blink can be controlled on the basis of scripting.
7. If the tag is I/O type (meant to read or control a device), specify the address of the device.
8. Address of the device can be obtained from registers of the PLC, which can be viewed in RSLogix.
9. In Modify Access Name window, keep the access name as KEPServerEX_SL. KEPServer acts as a communicator between RSLogix and Wonderware InTouch.
10. In this fashion, develop the entire GUI with specific tag names, addresses of devices and PLC variables used in Ladder logic.
Access name. Each PLC uses a specific protocol to communicate with the I/O server or DA server. InTouch then uses an access name concept to continue this communication for dynamic data exchange (DDE). Typically, because here KEPServer is acting as a communicator between PLC RSLogix and Wonderware InTouch, we specify access name in InTouch as KEPServerEX_SL. Access names are selected in the tag name dictionary for each tag used in the application.
Scripting. In all control systems, it is essential to provide software interlocks to prevent human errors. So the best method would be using Window Scripts in InTouch. Window scripts execute periodically when an InTouch window is opened, or one time when an InTouch window is opened or closed.
Programming here is done using scripts, which is similar to any programming language. A typical scripting example is shown in Fig. 18.
Fig. 16: Wonderware development tool
Fig. 17: Setting tag properties
KEPServer
KEPware’s OPC server KEPServerEX provides an easy and reliable way to connect the Allen Bradley PLC to HMI, SCADA, Historian, MES, ERP and countless custom applications. Here, you can use KEPServer for communicating RSLOGIX to Wonderware InTouch using the Ethernet/IP protocol.
Be careful while specifying tagnames in KEPServer. Tag names and their corresponding addresses should match those mentioned in Wonderware InTouch development.
Running the final application
Once your PLC code is downloaded into the PLC and run from RSLogix, run KEPServer. Open the runtime application of Wonderware InTouch software and open your GUI file. Always make sure that KEPSersver is running in the background while you run Wonderware InTouch application.
Applications
Such a control system can be very useful for industrial automation, in research laboratories and big industries. The graphical interface makes it easy for the operator to operate switching and controlling operations. The PLC provides a very rugged solution to control relays and RS232 devices.

Arvind soni is masters in ECE from the BHOPAL RGTU,
and is currently working as engineer-at Arist automation Indore.9111225438