fy project: data aquisition

109
Final Project Report of BE (IE) Year 2007 PR –15b- IIEE – 438 – 2007 MIDAS Multiplexed Industrial Data Acquisition System Using NI LabVIEW M. Ubaid Khan Kamali (1526) Rizwan Ahmed Khan (1530) Sikander Ali (1534) Syed Wasif Ali Shah (1538) Submitted to In-charge Final Project Work Ashab Mirza Associate Professor IIEE

Upload: api-19807868

Post on 18-Nov-2014

393 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: FY project: Data aquisition

Final Project Report of BE (IE) Year 2007

PR –15b- IIEE – 438 – 2007

MIDAS Multiplexed Industrial Data Acquisition System

Using NI LabVIEW

M. Ubaid Khan Kamali (1526)

Rizwan Ahmed Khan (1530)

Sikander Ali (1534)

Syed Wasif Ali Shah (1538)

Submitted to In-charge

Final Project Work

Ashab Mirza Associate Professor IIEE

Page 2: FY project: Data aquisition
Page 3: FY project: Data aquisition

I

SUPERVISORS OF THE PROJECT

EExxtteerrnnaall PPrroojjeecctt SSuuppeerrvviissoorr

MMrr..FFaarrhhaann KKhhaann AAssssiissttaanntt PPrrooffeessssoorr,, PPNNSS JJaauuhhaarr ((NNUUSSTT)),, KKaarraacchhii MMSS ((CCoommmmuunniiccaattiioonnss)) NNEEDDUUEETT,, KKaarraacchhii BBEE ((IInndduussttrriiaall eelleeccttrroonniiccss)) NNEEDDUUEETT,, KKaarraacchhii EEmmaaiill:: FFaarrhhaannkkhhaann@@hhoottmmaaiill..ccoomm

IInntteerrnnaall PPrroojjeecctt SSuuppeerrvviissoorr

MMrrss.. QQuurraattuull AAiinn LLeeccttuurreerr,, IIIIEEEE BBEE ((IInndduussttrriiaall EElleeccttrroonniiccss)) NNEEDDUUEETT,, KKaarraacchhii IInncchhaarrggee IICCII LLaabb aatt IIIIEEEE EEmmaaiill:: qquurrrraatt@@yyaahhoooo..ccoomm

PPrroojjeecctt WWoorrkk IInncchhaarrggee

MMrr.. AAsshhaabb MMiirrzzaa AAssssoocciiaattee PPrrooffeessssoorr,, IIIIEEEE MMSS ((AAeerroossppaaccee EEnngggg..)) EENNSSAAEE,, TToouulloouussee,, FFrraannccee BBEE ((EElleeccttrroonniiccss)) NNEEDDUUEETT,, KKaarraacchhii EEmmaaiill:: aasshhaabbmmiirrzzaa@@yyaahhoooo..ccoomm

Page 4: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

II

TEAM MEMBERS Enrollment No. Syed Wasif Ali Shah IIEE-615 (Group Leader) Cell: +92-321-2185029 Email: [email protected] Rizwan Ahmed Khan IIEE-607 Cell: +92-331-3143364 Email: [email protected] M. Ubaid Khan Kamali IIEE-603 Cell: +92-300-3087561 Email: [email protected] Sikander Ali IIEE-611 Cell: +92-0301-2880070 Email: [email protected]

.

House # A-368, Ward # 4, Majeed Shah Street, JHUDO, District Mirpurkhas-Sindh House # 314, Wapda Colony, T.P.S, Guddu, District Kashmore-Sindh House # 512, behind Police Station. District Tando Adam-Sindh Unit # 1, Near Meat Market, P.O Bhiria Road, District Naushehro Feroze-Sindh

Page 5: FY project: Data aquisition

III

Acknowledgment

During our project work Associate Professor IIEE Ashab Mirza helped us all the

possible ways. He guide us in getting the most suitable data acquisition card, the

application software for HMI and also gave technical information about DAQ card and

signal conditioning.

We are indebt of Dr. Syed Naimat Ali Rizvi; Principal IIEE allowed the purchase

of data acquisition card and solving our problems. Engr. Farhan Khan, Ex. Lecturer of

IIEE, who provide us technical help in designing digital scanner using microcontroller.

Engr. Farah Haroon, Assistant Professor of IIEE, provided us the strong basis of

electronic devices, circuits and systems.

We are also thankful to Engr. Azmat Sher, IIEE graduate and CEO Industronics

which provides industrial solutions to various control systems, helped us in developing

the mechanical hardware and indigenously designed DAQ card, which was used before

purchase of NI DAQ card. Engr. Tehseen Jabbar, BE Electronics, helped us in managing

project work that only with their help and untiring guidance; we are able to turn this

project into reality.

Page 6: FY project: Data aquisition

IV

PREFACE At this auspicious occasion when we are submitting the project report on “Multiplexed

Industrial data Acquisition System Using National Instrument’s LabVIEW”, we

ourselves highly indebted towards Allah Almighty Who enabled us to complete this

project in due time.

We choose Multiplexed Industrial Data Acquisition System as a final project

because it was the most important instrumentation project. It is a complete industrial

Virtual Instrumentation system, which is the future of industrial automation. For this

purpose the NI multifunction DAQ card was employed. This project contains the

three most important quantities of any process industry as demo which are level,

temperature and servo valve position. Besides data acquisition card this project also

contains the signal conditioning of different transducer and also hardware display for

input quantities. This project contains certain complexities and one can learn a lot

from this project.

The report consists of seven chapters in all. First chapter gives

introduction which includes the project need, problem description, block diagram and

schematics with description of each block and part, all possible solutions of problem

and description plus reason of that solution which we selected. Second chapter

contains analysis and simulation which includes the mathematical models of system

and sub-systems, theoretical solution and its performance analysis and computer

simulation of those subsystems for which simulation was possible on available

software. Third chapter describes mechanical model which includes industrial

prototype development for the selected parameters. Fourth chapter describes

sensor’s selection and signal conditioning which describes different sensors available

and advantages of selected sensors and their signal conditioning. Fifth chapter is on

digital scanner which includes its designing techniques and features and describes its

importance in industry. Sixth chapter describes the configuration of DAQ card.

Seventh chapter gives human machine interface developed on LabVIEW, its

graphical programming and describes its features and advantages. The conclusion

Page 7: FY project: Data aquisition

V

includes the points which we learned during the designing of this project and it also

includes the possible recommendation.

During designing of this project we faced many difficulties. Most

problems were related to unavailability of required electronic devices. So we had to

complete this project with available technology as well as employed the latest virtual

instrumentation techniques. As industrial transducers are very expensive so

transducer’s arrangement was also a problem but we designed transducers ourselves as

well. They were manufactured on industrial standard quality and were linear with

respect to physical quantity.

In the end we would like again to express our gratitude towards ALLAH

almighty, then our parents who are constant source of encouragement and our teachers

for their efforts to make us acquainted with the electronics and control and most of our

Institute the IIEE which provide us the platform to become the practically oriented

engineers.

Karachi January 3rd, 2008.

Page 8: FY project: Data aquisition

VI

LIST OF FIGURES Figure-1.1: Traditional instruments (left) and software based virtual instruments (right) largely share the same architectural components, but radically different philosophies [Courtesy NI website]. Page # 3 Figure-1.2: Virtual instrumentation combines productive software, modular I/O, and scalable platforms. [Courtesy NI website], Page# 5 Figure-1.3: LabVIEW is a leader in application software used in PC-based data acquisition and instrument control. [Survey of Design News and R&D Magazine, QI 2004], Page# 7 Figure-1.4: A PC based data acquisition [Courtesy National Instrument Website], Page#8 Figure-2.1: Thermal System Block Diagram, page # 13 Figure-2.2: See Back Effect, page # 14 Figure-2.3: A simple thermocouple, page # 16 Figure-2.4: Physical circuit for thermocouple, Page # 17 Figure-2.5: Conceptual T(x) plot of thermocouple, Page# 18 Figure-2.6: Cold junction compensation, Page# 20 Figure-2.7: A general block diagram for position control, page# 21 Figure-2.8: Graph between generated voltage and applied RPM, page# 23 Figure-2.9: Graph between generated and voltage, Page# 23 Figure-2.10: Graph for J-Type Thermocouple, page# 25 Figure-2.11: Open loop impulse response, page# 26 Figure-3.1: Mechanical model for liquid level system with inlet pump motor, page# 29 Figure-3.2: Electric furnace surrounded by wooden block for safety and protection attached with the temperature controller. The controller is based upon SCR pulse firing technique, page# 30 Figure-3.3: Servo controlled valve mechanism to control the outlet flow of liquid tank , page# 31

Page 9: FY project: Data aquisition

VII

Figure-3.4: Overall mechanical assembly, page# 32 Figure-4.1: Graph between transmitter output and height of level, page# 37 Figure-4.2: Block Diagram of Level Transmitter Signal Conditioning, page # 38 Figure-4.3: Circuit Diagram of Level Transmitter Signal Conditioner, page # 38 Figure 4.4: Graph between temperature and RTD Output, page # 39 Figure-4.5: Graph between AD594 output voltage with respect to temperature, page# 40 Figure-4.6: Block Diagram of Thermocouple Signal Conditioning Output, page # 41 Figure-4.7: Circuit Diagram of Thermocouple Signal Conditioner, page # 42 Figure-4.8: Block Diagram of PI Controller for Controlled Valve, page# 43 Figure-4.9: Graph of feedback signal from pot meter against valve position, page# 44 Figure-4.10: Circuit Diagram of proportional controller for the servo controlled valve position, page # 45 Figure-5.1: Block diagram of digital scanner, page# 51 Figure-5.2: Circuit schematic of digital scanner, page# 52 Figure-5.3: Controller Program flowchart, page# 55 Figure-6.1: The block diagram of indigenously developed DAQ card. The parameter to be processed and displayed will be selected by the controller from select logic, page# 60 Figure-6.2: Circuit schematic of indigenously developed data acquisition card, page # 62 Figure-6.3: : NI USB-6008 multifunction DAQ card, page # 64 Figure 6.4: The block diagram of NI SUB-6008 multifunction DAQ card, page # 65 Figure-6.5: Setting up hardware, page# 66 Figure-6.6: Device recognition tree in max, page # 67

Page 10: FY project: Data aquisition

VIII

Figure-6.7: : Device self test. A success message will be displayed if device pass the self test as shown, page # 68 Figure-6.8: Attaching sensors/signal lines with the device to the selected channels and setting up timing and triggering from software, page# 69 Figure-7.1: Screenshot of a simple LabVIEW program [Courtesy of NI website], page# 72 Figure-7.2: Data acquisition task in LabVIEW [courtesy NI website], page # 74 Figure-7.3: DAQ assistant express VI, page # 75 Figure-7.4: DAQ device physical channels configuration window, page# 76 Figure-7.5: The front panel of developed HMI on LabVIEW, page# 78 Figure-7.6: Block diagram programming of developed HMI using LabVIEW G-programming environment, page# 80

Page 11: FY project: Data aquisition

IX

LIST OF TABLES Table-2.1: Readings for generator action. Applied RPM and generated voltage, page# 22 Table-2.2: Readings for generator action. Applied and generated voltages, page# 22 Tabel-4.1: Level Transmitter output table during Calibration, page# 37 Table-4.2: RTD's measured values, page# 39 Table-4.3: AD594 output voltage with respect to temperature, page# 40 Table-4.4: Valve position and feedback signal, page# 43

Page 12: FY project: Data aquisition

CONTENTS

Title

Project Supervisors ……………………………………………………………… I

Group Members ………………………………………………………… II

Acknowledgment ……………………………………………………………… III

Preface ………………………………………………………… IV

List of Figures ………………………………………………………… VI

List of Tables ………………………………………………………… IX

1. INTRODUCTION [1-11]

1.1 Instrumentation ………………… 2

1.2 Traditional Versus Virtual Instrumentation ………………… 2

1.3 Virtual Instrumentation in the Engineering Process ………… 5

1.4 Data Acquisition ………………………………………… 7

1.5 Modern Instrumentation Techniques ………………………… 9

1.6 Project Description ………………………………………… 10

1.7 Summary ………………………………………… 11

2. PLANT AND PROCESS [12-26]

Introduction

2.1 Mathematical Modeling of Process Parameters ………………… 13

2.2 Mathematical Simulation and Analysis ………………… 25

3. MECHANICAL MODEL [27-32]

Introduction ………………………………………………… 28

3.1 Industrial Prototype ………………………………………… 28

Page 13: FY project: Data aquisition

3.2 Liquid Level System ………………………………………… 29

3.3 Thermal System ………………………………………… 30

3.4 Servo Controlled Valve Mechanism ……………………….. 31

3.5 Overall Assembly ……………………………………….. 32

3.6 Summary ……………………………………….. 32

4. SENSOR & SIGNAL CONDITIONING [33-46]

Introduction ……………………………………………… 34

4.1 Sensor’s Selection ……………………………………… 34

4.2 Signal Conditioning ……………………………………… 36

4.6 Summary ……………………………………………… 46

5. DIGITAL SCANNER [47-57]

Introduction ……………………………………………… 48

5.1 Scanner in Industry ……………………………………… 48

5.2 Required Features ……………………………………… 48

5.3 Available Designing Techniques ……………………… 49

5.4 Selected Design ……………………… 50

5.5 Programming Flowchart ……………………………………… 55

5.6 Possible Improvements ………………………………... 56

5.7 Summary ……………………………………………… 57

6. DAQ CARD CONFIGURATION [58-69]

Introduction ……………………………………………… 59

6.1 Project Requirements ……………………………………… 59

6.2 Indigenously Developed DAQ Card ……………………….. 60

Page 14: FY project: Data aquisition

6.3 NI USB-6008 Multifunction DAQ Card ……………….. 63

6.4 Getting Started Steps ……………………………………….. 66

6.5 Device Recognition ……………………………………….. 67

6.6 Summary ……………………………………………….. 69

7. HUMAN MACHINE INTERFACE [70-81]

Introduction ……………………………………………….. 71

7.1 LabVIEW ……………………………………………….. 71

7.2 Data Acquisition Task ……………………………………….. 74

7.3 Developed HMI ……………………………………………….. 77

7.4 Block Diagram Programming ……………………………….. 78

7.5 Summary ……………………………………………….. 80

8. CONCLUSION ………………………………………………. [81-84]

9. REFERENCES ………………………………………………. [85-87]

10. APPENDICES ………………………………………………. 88

10. A NI USB-6008 DAQ User Guide

10. B Controller Programming for Digital Scanner

10. C Datasheets and Tables

10. D Project Manual

Page 15: FY project: Data aquisition
Page 16: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

2

1.1 INSTRUMENTATION Instrumentation is about measurement and control. Instrumentation can refer

either to the field in which instrument technicians and engineers work, or to the

available methods of measurement and control and the instruments which facilitate

this ‘[24].

Instruments are devices which are used in measuring attributes of physical

systems. The variable measured can include practically any measurable variable

related to the physical sciences. These variables commonly include:

• Pressure • Flow • Temperature • Level • Density • Position • Radiation • Current • Voltage • Inductance • Capacitance • Frequency • Chemical composition • Chemical properties • Various physical properties Instruments can often be viewed in terms of a simple input-output device. For

example, if we "input" some temperature into a thermocouple, it "outputs" some sort

of signal. (This can later be translated into data) In the case of this thermocouple, it

will "output" a signal in mill volts.

1.2 TRADITIONAL VERSUS VIRTUAL INSTRUMENTATION

Stand-alone traditional instruments such as oscilloscopes and waveform

generators are very powerful, expensive, and designed to perform one or more specific

Page 17: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

3

tasks defined by the vendor. However, the user generally cannot extend or customize

them. The knobs and buttons on the instrument, the built-in circuitry, and the functions

available to the user, are all specific to the nature of the instrument. In addition,

special technology and costly components must be developed to build these

instruments, making them very expensive and slow to adapt ‘[30].

The primary difference between 'natural' instrumentation and virtual

instrumentation is the software component of a virtual instrument. The software

enables complex and expensive equipment to be replaced by simpler and less

expensive hardware; for example analog to digital converter can act as a hardware

complement of a virtual oscilloscope, a potentiostat enables frequency response

acquisition and analysis.

Virtual instruments are defined by the user while traditional

instruments have fixed vendor-defined functionality.

Every virtual instrument consists of two parts – software and hardware. A

virtual instrument typically has a sticker price comparable to and many times less than

a similar traditional instrument for the current measurement task. However, the

savings compound over time, because virtual instruments are much more flexible

when changing measurement task.

Figure 1-1: Traditional instruments (left) and software based virtual instruments (right) largely share the same architectural components, but radically different philosophies [Courtesy NI website]

Page 18: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

4

By not using vendor-defined, prepackaged software and hardware, engineers

and scientists get maximum user-defined flexibility. A traditional instrument provides

them with all software and measurement circuitry packaged into a product with a finite

list of fixed-functionality using the instrument front panel. A virtual instrument

provides all the software and hardware needed to accomplish the measurement or

control task. In addition, with a virtual instrument, engineers and scientists can

customize the acquisition, analysis, storage, sharing, and presentation functionality

using productive, powerful software.

A virtual instrument consists of an industry-standard computer or workstation

equipped with powerful application software, cost-effective hardware such as plug-in

boards, and driver software, which together perform the functions of traditional

instruments. Virtual instruments represent a fundamental shift from traditional

hardware-centered instrumentation systems to software-centered systems that exploit

the computing power, productivity, display, and connectivity capabilities of popular

desktop computers and workstations.

Virtual instruments are compatible with traditional instruments almost without

exception. Virtual instrumentation software typically provides libraries for interfacing

with common ordinary instrument buses such as GPIB, serial, or Ethernet.

Engineers and scientists whose needs, applications, and requirements change

very quickly, need flexibility to create their own solutions. You can adapt a virtual

instrument to your particular needs without having to replace the entire device because

of the application software installed on the PC and the wide range of available plug-in

hardware.

Page 19: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

5

1.3 VIRTUAL INSTRUMENTATION IN THE ENGINEERING PROCESS

Virtual instruments provide significant advantages in every stage of the

engineering process, from research and design to manufacturing test. [4]

1.3.1 RESEARCH AND DESIGN In research and design, engineers and scientists demand rapid development and

prototyping capabilities. With virtual instruments, you can quickly develop a program,

take measurements from an instrument to test a prototype, and analyze results, all in a

fraction of the time required to build tests with traditional instruments. When you need

flexibility, a scalable open platform is essential, from the desktop, to embedded

systems, to distributed networks.

The demanding requirements of research and development (R&D) applications

require seamless software and hardware integration. Whether you need to interface

stand-alone instruments using GPIB or directly acquire signals into the computer with

a data acquisition board and signal conditioning hardware, VI makes integration

simple. With virtual instruments, you also can automate a testing procedure,

Figure 1-2: Virtual instrumentation combines productive software, modular I/O, and scalable platforms. [Courtesy NI website]

Virtual instrumentation

is necessary because it delivers

instrumentation with the rapid

adaptability required for today’s

concept, product, and process

design, development, and

delivery. Only with virtual

instrumentation can engineers

and scientists create the user-

defined instruments required to

keep up with the world’s

demands ‘[31].

Page 20: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

6

eliminating the possibility of human error and ensuring the consistency of the results

by not introducing unknown or unexpected variables.

1.3.2 DEVELOPMENT TEST AND VALIDATION With the flexibility and power of virtual instruments, you can easily build

complex test procedures. For automated design verification testing, you can create test

routines in LabVIEW and integrate software such as National Instruments TestStand,

which offers powerful test management capabilities. One of the many advantages

these tools offer across the organization is code reuse. You develop code in the design

process, and then plug these same programs into functional tools for validation, test, or

manufacturing.

1.3.3 MANUFACTURING TEST Decreasing test time and simplifying development of test procedures are

primary goals in manufacturing test. Virtual instruments based on LabVIEW

combined with powerful test management software such as TestStand deliver high

performance to meet those needs. These tools meet rigorous throughput requirements

with a high-speed, multithreaded engine for running multiple test sequences in

parallel. TestStand easily manages test sequencing, execution, and reporting based on

routines written in LabVIEW.

TestStand integrates the creation of test code in LabVIEW. TestStand also can

reuse code created in R&D or design and validation. If you have manufacturing test

applications, you can take full advantage of the work already done in the product life

cycle.

1.3.4 MANUFACTURING Manufacturing applications require software to be reliable, high in

performance, and interoperable. Virtual instruments based on LabVIEW offer all these

advantages, by integrating features such as alarm management, historical data

trending, security, networking, industrial I/O, and enterprise connectivity. With this

Page 21: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

7

functionality, you can easily connect to many types of industrial devices such as PLCs,

industrial networks, distributed I/O, and plug-in data acquisition boards. By sharing

code across the enterprise, manufacturing can use the same LabVIEW applications

developed in R&D or validation, and integrate seamlessly with manufacturing test

processes.

Figure 1-3 shows the increasing strength of NI LabVIEW based virtual

instrumentation in the engineering processes of R&D and industry over other available

software packages. The increasing advancement and functionality of NI LabVIEW

will soon replace the traditional and other software based virtual instrumentation.

1.4 DATA ACQUISITION

Data acquisition is the processing of multiple electrical or electronic inputs

from devices such as sensors, timers, relays, and solid-state circuits for the purpose of

monitoring, analyzing and/or controlling systems and processes. Instruments or

systems are fully packaged with input and output, user interface, communications

capability, etc. They may include integral sensors.

Input modules are devices (module or card) configured to accept input of

sensors, timers, switches, amplifiers, transistors, etc. for use in the data acquisition

Figure 1-3: LabVIEW is a leader in application software used in PC-based data acquisition and instrument control. [Survey of Design News and R&D Magazine, QI 2004].

Page 22: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

8

system. Output modules are devices with specific functionality for output of amplified,

conditioned, or digitized signal. I/O modules have both input and output functionality.

Digital or discrete I/O includes on-off signals used in communication, user interface,

or control. A general data PC based data acquisition system is shown in figure 1.4:

A typical data acquisition system consists of:

Transducers

Signal Conditioning

Plug-in DAQ device

Driver

Software

Acquired data is displayed, analyzed, and stored on a computer, either using

vendor supplied software, or custom displays and control can be developed using

various general purpose programming languages such as BASIC, C, Fortran, Java,

Lisp, Pascal. Specialized programming languages used for data acquisition include,

EPICS used to build large scale data acquisition systems, LabVIEW, which offers a

graphical programming environment optimized for data acquisition and MATLAB

provides a programming language but also built-in graphical tools and libraries for

data acquisition and analysis.

Figure 1.4: A PC based data acquisition [Courtesy National Instrument Website]

Page 23: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

9

1.5 MODERN INSTRUMENTATION TECHNIQUES The required task can be practically implemented by several

techniques depending upon complexity of the task. We studied three techniques given

below and choose the best one on the bases of available technology, degree level and

industrial requirement.

1.5.1 WIRELESS SOLUTION One method to achieve task was to use wireless communication

technique. By using this technique we have to make individual transmitter for each

transducer and one receiver for all transmitters if only monitoring is required. Signal

of each transducer is converted into electromagnetic wave and is transmitted through

radio antenna. Receiver is tuned over that particular quantity’s frequency. If we are

using only one receiver then we has to auto scan it for all quantities frequency because

receiver can catch only one signal at a time. The choice of receiver’s quantity depends

on the response of physical quantities. If response is very fast changing as in case of

mechanical vibration then we have to use single receiver for that particular quantity.

But in case of slow variant quantity we can use single receiver for more than one

quantity. We did not select this technique because this technique was using wireless

communication which is avoided in industry. One signal can interfere with other

signals in air at same frequencies which may be harmful.

1.5.2 DATA NETWORKING Second method to achieve this task was to use any one networking

topology. By using networking topology we can insert as many transducers as we

want and now a days it is standard which is being used in industry. In this technique

each transducer is server on the selected topology bus while our host computer is

client. Servers provide information whenever client request it. So we program the

client request so that it demands new server information after selected time and go

ahead to get information from next server. When all required servers information is

completed it again repeats cycle and updates all servers’ information and shows on the

Page 24: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

10

display panel. It is the cheapest way to achieve this task. But in this designing

technique we have to make all transducer as server so that they can work as servers on

topology bus. This technique was best but we still did not use this technique because

we have to make each transducer a server and have to log it on selected topology bus.

This technique required complex knowledge of networking communication while our

primary concern was to design data acquisition card but not to implement networking

topologies.

1.5.3 DIRECT CABLE SYSTEMS A third and last technique was to pick the signal directly from the

physical system through cables without networking and after suitable signal

conditioning these signals are fed to DAQ card. This method is mostly adopted by the

industry due to its safe and secure nature. It removes all the dangers of signal

interruption. It also provides the simple design to implement. We have selected this

one as it does not involve signal transmission complexities as was in above given

techniques and one can work upon his concern problem that is DAQ card and it’s

HMI. In all technique the received signals are provided to the DAQ card. We take our

signal’s quantity and direct insert into DAQ card. We employed here three analog

inputs of DAQ card which can be multiplexed up to eight inputs.

1.6 PROJECT DESCRIPTION Monitoring of physical parameters in different industrial fields

with accuracy always remains a problem. Different techniques were developed to

make monitoring as friendly as possible so that operators and engineers can control

parameters easily. HMI or GUI gives the user friendly controlling and monitoring

interface of actuators and transducer to operators.

These days all industries are going to revolutionizes with

advancement in technology especially in the field of instrumentation. In any process

industry control room is the mind of the industry which takes production related

decision and which also monitor all the physical parameters. These parameters are

Page 25: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

11

displayed on monitoring panels which shows the GUI for the DAQ cards working

behind the monitoring panel.

The proceeding project can be divided into two main parts which

are described as follows:

1.6.1 HARDWARE The hardware consists of DAQ card and transducer’s signal

conditioning cards. We have used USB-6008 national instrument DAQ card for our

instrumentation system. The signal conditioning is done to make transducer’s signals

compatible with DAQ card.

1.6.2 SOFTWARE We have used LABVIEW software for designing our graphical user

interface. All quantities are displayed on pc screen through knobs, dial and digital

indicator. Due to increasing popularity of LABVIEW in virtual instrumentation, we

decided to use this software.

1.7 SUMMARY We started this chapter with the introduction of instrumentation

system and then differentiated the traditional and virtual instrumentation. Virtual

instrumentation in process engineering and data acquisition is also discussed here in

detail. As we saw in this chapter that there is a number of different techniques to solve

the problem of industrial data acquisition. We discussed three most important

techniques here.

In the end we discussed project objectives dividing it into two

sections that are hardware and software.

Page 26: FY project: Data aquisition
Page 27: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

13

INTRODUCTION This chapter is concerned with the analysis and simulation of our system by

developing its mathematical model of level and thermal system and the speed of servo

mechanism. For level measurement a pot meter is implemented which will provide the

linear output voltage proportional to the level height. In process temperature, the

temperature is measured by thermocouple up to 750C.

2.1 MATHEMATICAL MODELLING OF PROCESS PARAMETERS

Mathematical modeling of different plants of our project is given one by one as follow.

2.1.2 THERMAL SYSTEM In this thermal system the temperature of the furnace is

monitored up to 600OC using thermocouples. The furnace is provided energy through

electrical supply as shown in figure 2.1:

Thermocouples are linear over long range and suitable in the rigged

environment also inexpensive and versatile devices for measuring temperature. Before

going into the mathematics of thermocouple one should understand see beck effect

[22].

“Electrically conductive materials exhibit three types of thermoelectric phenomena:

Figure-2.1: A thermal system block diagram

Page 28: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

14

The See beck effect, the Thompson effect, and the pettier effect. The See beck

Effect is manifest as a voltage potential that occurs when there is a temperature

Gradient along the length of a conductor. This temperature-induced electrical

Potential is called an electromotive force and abbreviated as EMF.”

Figure 2.1: represents a conceptual experiment that exhibits the See beck

effect. The two ends of a conducting wire are held at two different temperatures T1and

T2. For clarity, assume that T2 > T1, although with appropriate changes of sign, the

development that follows is also applicable to the case where T2 < T1.If the probes of

an ideal voltmeter could be connected to the two ends of the Wire without disturbing

the temperature or voltage potential of the wire, the Voltmeter would indicate a

voltage difference on the order of 10−5 volts per degree Celsius of temperature

difference. The relationship between the EMF and the temperature difference can be

represented as

12 1 2( )E T Tσ= − (2.1) Where σ is the average See beck coefficient for the wire material.

In general, the See beck coefficient is a function of temperature. To develop a

more precise and versatile relationship than Equation (2.1), consider an experiment

Where T1 is fixed, and T2 is varied. For practical thermocouple materials the

relationship between E and T is continuous. Hence, for sufficiently small Change

σ T2 in T2, the EMF indicated by the voltmeter will change by a corresponding Small

Figure-2.2 See Back Effect

Page 29: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

15

amount σ E12. Since σ T2 and σ E12 are small, it is reasonable to linearize the EMF

response as

112 12 2 2 1( ) ( )E E T T T Tσ σ+ ∆ = − + ∆ (2.2) Where ó (T2) is the value of the See beck coefficient at T2. The change in EMF only

depends on the value of the See beck coefficient at T2 because T1 is held fixed.

Subtract Equation (2.1) from Equation (2.2) to get

12 2 2( )E T Tσ=∆ ∆ (2.3) This can be rearranged as

122

2( ) ET

Tσ =

∆∆ (2.4)

If ó is an intrinsic property of the material, then the preceding equation must hold for

any temperature. Replacing all references to T2 with an arbitrary temperature T, and

taking the limit as the temperature perturbation goes to zero, gives

0lim( ) TdETdT

σ ∆= (2.5)

Using the Fundamental Theorem of Calculus, the limit becomes a derivative.

The result is the general definition of the Seebeck Coefficient

0lim( ) TdETdT

σ ∆= (2.6)

Equation (2.6) contains all the theoretical information necessary to analyze

thermocouple circuits.

Practical exploitation of the Seebeck effect to measure temperature requires a

combination of two wires with dissimilar Seebeck coefficients.

Figure 2.2: represents such a basic thermocouple. The two wires of the

thermocouple are joined at one end called the junction, which is represented by the

solid dot on the right side of Figure 2.2.The junction is in thermal equilibrium with a

local environment at temperature Tj . The other ends of the thermocouple wires are

Page 30: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

16

attached to the terminals of a voltmeter. The voltmeter terminals are both in thermal

equilibrium with a local environment at temperature Tt.

Equation (2.6) is applied to the thermocouple circuit in Figure 2 by writing

( )dE T dTσ= (2.7) Thus, the EMF generated in material A between the junction at Tt and the junction at Tj is

, ( )A

Tj

A tj

Tt

E T dTσ= ∫ (2.8)

Applying Equation (2.8) to consecutive segments of the circuit gives

A B

Tj Tt

AB

Tt Tj

E dT dTσ σ= +∫ ∫ (2.9)

Where óA is the absolute Seebeck coefficient of material A and óB is the absolute

Seebeck coefficient of material B. The order of integration is specified by moving

continuously around the loop: from the terminal to the junction, and back to the

terminal.

Notice that the value of ABE in Equation (2.9) is due to integrals along the length

of the thermocouple elements. This leads to the following essential and often

misunderstood fact of thermocouple thermometry:

The EMF generated by the See beck effect is due to the

Temperature gradient along the wire. The EMF is not generated

At the junction between two dissimilar wires.

Figure-2.3: A simple thermocouple

Page 31: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

17

The EMF of the thermocouple exists because there is a temperature difference

between the junction at Tj and the open circuit measuring terminals at Tt. Switching

the order of the limits for the second integral in Equation (2.9) allows the following

manipulation

)(A B A B

Tj Tj Tj

AB

Tt Tt Tt

E dT dT dTσ σ σ σ−= − =∫ ∫ ∫ (2.10)

Now define the Seebeck coefficient for the material pair AB as

( )AB A Bσ σ σ−= (2.11) Substituting the definition of óAB into Equation (10) gives

Tj

AB AB

Tt

E dTσ= ∫ (2.12)

Equation (2.12) is the fundamental equation for the analysis of thermocouple

circuits. It is not yet in the form of a computational formula for data reduction. Before

a data reduction formula can be developed, however, the role of the reference junction

needs to be clarified given bellow,

Equation (2.12) shows how the EMF generated by a thermocouple depends on

the temperature difference between the Tj and Tt. All thermocouple circuits measure

one temperature relative to another. The only way to obtain the absolute1 temperature

of a junction is to arrange the thermocouple circuit so that it measures Tj relative to an

independently known temperature. The known temperature is referred to as the

reference temperature Tr. A second thermocouple junction, called the reference

junction, is located in an environment at Tr.

Page 32: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

18

Figure 2.3 shows a thermocouple circuit with a reference junction at temperature

Tr. At the reference junction, copper extension wires connect the voltmeter to the legs

of the thermocouple. The thermocouple wires are labeled P for positive and N for

negative. Beginning with the terminal block at temperature Tt, there are five junctions

around the circuit. Using x as a position indicator, the five labeled junctions are

numbered in order of increasing x. To find the EMF produced by the thermocouple

circuit in Figure 2.4, apply Equation (2.8) to each segment of wire in the circuit

15

TjTr Tr Tt

C P N C

Tt Tr Tj Tr

E dT dT dT dTσ σ σ σ= + + +∫ ∫ ∫ ∫ (2.13)

Figure-2.4: Physical circuit for thermocouple

Figure-2.5: Conceptual T(x) plot of thermocouple

Page 33: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

19

Where óC is the absolute See beck coefficient of copper, óP is the absolute See

beck coefficient of the material in the positive leg, and óN is the absolute See beck

coefficient of the material in the negative leg. Reversing the limits of integration for

the first term in Equation (2.13) gives

Tr Tt

C C

Tt Tr

dT dTσ σ= −∫ ∫ (2.14)

Therefore, the first and last terms in Equation (2.13) cancel. Furthermore, reversing

the limits of integration in the third term in Equation (2.13) and simplifying yields

15

Tj

PN

Tr

E dTσ= ∫ (2.15)

Where

óPN = óP − óN

The result in Equation (2.15) can be interpreted graphically with the lower

half of Figure 2.4. The EMF across the copper segments 1-2 and 4-5 cancel because

the EMF on these segments is of equal magnitude and opposite sign. Think of going

down in potential from 1 to 2, and up in potential from 4 to 5. The EMF across

segments 2-3 and 3-4 does not cancel, however, because the absolute Seebeck

coefficients for these two segments are not equal. Indeed, a thermocouple is only

possible when two dissimilar wires are joined so that

óPN = óP − óN The circuit in Figure 2.4 provides a practical means for measuring temperature

Tj relative to temperature Tr. To use this circuit an independent method of measuring

Tr is required, along with the value of óPN. The calibration tables and equations use

Equation (2.15) with a reference temperature of 0 Cο , which is easily obtainable with a

mixture of ice and water. The integral in Equation (2.15) is a formal statement of the

relationship between EMF on temperature. To develop a calibration for a particular

thermocouple type, the EMF is measured as Tj is varied and Tr is held fixed at 0 Cο .

Page 34: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

20

The result of the calibration is a table of EMF versus T values. The integral is never

directly evaluated. Instead a polynomial curve fit to the calibration data gives

20 0 1 2( )j j j j jE F T b b T b T bnT= = + + + +… (2.16)

In terms of the formalism of the preceding sections,

0

Tj

oj PNE dTσ= ∫ (2.17)

From the same calibration data a curve fit of the form

0 1 0( ) mj oj oj m jT G E c c E c E= = + + +… (2.18)

is also obtained. The F(Tj) and G(E0j) symbols provide convenient

shorthand notation for the two calibration polynomials. Equation (2.18) is directly

useful for temperature measurements with thermocouples. For the circuit in Figure 2,

with Tr = 0, Equation (2.18) allows a measured EMF to be converted to a temperature.

Figure 2.4 depicts a useful thermocouple circuit. The most straightforward

implementation of this circuit is to place the reference junctions (block labeled Tr) in

an ice bath. The resulting circuit is sketched in Figure 2.5. The two junctions can share

the same ice bath if they are electrically insulated from each other

For the thermocouple circuit in Figure 2.5, the standard calibration equations are

used directly. Applying Equation (2.12) to each segment of wire in the circuit gives

Figure-2.6: Cold junction compensation

Page 35: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

21

16

TjTb Tr Tb Tt

C P N p C

Tt Tb Tj Tr Tb

E dT dT dT dT dTσ σ σ σ σ= + + + +∫ ∫ ∫ ∫ ∫ (2.19)

The first and last integrals cancel, (Cf. Equation (2.14).) Rearranging the remaining terms gives

16

16

16

TjTb Tr

P p N

Tr Tb Tj

Tj Tj

P N

Tr TrTj

PN

Tr

E dT dT dT

E dT dT

E dT

σ σ σ

σ σ

σ

= + + +

= −

=

∫ ∫ ∫

∫ ∫

∫ (2.20)

Since Tr = 0 Cο (the standard reference temperature), Equations (2.17) and (2.18) may

be used directly for the thermocouple circuit in Figure 2.5. The equation (2.16) is the

voltage produced by thermocouple when reference junction is at 0 Cο

Now neglecting the square and higher order terms in equation (2.16) gives direct

linear relationship between junction temperature & produced emf.

0 0 1( )j j jE F T b b T= = + (2.21) Note that the nonlinearity increase with increase in temperature due to variation in

material coefficient.

2.1.2 SERVO MOTOR

Figure-2.7: A general block diagram for position control

The general transfer function of the motor [18]

Page 36: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

22

(1 )( ) ( )Ks sG s τ+= (2.22)

Calculatingτ : First we coupled our motor without gears with another motor and applied

voltage on it and measured the output voltages (generator action) as well as the

RPMs of the external motor. The following readings were obtained

Table-2.1:Reading for generator action

Applied Voltages (v)

Generated Voltages (v)

7 2.7 8.5 3.6 10 4.8 12 5.15

The corresponding graphs are shown on the next page in figure 2.8 and 2.9. Calculating the values of the feedback gain from the graph is taken as

/ sec 20rad∆ = 0.7v v∆ =

Since / secradvKb ∆

∆= (2.23)

/ sec/28.57rad vKb =

The forward gain will be 1

KbK = (2.24)

/ / sec0.035v radK =

Table-2.2: Applied and generated voltages. rad/sec Generated voltage

70 2.7 90 3.6 100 4.8 115 5.15

Page 37: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

23

Figure-2.8: Graph between generated voltage and applied voltage.

Figure-2.9: Graph between generated voltage and applied RPM

Page 38: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

24

The τ is the sum of electrical ( eτ ) plus mechanical ( mτ )

e mτ τ τ+= (2.25) But

m eτ τ>> Therefore neglecting eτ

mτ τ= Where

2.

( )R JomKb

τ τ= = (2.26)

Now calculating motor’s parameters

FL NLKo I IJ −= (2.27)

0.035

210 170oJ = −

0.875 / / sec/o v rad mAJ =

2.

( )R JoKb

τ = (2.28)

Where 70R = Ω 0.075secτ =

So the transfer function of the motor became

0.035(1 0.075 )( ) ( )s sG s += (2.29)

-

Page 39: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

25

2.2 MATHEMATICAL SIMULATION & ANALYSIS The mathematical simulation results for level, temperature and position are

shown and analyzed.

2.2.1 THERMOCOUPLE

Taking data from the standard thermocouple reference table, following graph has

been drawn for our required range [10].

The graph shows that thermocouple offers very high mark of linearity over a

long temperature range which makes it very applicable in industrial measurement for

high temperatures and in the rugged environment as well.

0 100 200 300 400 500 600 700 800 900 10000

10

20

30

40

50

60

Temprature (C)

Ther

moe

lect

ric V

olta

ge (m

V)

Figure-2.10: Graph for J-Type Thermocouple

Page 40: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

26

2.2.2 SERVO MOTOR The transfer function of the motor was came out to be

0.035(1 0.075 )( ) ( )s sG s += (2.30)

Applying unit impulse, the open loop response came out as

The graph shows that system is unstable in open loop as it is not being get

settled by achieving settle down back. The system can be made stable in close loop

configuration or applying suitable compensator like P, PI, PD, PID controllers.

0 20 40 60 80 100 120 140 1600

0.005

0.01

0.015

0.02

0.025

0.03

0.035Impulse Response

Time (sec)

Ampl

itude

Figure-2.11: Open loop impulse response

Page 41: FY project: Data aquisition
Page 42: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

28

INTRODUCTION

This chapter concentrates on the description of whole mechanical

assembly of our project. As we know that it is always remained a problem to measure

the physical quantity accurately and to solve this problem different techniques are

used to develop the mechanical models as friendly as possible so that operators and

engineers can measure and control the required parameters. Since after the selection of

suitable sensors and mathematical modeling for their parameters it was necessary to

implement the design by developing the precise mechanical model for the

measurement of selected parameters with accuracy. In this project three individual

models are developed that is level system, thermal system and servo controlled valve

mechanism which then finally assembled.

3.1 INDUSTRIAL PROTOTYPE

A working model created to demonstrate fundamental aspects of

industrial measurements without creating a detailed program. Adding details and

content incrementally to advancing stages of prototypes is one process for creating

successful applications. In this project a sample prototype of industrial measurements

is fabricated in advance of production to allow monitoring, controlling, demonstration,

evaluation, or testing of the physical parameters, which is a full-scale working model

of an original industrial measurements or an updated version of existing industries.

The project mechanical model is developed as accurately as possible to meet

the industrial standard prototype. It is not only developed for the project purpose but

can also be exercised in institute practical work of students for instrumentation and

control subjects. It will help in understanding the proper placement of different sensors

for different plants.

Page 43: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

29

3.2 LIQUID LEVEL SYSTEM

As level of liquid was first parameter to measure in our project so in

order to implement the proposal we have made a tank with the width ,height and

length all equal to one foot. According to the requirement we have set two limits that

is upper and lower limit. Upper limit was marked up to 260mm height and lower limit

up to 5mm.Since we have used water column based current transmitter to measure the

level which gives the output current on basis of pressure difference, so we attached

two nozzles that is one at ground level of tank and other at upper limit. When current

transmitter is connected to these two nozzles through pipes, a pressure difference is

created which fulfils the transmitter’s requirement.

The inlet of the tank is through the motor pump from the reservoir while the

outlet is attached with servo controlled valve mechanism so that the outlet flow is

controlled at ground level of tank as shown in figure 3-1.

Figure 3-1: Mechanical model for liquid level system with inlet pump motor.

The tank is placed at a

certain height of about 10

inches from the base

board in order to fulfill the

proper functioning of

current transmitter so that

it can take the proper

pressure for its lower limit

(zero limits).

Page 44: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

30

3.3 THERMAL SYSTEM Since we are measuring a high temperature range up to 600 oC using J-

type thermocouple sensor, so it was really very difficult to develop such high

temperature in the lab. To serve the purpose we have taken a solder iron of 500 watts

which could generate highest temperature of 1200 oC which was fulfilling our

requirement and best suited for the model as it reserves a very narrow space and could

easily be isolated for safety purpose. This solder iron is used as furnace which is

heated by electric utility of 220 volts AC. A voltage regulator is also used to control

the temperature of the furnace. For protection from such high temperature we

surrounded the furnace with thick wooden block with thin metallic sheets at inner side

of wooden block so that maximum temperature may absorbed by the sheets and block

remain safe as shown in figure 3-2.

Figure 3-2: Electric furnace surrounded by wooden block for safety and protection attached with the temperature controller. The controller is based upon SCR pulse firing technique

Page 45: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

31

3.4 SERVO CONTROLLED VALVE MECHANISM

The third parameter to be measured in the project was position of servo

controlled valve to control the outlet flow of the liquid tank as in addition to

measurement we also have introduced its controlling option in the project. For position

measurement and control we have developed the mechanism of a valve and attached it

with the outlet to liquid tank. This valve is coupled both with the geared dc motor and

the feedback pot meter in such a way that opening and closing of valve changes the

resistance. The valve takes five turns of rotation to completely open or close; therefore

the ten turn pot meter is used as a sensor, so when the whole valve is fully opened or

closed it utilizes its five turns which falls in the midrange of feedback sensor. The

servo controlled valve mechanism is shown in figure 3-3.

Figure 3-3: Servo controlled valve mechanism to control the outlet flow of liquid tank

Page 46: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

32

3.5 OVERALL MECHANICAL ASSEMBLY

As the mechanical model for each of three parameters being measured is

developed, so it was necessary to assemble them together. In order to serve the

purpose we have taken a wooden block and all individual models have assembled on it

using solid screws. Pictorial view of the whole mechanical assembly of our project is

below:

3.6 SUMMARY In this chapter we discussed the importance of mechanical assembly

from the industrial point of view and introduced the industrial prototype development

which follows the fabrication of individual mechanical models for the accurate

measurement of the selected physical parameters which are level system, thermal

system and servo controlled valve mechanism. To satisfy the rules of simplicity

finally all these models are assembled on a single wooden block.

Figure-3.4: Overall mechanical assembly

Page 47: FY project: Data aquisition
Page 48: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

34

INTRODUCTION

In general for measuring the effect of any physical quantity

like temperature, pressure, level etc we require some kind of device called a sensor.

Sensors are used in everyday objects such as touch-sensitive elevator buttons and

lamps which dim or brighten by touching the base. There are also innumerable

applications for sensors of which most people are never aware. Applications include

automobiles, machines, aerospace, medicine, industry, and robotics.

Signal conditioning is to process the form or mode of a

signal, taken from sensor usually but not always, so as to make it intelligible to or

compatible with a given device, such as a data acquisition card, dial indicator,

recorders etc.In our project we signal conditioned all quantities to give 0 to 5V so as

they could be interfaced with DAQ card and digital scanner.

4.1 SENSOR’S SELECTION For measuring one type of physical quantity a lot of sensors

are available in market so selection of a proper sensor for a particular quantity

becoming a specialized field. As we are measuring three most important and common

industrial parameters (liquid level, temperature and position) we divide their selection

in proceeding sections.

4.1.1 SENSOR FOR LIQUID LEVEL SYSTEM During selection of liquid level sensor there were several

options we had. First of all we thought about potentiometer based liquid level sensor

which is most common method of measuring liquid level at this stage. As we have told

that we were going to make this project an industrial prototype so we required some

industrial sensor. We decided to make the potentiometer base method as stand by and

started to search some suitable Sensor from industries. Variety of sensors was

available in industry working on different principles.

Page 49: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

35

By definition all transmitter gives current output in

contrast to the transducers which give voltage output. The use of transmitter (current

output) is exponentially increasing by replacing the transducers (voltage output).

We got level transmitter which was actually a difference

pressure water column level transmitter. It holds the following main advantages:

• It could measure up to 600 millimeter level which falls within our required range.

• It could be used both in 2-wire and 3-wire configuration

• It could be calibrate both for 0 to 20mA and 4 to 20mA.

4.1.2 SENSOR FOR THERMAL SYSTEM To meet the needs of an industrial prototype we decided to

measure temperature above 500oC. LM35 is common sensor for measuring

temperature but it is used only for non-contact measurements like ambient

temperature. We rejected the LM35 due to the reason that first it is a non-contact and

low temperature purposes second it gives about 5oC error at room temperature. So

different sensors were available for temperature measurement but we selected the

thermocouple due to following reasons:

• Capable of being used to directly measure temperatures up to 2600oC.

• The thermocouple junction may be grounded and brought into direct contact with

the material being measured.

• Thermocouples allow measurement of temperatures higher than that possible with

resistance devices (RTDs) like the platinum resistance thermometer. Their

operating range is far wider: compare -200 to 650°C for platinum probes with -200

to more than 2000 °C with refractory thermocouples.

• Thermocouples are inexpensive, rigid and easy to construct as compare to any

other temperature sensor.

Page 50: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

36

4.1.3 SENSOR FOR CONTROLLED VALVE MECHANISM Besides measuring the position of valve we are controlling

the position of liquid flow control valve as an application of position control. So for

measuring the valve position we required a sensor which generate electrical signal in

response to the varying position of valve. For this purpose we decided to use

potentiometer as feedback sensor. The total number of turns involved in opening and

closing of valve were five so we arranged a ten turn potentiometer as feedback sensor. Encoder could also be used as feedback sensor but it does not

give continuous output and also an expensive option so we rejected this option.

4.2 SIGNAL CONDITIONING We configure DAQ card for 0V to 5V range and developed

soft display for this range similarly we also designed digital scanner for this range. So

we wanted to make signal compatible with this range. For this purpose we had to

signal conditioned our all quantities.

4.2.1 SIGNAL CONDITIONING FOR LEVEL TRANSMITTER As we have already discussed that for level measurement we

used industrial level transmitter. It was a current output transmitter and we had to

convert this current into voltage. We used level transmitter in 3-wire configuration

with 0 to 20mA output. Before converting current into voltage we had to calibrate it

first as follow so we divide signal conditioning of level transmitter into two parts first

calibration and second signal conditioning. The detailed about calibration of level

transmitter is given in project manual for user in Appendix 10.D. Different reading obtained during calibration are given in

Table- 4.1 and its corresponding graph is given in Figure-4.1

Page 51: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

37

Tabel-4.1: Level Transmitter output table during Calibration

S # Tank Height (mm)

Transmitter output (mA)

1 0 0.2 2 27 1.99 3 54 4.01 4 81 6.2 5 108 7.98 6 135 10.07 7 162 12.1 8 189 13.99 9 216 16.3 10 243 17.89 11 270 19.79

Figure-4.1: Graph between transmitter output and height of level

Page 52: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

38

When transmitter was calibrated for full range we converted

this current to voltage for further processing. We placed a 250ohms burden load at

transmitter’s output which as to get voltage and then used an operational amplifier in

current-to-voltage configuration as shown in Figure-4.2. The detailed circuit of this

block diagram is shown next in Figure-4.3.

Figure-4.2: Block Diagram of Level Transmitter Signal Conditioning

Figure-4.3: Circuit Diagram of Level Transmitter Signal Conditioner

Page 53: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

39

4.2.2 SIGNAL CONDITIONING FOR THERMOCOUPLE The toughest job in our sensor’s signal conditioning

portion was thermocouple’s signal conditioning. The main problem in thermocouple

signal conditioning is its cold junction compensation and its nonlinearity at higher

temperature. To overcome these problems we used Analog Device’s an expensive

industrial signal conditioner AD594AQ which have built-in cold junction

compensation and nonlinearity adjustment. However there were small non-linearties

still in AD594’s output so we used positive feedback to remove this non-linearity. The

detail of signal conditioner’s adjustment with thermocouple voltage is given below.

Before going into detail it is necessary to remember that

AD594AQ is factory calibrated at 10mV/ oC. For measuring the atmosphere

temperature and furnace temperature we used RTD (pt-100) as reference sensor.

RTD’s measured resistance at different temperature and its corresponding table is

shown in Table-4.2 and respective graph in Figure-4.4.

Table-4.2: RTD's measured values # Temperature

oC Resistance

(ohms) 1. 0 100 2. 32 113 3. 212 180 4. 410 250

Figure-4.4: Graph between temperature and RTD Output

Page 54: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

40

Now we took thermocouple wires and connected to IC’s

input and check IC’s output voltage. It was showing that voltages which were when

converted to temperature was giving room temperature at that time is 32 oC. Same

times we measured RTD resistance that was also showing the same room temperature.

Now this time we put thermocouple in furnace and adjust the temperature at 400 oC

with the help of RTD as reference temperature sensor. Again we measured output

voltage of IC it was showing the same temperature that is 400 oC. Different readings

obtained during AD594’s calibration and their corresponding graph is shown in Table-

4.3 and Figure-4.5.

Table-4.3: AD594 output voltage with respect to temperature. S.No Temperature

oC AD594 output voltage

V 1. 0 0

2. 32 0.32

3. 212 2.13

4. 410 4.12

Figure-4.5: Graph between AD594 output voltage with respect to temperature

Page 55: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

41

The detail of the used reference temperature sensor,

selected signal conditioner and thermocouple output with corresponding tables and

graphs was given in above discussion. Now we can draw a simple block diagram of

the thermocouple signal conditioning as shown in Figure-4.6. Corresponding detailed

circuit diagram of the block diagram is given in Figure-4.7.

The LED shown in Circuit diagram of thermocouple signal

conditioner is for fault indication. The only possible fault in thermocouple is its

opening from hot junction because of excessive heat. Whenever thermocouple

becomes open or input supply exceeds its limit, this LED will blink.

Figure-4.6: Block Diagram of Thermocouple Signal Conditioning Output

Page 56: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

42

Figure-4.7: Circuit Diagram of Thermocouple Signal Conditioner

Page 57: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

43

4.2.3 SIGNAL CONDITIONING FOR FEEDBACK MECHNUSM We have already discussed that we are not only

measuring but also controlling the servo valve using potentiometer as feedback sensor

for measurement and PI controller for position control. The block diagram of the

controlling and measuring system is given as follow in Figure-4.8.

We used voltage source for excitation of potentiometer which

was giving our required linearity. However we could use current source which was a

difficult option but current source is always used where a high degree of linearity is

required.

After excitation of potentiometer following different readings

were taken during calibration shown in Table-4.4:

Where as the graph taken from above readings are shown in figure-4.9. The

graph shows that sensor’s output is quite linear and does not require linear zing it

Figure-4.8: Block Diagram of PI Controller for Controlled Valve

Page 58: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

44

further. It just requires further to buffer the signal before giving it to the data

acquisition card in order to avoid loading effects.

As shown in Table-4.4: that the sensor’s minimum output was

0.36V and maximum output was 2.8V but we wanted minimum signal 0V and

maximum, when valve is fully closed, 5V. So to get our required limits we have to

signal conditioned this sensor by inserting an operational amplifiers based network

which in turn gave us our required limits.

We designed PI controller for servo valve for controlling the flow

of liquid. The detailed circuit diagram of PI controller is given in Figure-4.10.

Page 59: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

45

<Doc>

<RevC

ode>

Motorised V

alve controlling Ckt.

A

11

Saturday, September 22, 2007

Title

SizeD

ocument N

umber

Rev

Date:

Sheetof

12

+ -

LM741

3 26

+ -

LM741

3 26

+ -

LM741

3 26

+ -

OP-07

3 26

+ -

OP-07

3 26

1k

1k

1k1k

1k

1k

1k

220 Ohm

1k

5K

1 3

2

1k

1 3

2

5k

13

2

10k

1k

1k

250k

13

2

BD243

32

1BD244

32

15K

1 3

2

+5 V

+Vss

-Vee

+5 V

REFERENCE

Servo Control Valve

0V TO 5V

(To Measuring

system)

Figure-4.10: Circuit Diagram of proportional controller for the servo controlled valve.

Page 60: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

46

4.3 SUMMARY This chapter was consisting of two main parts. One was the

selection of different sensors which were suitable for our required processes and

second was their signal conditioning in which we made sensors output compatible

with our required output.

In sensor’s selection we selected differential pressure level

transmitter for our liquid level system and we also discussed how this transmitter was

best suitable for our requirement. For temperature measurement we choose

thermocouple j-type and for feedback sensor in controlling the position of valve we

selected potentiometer.

In signal conditioning of all sensors we made all output signals

compatible with our required range that was 0V (for minimum) and 5V (for

maximum) using different techniques discussed in this chapter in detail.

Page 61: FY project: Data aquisition
Page 62: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

48

INTRODUCTION “A system that reports the value of a physical quantity in numerical

form one by one is called a digital scanner.”

When a measurement is made (such as in our project thermocouple,

level transmitter & a servo controlled valve) a numerical quantity is determined from a

physical quantity, at a specific time and location. It is important to define exactly what

is being measured: is it all three components of a vector, one component of a vector, a

magnitude, or a scalar? Also, are you measuring the instantaneous value (DC value),

or the range of variation (AC value) of the quantity? If AC is chosen, there are various

ways to measure this number (RMS, absolute average variation, peak-to-peak, peak

negative or peak positive). With AC, frequency range is also an important

consideration, as well as the averaging time. In our project we are measuring the

instantaneous value (DC value).

5.1 SCANNER IN INDUSTRY In industry, dependence on a single display is usually avoided. A

single quantity is displayed on 2 to 3 different displays. It is due to the reason that an

electronic error may occur in single display’s reading & if operator is dependent on a

single display it will be dangerous and even if process is full of hazards (like in

nuclear reactions or boiler’s temperature/pressure) then dependence on a single

display will be a fool.

So in our project we have used two displays. One is software based

(HMI) and second one is discussed here that is digital scanner. Digital scanner are also

getting importance due to the reason that a single display shows all the quantities and

need for multiple displays is vanished.

5.2 REQUIRED FEATURES

We wanted to design a digital scanner for displaying the three

industrial parameters (temperature, level & position) .A single display was to used to

show the three quantities which was to be done by using the time sharing /multiplexing

Page 63: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

49

technique. One quantity was to be displayed at a time and after set time next quantity

would appear and so on. After last quantity appearance cycle would be repeated. Set

time for appearance of quantities could be changed (increase or decrease) externally

by operator & scanning could be stopped by operator at appearance of any particular

quantity. Moreover operator could be jumped at any required parameter if he wanted.

5.3 AVAILABLE DESIGNING TECHNIQUES

There are different techniques available for designing digital scanner.

The adopted design depends on designer’s technical approach. But at system level

there were two possible solutions to achieve desired goal in our mind.

(I) Complete embedded system

(II) Partial embedded system

The detail of selected and rejected design is given following.

5.3.1 COMPLETE EMBEDDED SYSTEM An embedded system or complete embedded system is one in which

whole system is designed on a single chip which is usually a programmable chip like

microcontrollers and microprocessor based systems. Embedded systems are designed

for performing dedicated tasks and these systems work on the principles of digital

computers. All those functions, which are performed by different external components

in an un-embedded system, are performed on a single chip by using different

programming techniques.

For a complete embedded system based digital scanner beside other

basic requirements we required a programming device with following built-in

features:

• Require at least 10bit microcontroller system.

• Three analog input channels.

• Also 10bit ADCs built-in into the microcontroller

Still having all above features we had to perform scaling externally.

Page 64: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

50

5.3.2 PARTIAL EMBEDDED SYSTEM A partial embedded is one in which both embedded and un-embedded

features are merged. In this system designer divide his tasks into two groups, one

suitable for embedded system and other suitable for un-embedded system. It is not

necessary to perform all tasks on a single chip because some tasks can be performed

externally better and easier as compare to on a programmable chip. So if we design

scanner using partial embedded system we require following feature in programmable

chip.

• 8bit architecture like AT89s51 is enough.

• No analog input channel is required.

• No built-in ADC is required because analog-to-digital conversion is performed

outside controller.

5.4 SELECTED DESIGN Due to more flexibility in partial embedded system we choose this

one. Besides flexibility following are the main advantages of partial embedded

system.

• Awareness with technology. • All required components are available in market. • High accuracy/linearity in reading is easily achievable. • Trouble shooting is easy and economical.

The detail of implemented is given in following sub headings.

5.4.1 DESIGN IMPLEMENTATION As our required input channels were three so we implemented our

design using scaling, analog Mux, 7-segment decoder, millivolts measuring IC etc as

shown in block diagram of digital scanner.[ figure: 5.1].Circuit diagram of the same

system is given on next page in figure:5.2

Page 65: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

51

Figure -5.2: Circuit Diagram of Digital Scanner

Figure 5-1: Block diagram of digital scanner.

Page 66: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

52

Position

30pF

7447

7 1 2 6

4

53

13 12 11 10 9 15 14

D0 D1 D2 D3

BI/R

BO

RBI

LT

A B C D E F G

10k

CA31

62

1210 11

15 1613 12 8 9 6

5 4 3

2 1

2 0

LIN

HIN

2 2

2 3

GADJ

INTC

APZE

ROAD

JZE

ROAD

J

H/BP

LSD

MSD

NSD

0

HI

10k

0

Level

10uF

10k

Temprature

30pF

0

Hold

0

74HC

4052

12 14 15 11 1 5 2 4 610 9

13 3

167

X0 X1 X2 X3 Y0 Y1 Y2 Y3 ENA B

X Y

VDD

VEE

HI

0

8.2k

0

U1 AT89

C51

918192930

311 2 3 4 5 6 7 8

21 22 23 24 25 26 27 28 10 11 12 13 14 15 16 17

39 38 37 36 35 34 33 32

RST

XTAL

2XT

AL1

PSEN

ALE/

PROG

EA/V

PPP1.0

P1.1

P1.2

P1.3

P1.4

P1.5

P1.6

P1.7

P2.0

/A8

P2.1

/A9

P2.2

/A10

P2.3

/A11

P2.4

/A12

P2.5

/A13

P2.6

/A14

P2.7

/A15

P3.0

/RXD

P3.1

/TXD

P3.2

/INT0

P3.3

/INT1

P3.4

/T0

P3.5

/T1

P3.6

/WR

P3.7

/RD

P0.0

/AD0

P0.1

/AD1

P0.2

/AD2

P0.3

/AD3

P0.4

/AD4

P0.5

/AD5

P0.6

/AD6

P0.7

/AD7

10k

1.2v

0

0.1u

F

10k

HI

10k

Scaled Input

s

7447

7 1 2 6

4

53

13 12 11 10 9 15 14

D0 D1 D2 D3

BI/R

BO

RBILT

A B C D E F G

0.27

uF

HI

10k

HI

HI

10k

0

Figure 5-2: Circuit schematic of digital scanner

Page 67: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

53

5.4.2 DESCRIPTION OF SYSTEM BLOCK DIAGRAM The detail of system block diagram shown in figure-5.1 is given as

follow:

(I) Scaling As shown in block diagram that three quantities after signal

conditioning comes at scaling card’s input. The designed scanner is a versatile scanner

which can be used for any three parameters whose upper limit lies within the range of

three digits that is 999.So here the purpose of scaling is to adjust the upper limit of all

quantities individually. We adjusted the first channel for 260, second channel for 600

and third channel for 100 respectively for level (in mm), temperature (in oC) and

position (in %).

(II) Analog Multiplexer After scaling, three signals are given to the input of analog

multiplexer. Analog multiplexer gives one signal at output at a time after selecting

from three input signals according to the selection code given at selection pins. The

two selection pins of the analog multiplexer are controlled here by microcontroller.

(III) Digit Selector and BCD Converter Actually it is an analog-to-digital converter for 3 digit display. It

accepts one analog input and converts it into digital BCD code. It provide multiplexed

BCD output with three bits reserved for digit selection that is to what digit(MSB,NSB

or LSB) present BCD code belongs. This digit selection bit is used for activating the

particular transistor which further activates the relevant 7-segment.

More deeply the actual display circuit is a voltmeter which measure

000mv to 999mv linearly. As our sensor/transducer output is greater than one volt so

we used scaling to decrease voltage level by decreasing the gain of amplifier and set

the Maximum range of all physical quantities at display by adjusting gain of all

quantities.

Page 68: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

54

(IV) Microcontroller and Selection Panel As we have already discussed that the selection bits of the analog

multiplexer is controlled by a microcontroller so the switching speed is control here by

using an eight bit microcontroller AT89C51. When user interacts with selection panel,

Microcontroller does the following task.

• Display reading can be stopped at particular appearance by pressing STOP button.

• Display reading can be start (continue) from that stopped particular appearance by

pressing START button.

• Display can be reset by pressing RESET button. After pressing reset button display

will start from very first quantity whatever at any quantity it is.

• Sequence time can be increased by pressing INCREASE button.

• Similarly sequence time can be decreased by pressing DECREASE button.

• Operator can jumped at any position by first pressing STOP button and then

required quantity number as P.1, P.2 or P.3.

(V) Position Segment We used three 7-segment displays to show 3-digits however there is

also another 7-segment. Before clearing the presence of this segment one question

arises in mind. When different quantities appear at display, how will operator / viewer

will recognize that to which physical quantity this reading belongs?

The answer to above question is that the single 7-segment shows arithmetic

digit with changing sequence of physical quantities at display. This arithmetic digit

shows particular quantity as defined by the installer of hardware display. Here we set

this display to show the following digits for particular quantities.

• Appearance of 1 shows the level.

• Appearance of 2 shows the temperature

• Appearance of 3 shows the position

Page 69: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

55

5.5 PROGRAM FLOWCHART N Y Y Y N

Y N N

Y N Y Y N N

Figure-5.3: Controller Program flowchart.

Start

A= 0

P1=A

Dly +

Inc A

Dly1500ms

A=01

Dly -

A=03A=02

A=04

Intrpt(STP)

P.1

T-

P.2 P.3

T+

Strt

Strt=1

T+=1

T-=1

P.2 =1

P.1 =1

P.3 = 1

Reti

Page 70: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

56

5.6 POSSIBLE IMPROVEMENTS

Whatever perfect is a thing, there is always a need for changing and

improvements and present day scientific world is the result of these changing and

improvements. Those possible improvements which are possible in our designed

scanner are given below in detail.

5.6.1 Addition of New Input Channels We have designed this scanner for three channels according our

requirement. However the number of input channels can be increased up to user

requirement using the same technique. In industry hundreds of different parameters

are to be measured at a time. Another reason of using partial embedded was that in

complete embedded system we can not have a microcontroller with hundreds of

analog inputs so in complete embedded system we have to use multiplexing

externally.

In our selected design new input channels can be increased by just

replacing the analog multiplexer, with one which has user desired number of input

channels, and some changing in controller’s program.

5.6.2 INCREASING UPPER RANGE The display in our designed scanner is limited to three digits. In our

project the maximum upper range was 600 for temperature which lies in three

digits so we designed scanner with maximum of 999 upper ranges. However upper

range can be increased up to 999…N as per user requirement by adding new 7-

segments.Designer have modify the basic circuit of display for achieving this task.

5.6.3 ADDITION OF NEW FEATURES Besides available features new features can be added if necessary

.Actually we have added almost all required features for digital scanner. However

other features, which make it more users friendly, can be added, like indication of

Page 71: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

57

buzzer when any quantity exceeds its limit and LCD display can be used instead of

seven segment display.

By adding new features designer can convert this scanner into a data logging system.

5.7 SUMMARY

In this chapter we introduce the reader with digital scanner and

its importance in industry. After that we discussed about all available techniques for

designing a digital scanner. Meanwhile we discussed in detail about the selected

design including block diagram description. The advantages and disadvantages of both

complete and partial embedded system are discussed. The detailed description of

block diagram was also given.

In the end we discussed about the available features and possible

improvements in the designed scanner. Some possible improvements examples were

also discussed here.

Page 72: FY project: Data aquisition
Page 73: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

59

INTRODUCTION This chapter describes the NI USB-6008 multifunction DAQ card hardware

and software configuration using its setting techniques and driver software

respectively according to the project requirement and developed human machine

interface as a part of soft display. In addition a brief description of our self

indigenously developed data acquisition card is also discussed since it has already

been discussed that before getting national instruments hardware package we were

developed our own DAQ card.

6.1 PROJECT REQUIREMENT

Since in the project we have three physical parameters as liquid level, furnace

temperature and servo controlled valve position. After signal conditioning of all these

parameters we have 0-5 volts which has to be fed up into the DAQ card. Therefore it

must have at least three analog inputs for all three parameters to be displayed. In

indigenously developed DAQ card we have three analog input channels as per project

requirement. But after getting the NI USB-6008 DAQ card we have added also the

control features in our project. Therefore to control the valve position we require at

least one analog output for the desired reference position and one digital output to

actuate the water pump in order to maintain the required liquid level in the tank. So it

can be summarized that DAQ card must have following minimum features as our

project requirements.

• Three Analog Inputs channels.

• One Digital Output Channel.

• One Analog Output Channel.

Page 74: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

60

6.2 INDEGENOUSLY DEVELOPED DAQ CARD

Data acquisition card is responsible for taking input signals, process it, and

make compatible for PC for analysis, database and display (user interface). Self

designed data acquisition card has three analog input channels and serially

communicated with the PC through com port at a rate of 9600 bps. This card has 8-bit

resolution ADC to convert data into digital signals. The card block diagram is shown

in figure 6-1.

6.2.1 MUXING Analog mux is used at the first stage for selecting a single quantity out of three

parameters at a time and switching them frequently. Since all of the parameters are

slowly varying so switching speed is not a problem. In the circuit design we have

used dual four channel analog mux so that this card can be extended up to four

channels with just a single connection and simple addition of command in the

controller program.

Level Temp: Position

Analog

Mux ADC

Micro Controller

Serial Interface To

Computer

Select Logic

Figure-6.1: The block diagram of indigenously developed DAQ card. The parameter to be processed and displayed will be selected by the controller from select logic.

Page 75: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

61

6.2.2 ANALOG TO DIGITAL CONVERSION The single output from mux is fed up to 8-bit ADC. The resolution is restricted

due to microcontroller. We used here a successive approximation fast ADC having

conversion rate of just 100 micro seconds which is high enough for the selected

parameters. All the control signals of ADC are controlled by the microcontroller.

6.2.3 MICROCONTROLLER The microcontroller is responsible for three matters. First selecting the desired

channel of the mux by giving logics to its select pins. Secondly to control the ADC

and receive data from it and third to transmit data serially to the computer by giving

the signal of selected channel as well.

6.2.4 SERIAL INTERFACING The controller transmits and receives signal through its UART, since we have

used RS-232 standard serial communication for which it requires a line driver in order

to make compatible the controller signals with RS-232 standard. The transmission is

configured at a baud rate of 9600 bits per second. The handshaking signals of com

port (DB-9) are not utilized because the selected microcontroller does not supports it.

Page 76: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

62

HI

0

ADC0

804

6 7 9

1112131415161718

19 204

512 3

+IN

-IN VREF

/2

DB7

DB6

DB5

DB4

DB3

DB2

DB1

DB0

CLKR

VCC/

VREF

CLKI

N

INTR

CSRD WR

0

MAX2

33

14 12 17

5 18

4 19 8 13 11 15 162 1

3 20

10

V+ V- V-

T1OU

TT2

OUT

R1IN

R2IN

C1+

C1-

C2+

C2+

C2-

T1IN

T2IN

R1OU

TR2

OUT

C2-

30pF

150p

F

11.0

592

Posi

tion

0DB

9

594837261

0

8.2k

HI

AT89

C51

918192930

311 2 3 4 5 6 7 8

21 22 23 24 25 26 27 28 10 11 12 13 14 15 16 17

39 38 37 36 35 34 33 32

RST

XTAL

2XT

AL1

PSEN

ALE/

PROG

EA/V

PP

P1.0

P1.1

P1.2

P1.3

P1.4

P1.5

P1.6

P1.7

P2.0

/A8

P2.1

/A9

P2.2

/A10

P2.3

/A11

P2.4

/A12

P2.5

/A13

P2.6

/A14

P2.7

/A15

P3.0

/RXD

P3.1

/TXD

P3.2

/INT0

P3.3

/INT1

P3.4

/T0

P3.5

/T1

P3.6

/WR

P3.7

/RD

P0.0

/AD0

P0.1

/AD1

P0.2

/AD2

P0.3

/AD3

P0.4

/AD4

P0.5

/AD5

P0.6

/AD6

P0.7

/AD7

Tempra

ture

4052

12 14 15 11 1 5 2 4 610 9

13 3

167

X0 X1 X2 X3 Y0 Y1 Y2 Y3 ENA B

X Y

VDD

VEE

10uF

0

Leve

l

HI

30pF

10k

Figure 6-2: Circuit schematic of indigenously developed data acquisition card.

Page 77: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

63

6.3 NI USB-6008 MULTIFUNCTION DAQ CARD

The card was import so that a complete virtual instrumentation system can be

developed by using modular hardware and customizable application software. Before

selecting the DAQ card it was obligatory that it must fulfill the project requirement as

described earlier in detail but also it should be low cost, easy configurable and the

most of important that was in our mind that it must be capable to be used in different

labs of the institute like control, instrumentation, PLC and electronics lab so that

students may adequate of virtual instrumentation by using embedded multifunction

data acquisition card and can perform their course practical.

Therefore we have selected the NI USB-6008 multifunction data acquisition

card as it offers all the features that we required but also included the complete student

kit so that a virtual instrumentation system may be developed within minutes as it

includes a free LabVIEW student edition as well.

6.3.1 FEATURES • Small and portable

• 12 or 14-bit input resolution, at up to 48 kS/s

• Built-in, removable connectors for easier and more cost-effective

connectivity

• 2 true DAC analog outputs for accurate output signals

• 12 digital I/O lines (TTL/LVTTL/CMOS)

• 32-bit event counter

• Student kits available

• OEM versions available

ANALOG INPUTS

• Number of channels.......8 single-ended/4 differential

• Type of ADC... Successive approximation

• ADC and DAC resolution .......12 bits

Page 78: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

64

ANALOG OUTPUTS

• Number of channels........... 2

• Maximum update rate150 Hz, software-timed

DIGITAL I/O

• Number of channels..................12

• Direction control: Each channel individually programmable as input or

output

32 BIT COUNTER BUS TYPE: USB PLUG N PLAY CONNECTIVITY

This card is based upon the same techniques as we utilized in the self

developed DAQ card. It multiplexes all the input channels at a maximum sampling

rate of 10KS/s. The complete block diagram of the card is shown in figure 6-4.

Figure 6-3: NI USB-6008 multifunction DAQ card. The complete description can be taken from appendix 10-A.

Page 79: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

65

6.3.2 HARDWARE SETUP Install combicon screw terminal blocks by inserting them into the combicon

jacks. Then apply the signal labels to the screw terminal blocks for easy signal

identification and connect the wiring to the appropriate screw terminals. Now device is

ready just plugging USB cable with both the PC and device. All these steps cab simply

be followed as shown in figure 6-5.

Figure 6-4: The block diagram of NI SUB-6008 multifunction DAQ card

Page 80: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

66

6.4 GETTING STARTED STEPS

There are certain steps which have to be followed before using the device in

order for proper configuration and functioning. The followed steps describe how to

install and configure the NI-DAQmx (driver software for NI USB-6008) and USB

data acquisition device and how to verify the device is working properly.

Step 1. Install the Application Software Install you NI application software that is LabVIEW 8.2.1, shipped with the

kit. If you have an existing application written with an earlier version, make a backup

copy of the application. You then can upgrade your software and modify the

application.

Figure 6-5: Setting up hardware. Complete description can be taken from manual in appendix 10-A.

Page 81: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

67

Step 2. Install NI DAQmx Software This software must be installed before connecting the device with computer so

that the system can detect and install the device whenever it is plugged with the PC

Step 3. Set Up the Device Set up the device as described under the heading of hardware set up and follow

those steps. Treat the DAQ device as you would any static sensitive device. Always

properly ground yourself and the equipment when handling the DAQ device or

connecting to it.

6.5 DEVICE RECOGNITION

Before attaching the signal lines first we have

to check either the system has recognized the

device or not. For the purpose open

measurement and automation (max) software

and expand devices and interfaces and further

expand NI DAQ-devices. Check that your

device appears under devices and interfaces as

shown in figure 6-6.

Highlight your recognized device right

click it and select self test as shown in figure

6-7.

When the self test finishes a message

indicates successful verification or if an error

occurred.

Figure 6-6: Device recognition tree in max.

Page 82: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

68

6.5.1 ATTACH SENSORS/SIGNAL LINES

Attach sensors and signal lines to the terminal block as described in the figure

6-8. For signal lines and sensor information, refer to manual in appendix 10-A. DAQ

assistant is accessible from MAX or LabVIEW to configure virtual channels and

measurement tasks. We will use and configure it in LabVIEW in the next chapter as a

part of G-Programming.

Figure 6-7: Device self test. A success message will be displayed if device pass the self test as shown.

Page 83: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

69

6.6 SUMMARY In this chapter we discussed the national instruments USB data acquisition

device selection criteria in detail according to the project requirements and future

enhancements and described in detail that how a USB DAQ device is configured for

proper operation by mentioning different steps of hardware setting, device recognition,

and self test and how sensors/signal lines are attached with the device. Then provided

complete features of selected NI USB-6008 multifunction DAQ card. In addition the

self indigenously data acquisition card was also discussed briefly giving its designing

techniques.

Figure 6-8: Attaching sensors/signal lines with the device to the selected channels and setting up timing and triggering from software.

Page 84: FY project: Data aquisition
Page 85: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

71

INTRODUCTION

Human machine interface is the aggregate of means by which peoples (the

user) interact with a particular machine, device, computer program, or other complex

tool (systems). The interface provides means of

• Inputs: Allowing the users to manipulate a system

• Outputs: Allowing the system to produce the effects of the users' manipulation.

To work with a system, the users need to be able to control the system and

assess the state of the system. User interfaces has great significance in the industrial

instrumentation and automation. All the parameters which have to be measured are

displayed on the computer based interfaces in the control rooms in every modern

industry which refers to the graphical, textual and auditory information the program

presents to the user, and the control sequences (such as keystrokes with the computer

keyboard, movements of the computer mouse, and selections with the touch screen)

the user employs to control the program, provided articulated graphical output on the

computer monitor. There are at least two different principles widely used in GUI

design: Object-oriented user interfaces and application oriented interfaces.

Under the hood, there are several software components that work together to

do the job like visual basic, C/C++, matlab etc. We have developed our project HMI

on the industry standard LabVIEW. This chapter deals with the programming

environment, advantages and applications of LabVIEW and provides comprehensive

sketch of the developed HMI.

7.1 LabVIEW

The National Instruments LabVIEW graphical development environment helps

create flexible and scalable design, control, and test applications. With LabVIEW,

engineers and scientists can interface with real-world signals; analyze data for

meaningful information; and share results through intuitive displays, reports, and the

Web.

Page 86: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

72

Short for Laboratory Virtual Instrumentation Engineering Workbench is a

platform and development environment for a visual programming language from

National Instruments. The graphical language is named "G". Originally released for

the Apple Macintosh in 1986, LabVIEW is commonly used for data acquisition,

instrument control, embedded design and industrial automation on a variety of

platforms

7.1.1 DATAFLOW PROGRAMMING

The programming language used in LabVIEW, called "G", is a dataflow

language. Execution is determined by the structure of a graphical block diagram (the

LV-source code) on which the programmer connects different function-nodes by

drawing wires. These wires propagate variables and any node can execute as soon as

all its input data become available. Since this might be the case for multiple nodes

simultaneously, G is inherently capable of parallel execution. Multi-processing and

multi- threading hardware is automatically exploited by the built-in scheduler, which

multiplexes multiple OS threads over the nodes ready for execution.

Figure 7-1: Screenshot of a simple LabVIEW program [Courtesy of NI website]

Page 87: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

73

Screenshot of a simple LabVIEW program in figure 7-1 that generates,

synthesizes, analyzes and displays waveforms, showing the block diagram and front

panel. Each symbol on the block diagram represents a LabVIEW subroutine (subVI)

which can be another LabVIEW program or a LV library function [13].

7.1.2 GRAPHICAL PROGRAMMING LabVIEW ties the creation of user interfaces (called front panels) into the

development cycle. LabVIEW programs/subroutines are called virtual instruments

(VIs). Each VI has three components: a block diagram, a front panel and a connector

pane. The latter may represent the VI as a subVI in block diagrams of calling VIs.

Controls and indicators on the front panel allow an operator to input data into or

extract data from a running virtual instrument. However, the front panel can also serve

as a programmatic interface. Thus a virtual instrument can either be run as a program,

with the front panel serving as a user interface, or, when dropped as a node onto the

block diagram, the front panel defines the inputs and outputs for the given node

through the connector pane. This implies each VI can be easily tested before being

embedded as a subroutine into a larger program.

The graphical approach also allows non-programmers to build programs by

simply dragging and dropping virtual representations of the lab equipment with which

they are already familiar. The LabVIEW programming environment, with the included

examples and the documentation, makes it simpler to create small applications. This is

a benefit on one side but there is also a certain danger of underestimating the expertise

needed for good quality "G" programming. For complex algorithms or large –scale

code it is important that the programmer possess an extensive knowledge of the

special LabVIEW syntax and the topology of its memory management. The most

advanced LabVIEW development systems offer the possibility of building stand -

alone applications. Furthermore, it is possible to create distributed applications which

communicate by a client/server scheme, and thus is easier to implement due to the

inherently parallel nature of G-code.

Page 88: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

74

7.1.3 ADVANTAGES

One benefit of LabVIEW over other development environments is the

extensive support for accessing instrumentation hardware. Drivers and abstraction

layers for many different types of instruments and buses are included or are available

for inclusion. These present themselves as graphical nodes. The abstraction layers

offer standard software interfaces to communicate with hardware devices. The

provided driver interfaces save program development time.

Peoples with limited coding experience can write programs and deploy test

solutions in a reduced time frame when compared to more conventional or competing

systems. Many libraries with a large number of functions for data acquisition, signal

generation, mathematics, statistics, signal conditioning, analysis, etc., along with

numerous graphical interface elements are provided

A main benefit of the LabVIEW environment is the platform independent

nature of the G code, which is portable between the different LabVIEW systems for

different operating systems (Windows, MacOSX and Linux).

7.2 DATA ACQUISITION TASKS In NI-DAQmx and LabVIEW, a task is a collection of one or more channels,

timing, triggering, and other properties that apply to the task itself. Conceptually, a

task represents a measurement or generation you want to perform. For example, you

can create a task to measure temperature from one or more channels on a DAQ device.

Traditional NI-DAQSpecific VIs for performing:• Analog Input• Analog Output• Digital I/O• Counter operations

NI-DAQmxNext generation driver: • VIs for performing a

task• One set of VIs for all

measurement types

Figure 7-2: Data acquisition task in LabVIEW [courtesy NI website]

Page 89: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

75

The main advantage of data acquisition task in LabVIEW is that just a single

set of VIs used to perform analog I/O, digital I/O, and counter operations where as

other application software requires different platforms for each operation.

According to the project requirement we have to develop a task which should

be the combination of three analog inputs for displaying all parameters, one analog

output to control the servo valve position and a digital output to actuate the water

pump at desired level.

1. Select the DAQ Assistant Express VI, shown in figure 7-3, on the Input

palette and place it on the block diagram. The DAQ Assistant launches and a Create

New dialog box appears.

2. Click the Analog Input button to display the Analog Input options.

3. Select Voltage to create a new voltage analog input task.

The dialog box displays a list of channels available on DAQ device installed.

The number of channels listed depends on the number of channels you have on

the DAQ device. Here it will show eight channels for NI USB-6008.

4. In the My Physical Channels list box, select three physical channels to

which the signals are connected, as ai0 for valve position, ai1 for liquid level, ai2 for

furnace temperature, and then click the Finish button. The DAQ Assistant opens a new

DAQ assistant express VI is used in G-

programming to develop the DAQ task. It

interacts with the device through NI DAQmx. It

quickly and easily programs the DAQ device by

creating a local task. Most of the application can

use this express VI. As it is placed in the block

diagram from palate it will automatically pop up

the configuration window. Now just follow these

simple steps to develop the required task

Figure 7-3: DAQ assistant express VI

Page 90: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

76

window, shown in Figure 7-4, which displays options for configuring the channel you

selected to complete a task.

5. In this configuration window select the input range of the signal from -10v

to +10v; rename the selected channels, set the terminal configuration as single ended.

In the timing section provide the acquisition mode as continuous samples ant fed 1K

samples to read. Here we can select maximum 10K samples to read as supported by

our device.

Figure 7-4: DAQ device physical channels configuration window

Page 91: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

77

Now this DAQ assistant express VI has been configured for the analog inputs.

Place two more express VIs for analog and digital output respectively in the task.

Repeat same procedure as discussed for configuration.

7.3 DEVELOPED HMI (THE FRONT PANEL) In the front panel different virtual instruments are developed for visual as well

as numeric displays, for controlling parameters and giving diverse indications as well.

The meter gauge, liquid tank and the thermometer are placed for displaying

visually, the servo valve position, height of liquid in the tank and furnace temperature

respectively and all are calibrated according to the original mechanical model and real

conditions. In addition to all these graphical VIs the numeric displays for all the three

parameters in the units of closing percentage, millimeters and Celsius are also shown.

Different indicators are placed which will alert the upper and lower limits of level and

temperature.

For controlling purpose a knob is positioned to feed up the reference position

for servo controlled valve. An indicator for the water pump on/off status is sited also

while the status is controlled by the upper and lower limits automatically through

programming.

There is an additional feature for database storage is developed on the front

panel. This will store all the readings with respect to time in a file in the document

format whenever and until the user wants to store the data in order to keep the record

or taking printouts and graphs.

A complete snap of the front panel is shown in figure 7-5 below where all the

VIs placed can be viewed.

Page 92: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

78

7.4 BLOCK DIAGRAM PROGRAMMING The graphical G-programming of LabVIEW was already discussed. The block

diagrams of the programming are shown on the next page in figure 7-6 which is

composed of different express VIs as listed under with their function description.

1. Split Signal Express VI:

This express VI is used to split the different signals which are routed on

the same line. Since DAQ assistant express VI yields only one output

therefore it is required to split all the three signals for individual

process and analysis.

2. Scaling and Mapping Express VI:

Figure 7-5: The front panel of developed HMI on LabVIEW.

Page 93: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

79

It is used to calibrate the acquired signal according to the real word.

3. Mathematical Comparison Express VI:

Used for comparing scaled signals with the preset values in order for

indicating different status and taking decisions for the controlling

operations.

4. Write Measurement File Express VI:

It is used for making database of the acquired information in different

formats with many options.

5. Display Message to User Express VI:

This express VI is used to display the messages to the user during run time

under different conditions as programmed like if user wants to open the valve more

than 100% then it will automatically pop up the massage of invalid range.

Besides these express VIs different Boolean and mathematical operations are

utilized for manipulating and process the acquired signal and information as shown in

figure 7-6 which gives a complete look of block diagram programming. Here it can be

seen that all the express VIs and operations are placed within a loop named as while

loop.

This loop is always placed before starting the program and all the express VIs and sub

pallets are placed within this loop to ensure the continuous operation otherwise either

it will stop immediately or will not execute.

Page 94: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

80

7.5 SUMMARY In this chapter first we described about the industry standard instrumentation

software the LabVIEW and introduce its programming environment, discussed its

applications and advantages over other programming languages. Then a complete

scheme for configuring the data acquisition devices within LabVIEW was provided

and created the local task to meet the project requirement using DAQ assistant express

VI after which we acquired all the signals for further process, analysis and

manipulation.

The developed HMI is then discussed including its front panel and block

diagram programming in detail, giving description of all the express VIs and

Figure 7-6: Block diagram programming of developed HMI using LabVIEW G-programming environment.

Page 95: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

81

operations used in its programming and the VIs that were customized in the front

panel. All the features of HMI were provided.

Page 96: FY project: Data aquisition
Page 97: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

82

Our project began in July 2007 and at that time we did not even know

where to start from! What kind of resources and effort are required to accomplish such

tasks! But we took it as a challenge and from the day one we went through rigorous

research and analysis, encountering a totally new and confusing problem at every step

but by the grace of Allah we did not stop at any point and solved every problem on our

own.

Therefore, today we have achieved in this short span of six months what

most people around us in this field have achieved in years. And we are proud of our

effort.

As explained earlier our task was to develop DAQ card and its HMI. To

simulate this project practically we also require some input parameters so development

of transducer to measure different physical parameters also become a part of our task.

So we selected temperature, level and position as our physical parameters. We made

different calculations to find out our required sensors and their signal conditioners and

electronic devices for DAQ card. The details about these requirements are given in

previous chapters.

.WHAT WE ACHIEVED IN THIS PROJECT

Indigenously development of transducers which gave us knowledge of internal

working of industrial transducers. We developed J-type thermocouple of industrial

standard which gave us knowledge that how industrial thermocouples are

manufactured and what are the key points about which we have to care during

thermocouple calibration for required output temperature reading. Our designed level

transducer was not of industrial standard because cost was also our primary concerned

but this designed transducer can replace industrial transducer for short time as it has

no impact of high temperature and pressure environment. But finally we succeed in

getting the industrial water column level transmitter which also provide us the hands

on experience of calibrating and implementing the industrial transducers. Servo

Page 98: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

83

motors are widely used in the industry for lot of processes for position control. It has

complex function but during our project we learned it thoroughly.

Future of the industrial monitoring is the virtual instrumentation, the

combination of customizable software (LabVIEW) and modular hardware (NI USB-

6008), is the most powerful tool for data acquisition and virtual instrumentation as it

provides most user friendly environment, cost effective and quick to use. During the

configuration of DAQ card and development of HMI on the LabVIEW we have faced

a lot of problems; the main was unavailability of both the hardware, software and the

peoples who worked on it. Till now it used rarely in our industries but during

development of HMI we learned a lot about LabVIEW which will consequently help

us in the future market.

ENHANCEMENTS

There is common saying “nothing is permanent except change.”

Therefore there are always the possibilities of improvements and enhancements in

the previous design according to the current requirement and available resources and

technology.

We have made lot of efforts in designing our project in order to meet the peak but

there are enhancements which can be carried out in the future.

• This project can be converted into wireless communication based monitoring

system.

• This project can be enhanced for the hundreds of inputs by using data

networking communication protocols like Modbus, Ethernet etc.

• Since our primary concern was the monitoring of parameters but we not only

performed the instrumentation but also designed the control actions for

position and pump control. But the DAQ has many vacant analog and digital

IOs. These IOs can be employed by extending the mechanical assembly for

Page 99: FY project: Data aquisition

Multiplexed Industrial Data Acquisition System (MIDAS)

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

84

more process parameters and control actions and modifying a little in the

software.

Page 100: FY project: Data aquisition
Page 101: FY project: Data aquisition

86

REFFERENCES [1] Application note NO: 369 for thermocouple signal conditioning, www.analog.com

[2] Basic concept about designing of hardware display, http://www.electronics-

lab.com/projects/test/014/

[3] Components data sheet, http://www.datasheetarchive.com

[4] Distributed control system, http://www.answers.com/topic/distributed-control-

system?cat=technology

[5] Floyd, Electronic Devices 6th Edition, Pearson Education, 2003

[6] Francis H Raven , Automatic Control engineering, McGraw-Hill, 1994

[7] HMI tutorials, http://www.iec.org/online/tutorials/hmi/

[8] Human Machine Interface, www.wikipedia.com./wiki/hmi

[9] Industrial Text and Video Co., Electrical relay and Diagram Symbols

Instrumentation Symbols and Identifications, www.industrialtext.com

[10] ITS-90 Table for J-Type Thermocouple, ISE Incorporation http://iseinc.com

[11] James W. Dally, Instrumentation for Engineering Measurement 2nd Edition, John

Wiley & Sons Incorporation, 1993, p-110,124

[12] LabVIEW, www.wikipedia.com/wiki/labview

[13] LabVIEW developer zone, www.ni.com/labview

[14] Mohammad Ali Mazidi and Janice Gillispie Mazidi, The 8051 Microcontrollers

and Embedded systems 8th Edition, Pearson Education, 2004,

[15] Omega Engineering Technical Refference, Introduction to level Measurment,

http://www.omega.com/toc_asp/sectionSC.asp?section=K&book=green&flag=1, 2006

[16] Ramakant A. Gaykwad, op-amps and Linear Integrated Circuits 3rd Edition,

Prentice hall International, 1993

[17] Reference table of all types of thermocouples, http://instrumentation-

central.com/pages/thermocouple_reference_table.htm

[18] Richard C. Dorf and Robert H. Bishop, Modern Control Systems 7th Edition,

Addison Wesley

[19] Robert T. Paynter, Introductory Electronic Devices and Circuits 4th Edition,

Prentice hall Inc, 1989

[20] Scott Mackenzie, the 89c51 Microcontroller 2nd & Upgrade Edition

Page 102: FY project: Data aquisition

87

[21] Servo motors, http://www.epanorama.net/links/motorcontrol.html

[22] Thermocouple modeling, web.cecs.pdx.edu/~gerry/epub/pdf/thermocouple.pdf

[23] Group Discussion, www.groups.yahoo.com

[24] Instrumentation, http://en.wikipedia.org/wiki/Instrumentation

[25] Virtual Instrumentation, http://en.wikipedia.org/wiki/Virtual_instrumentation

[26] Virtual & Traditional Instruments, http://zone.ni.com/devzone/cda/tut/p/id/4757

[27] Glossary, www.tdt.com/WebHelp/OX_FlashHelp/UserGuide/TipsTricks/Glossary.htm

[28] Future of virtual instrumentation, http://www.scientific-

omputing.com/scwmayjun04james_truchard.html

[29] Virtual Instruments in Engineering process

http://zone.ni.com/devzone/cda/tut/p/id/4752

[30] Modern vs. Traditional Instrumentetation

http://zone.ni.com/devzone/cda/tut/p/id/4757

[31] http://zone.ni.com/devzone/cda/tut/p/id/2964

[32] LabVIEW, http://www.ni.com/labview/whatis/

Page 103: FY project: Data aquisition
Page 104: FY project: Data aquisition

APPENDIX-B ASSEMBLEY CODE FOR 89S51 FOR DIGITAL SCANNER

; START PROGRAM ORG 00H LJMP MAIN

;**************************** ; INTERRUPT 1 STARTS ORG 0013H

CHK_STRT: JB P2.0,CHK_INCR CALL DELAY_12MS JB P2.0,CHK_INCR RETI

;**************************** ; MAIN PROGRAM STARTS ORG 30H

MAIN: MOV R5,#3 MOV P2,#0FFH MOV IE,#10000100B

AGAIN_01: MOV A,#01H

AGAIN: MOV P1,A CALL DELAY INC A CJNE A,#04H,AGAIN JMP AGAIN_01

;***************************** ; SUBROUTINE FOR INCRESING SCANNING TIME CHK_INCR: JB P2.1,CHK_DECR CALL DELAY_12MS JB P2.1,CHK_DECR INC R5 JNB P2.1,$ JMP CHK_STRT

;****************************** ; SUBROUTINE FOR DECRESING SCANNING TIME CHK_DECR:

JB P2.2,POS_1 CALL DELAY_12MS JB P2.2,POS_1 DEC R5 CJNE R5,#1,CONT_DEC MOV R5,#2

CONT_DEC: JNB P2.2,$ JMP CHK_STRT

Page 105: FY project: Data aquisition

;************************** ; SUBROUTINE FOR JUMPING AT POSITION 1 POS_1:

JB P2.3,POS_2 CALL DELAY_12MS JB P2.3,POS_2 MOV A,#01H MOV P1,A JMP CHK_STRT

;************************** ; SUBROUTINE FOR JUMPING AT POSITION 2 POS_2:

JB P2.4,POS_3 CALL DELAY_12MS JB P2.4,POS_3 MOV A,#02H MOV P1,A JMP CHK_STRT

;************************** ; SUBROUTINE FOR JUMPING AT POSITION 3 POS_3:

JB P2.5,CHK_STRT CALL DELAY_12MS JB P2.5,CHK_STRT MOV A,#03H MOV P1,A JMP CHK_STRT

;************************** ; DELAY SUBROUTINE FOR SCANNING INC/DEC DELAY:

MOV 31H,R5 Z: MOV R4,#5 Y: MOV R3,#200 X: MOV R2, #250 DJNZ R2 , $ DJNZ R3 , X DJNZ R4, Y DJNZ 31H , Z

RET;************************ ; DELAY SUBROUTINE FOR MINIMIZING PUSH BUTTON BOUNCING DELAY_12MS:

MOV R1,#25 T: MOV R0,#250

DJNZ R0,$ DJNZ R1,T

RET END

Page 106: FY project: Data aquisition

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

APPENDIX-D: PROJECT MANUAL

MIDAS Multiplexed Industrial Data Acquisition System

I. SIGNAL CONDITIONING AND CONTROLLING CARD FOR SERVO VALVE

INSTRUCTIONS

1) Only 0V to 5V should be given to reference for min. and max. Position of

valve.

2) Adjust lower limit that is 0V output by varying Pot.1.

3) Adjust upper limit that is 5V output by varying Pot.2.

4) Adjust proportional gain by varying Pot.3.

NOTES:

The above card not only used to measure position but also used for

controlling the position of valve.

Page 107: FY project: Data aquisition

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

II. LEVEL TRANSMITTER AND TEMPERATURE SIGNAL CODITIONING CARD

INSTRUCTIONS:

1) Pot.1 is used for adjusting load impedance for current out put transmitters.

2) Pot.2 is used for adjusting the gain of signal conditioned output of

thermocouple.

3) Pot 3. is used as positive feedback gain for decreasing the non-linearity errors.

4) Pot 4. is used for adjusting the negative feedback gain during removing non-

linearity in thermocouple voltage.

5) Pot.5 is used for adjusting the ambient temperature. First short the

thermocouple input and then adjust the ambient temperature.

6) Whenever thermocouple becomes open or power supply becomes higher than

recommended then RED LED shown will automatically blinks.

Page 108: FY project: Data aquisition

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

III. SCALING FOR DIGITAL SCANNER

INSTRUCTIONS:

1) Pot.1 is used for adjusting the upper limit of first quantity which is Level here.

2) Pot.2 is used for adjusting the upper limit of second quantity which is

temperature here.

3) Pot.3 is used for adjusting the upper limit of third quantity which is Position of

servo controlled valve here.

NOTE:

You can use any three quantities whose upper range falls within 999.

Page 109: FY project: Data aquisition

__________________________________________________________________ PCSIR - Institute of Industrial Electronics Engineering, IIEE ST-22/C, Block-6 Gulshan-e-Iqbal, Karachi – 75300

IV. DIGITAL SCANNER

INSTRUCTIONS:

1) Pot.1 is used for adjusting the A/D conversion rate of scanner.

2) Pot.2 is used for adjusting the lower limit of the reading that is 000.

3) Pot.3 is used for same purpose as Pot.2 but it is more precise.

NOTES:

Selection panel control the appearance of each parameters. scanning time can be

increased or decreased by pressing button T+ or T- (500ms for each time) and can be

jumped at any particular quantity by first pressing stop button and then required

position. All three quantities after scaling is given at scanner input.