0% found this document useful (0 votes)
101 views6 pages

A Practical Applications of Virtual PLC Using LabVIEW Software

Uploaded by

Loc Huynh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views6 pages

A Practical Applications of Virtual PLC Using LabVIEW Software

Uploaded by

Loc Huynh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Research Journal of Applied Sciences, Engineering and Technology 5(24): 5677-5682, 2013

ISSN: 2040-7459; e-ISSN: 2040-7467


© Maxwell Scientific Organization, 2013
Submitted: December 28, 2012 Accepted: February 01, 2013 Published: May 30, 2013

A Practical Applications of Virtual PLC using LabVIEW Software

Mohammad K. Abuzalata
Department of Mechatronics Engineering, Faculty of Engineering Technology, Al-Balqa’ Applied
University, P.O. Box 425530, Amman-Jordan

Abstract: In this study thirteen different functions (VIs) are designed and tested .These include, single input single
output, single input two outputs, latch outputs, timer, counter, logic function, less, greater and equal functions, XOR
function, compound function and shift register. At the end of the study, for illustration purposes, the 7-day tea
maker, electro-pneumatic drive system and their simulation were developed and tested. Results of experiment show
complete coincidence between the PLC-based control and Virtual PLC-based program results.

Keywords: Functions, LabVIEW, Ladder diagram, PLC, Simulation

INTRODUCTION EQUIVALENT PLC/LABVIEW LADDER


DIAGRAM
Today, traditional PLCs are still in use at most
plants, but windows-based PCs using the LabVIEW In Table 1, the ladder diagram rungs for PLC,
software (Abuzalata et al., 2010; Alia et al., 2011) are Siemens (S7-200) software and their equivalents using
increasingly becoming the preferred control mechanism LabVIEW from Single Input, Single Output (Relay) as
for new installations. PLCs have become a favorite tool
in the example Thomas (2002).
in the control industry because of their simplicity, robust
I/O interface and reliable performance Bolton (2006,
1999). Traditional PLC systems have proven to be THE 7-DAY TEA MAKER
information barriers to enterprise-wide data access. One
may add that the inherent proprietary design of PLCs Operation of The 7-day tea maker: The operation of
has limited data access for a number of reasons, such as the tea maker required the following sequences: The
the limited amount of memory, the nature of time switch closes at the appropriate time in the morning
programming language (Relay Ladder Logic) and the and initiates the cycle. Valve V1 is opened and water
data access, where data inside the PLC is stored in a data fills the kettle K until the float switch FS operates. This
table and accessed by data table location. An important switches off valve V1 and switches on heating element
feature of PLCs is that a standard PLC executes only a E. Water in the kettle boils and operates thermostat TH.
single program at a time, while an industrial computer is This switches off the element E and switches on valve
capable of executing several programs or tasks V2. Hot water flows into the teapot and V2 must shut
simultaneously in any order. Another two important off when the teapot is full. An alarm bell rings to inform
PLC drawbacks may be noted also: The first one is that the user that the tea is made.
PLC register access is performed at a surprisingly low The system relies upon the user to replace the
level on most PLCs Morris (1982) and Travis and Kring teapot, complete with tea, every day and to fill up the
(2006). The second one is that if the ladder logic and the tank each week. The sequence listed is a 'program
host computer program both write to a PLC register, we specification'.
have an obvious conflict. Instead, all registers should be
one-way, that is, either the PLC writes to them or the
host computer program does. In contrast to PLCs, PCs Inputs and outputs: LabVIEW is to be used instead of
have virtually unlimited memory, compared to PLC to control this system, as it is known that the inputs
traditional PLCs. LabVIEW makes it easy to maintain and outputs for the PLC have to be identified prior to the
good architecture in the applications because design of a program. In the tea maker application, what
encapsulation and modularity are easy to implement is the input and outputs?
through the use of sub. VIs.
Building on the above mentioned the aim of this • Inputs: They are signals/information from sensors,
study is to illustrate the design of different PLCs which inform the PLC (LabVIEW program) what
functions in order to be used as a practical applications happens to the system being controlled. Inputs tell
using LabVIEW environment. the PLC (LabVIEW program) what is going on,

5677
Res. J. App. Sci. Eng. Technol., 5(24): 5677-5682, 2013

Table 1: Functions for PLC and their equivalents using LabVIEW


Legend PLC Siemens (S7-200) LabVIEW
1- Single Input, Single Output (Relay)

2- Two input, single outputs

3- Single onput two outputs

4- Latch output

5- Timer

6- Counter

7- Shift register

8- Equal comparison function

9- Less function

10- Greater or equal function

11- XOR function

12- Add function

13- Latch timer and internal relay

5678
Res. J. App. Sci. Eng. Technol., 5(24): 5677-5682, 2013

Fig. 1: Diagram of the 7-day tea maker

Fig. 3: LabVIEW ladder diagram of the 7-day tea maker

Fig. 4: LabVIEW simulation of 7-day tea maker

Table 2: Inputs/Outputs of the 7-day tea maker


Fig. 2: Siemens ladder diagram of the 7-day tea maker Identification no
-------------------------
switches, thermostats, transducers, etc., are all input Device Letter PLC LabVIEW
devices. Inputs Time switch Ts 1 10.0 Ts
• Outputs: They are commands issued by the PLC Float switch FS 2 10.1 Fs
Thermostat TH 3 10.2 Th
(LabVIEW program) to carry out a task (normally Outputs Value V1 1 Q 0.0 V1
requiring power). Output devices have to be told E 2 Q 0.1 E
when to study; as pumps, solenoid valves, lamps, V2 3 Q 0.2 V2
B 4 Q 0.3 B
etc.

Output devices: The diagram for the 7-day tea maker • The PLC ladder diagram: As shown in Fig. 2, the
in Fig. 1 illustrates the operation of the system. ladder diagram of the 7-day tea maker program
Referring to the tea maker system to identify each using PLC Siemens (S7-200) software is shown in
element as input or an output device and give it a unique Fig. 2.
identification as shown in Table 2. • The LabVIEW ladder diagram: As shown in
Fig. 3 the ladder diagram of the 7-day Tea maker
The 7-day tea maker program: Since LabVIEW is to program using is LabVIEW.
be used instead of PLC to control this system and then • The 7-day tea maker simulation using Lab-
design the program by the PLC, which is PLC Siemens VIEW: As shown in Fig. 4 the simulation of the 7-
(S7-200) software, then by LabVIEW software. day tea maker using LabVIEW software.
5679
Res. J. App. Sci. Eng. Technol., 5(24): 5677-5682, 2013

Table 3: Input/Output of the pneumatic cylinder system


Identification no
------------------------
Device Letter PLC LabVIEW
Inputs On push button On 1 10.0 On
OFF push button Off 2 10.1 Off
Limit switch LS 3 10.2 LS
Counter reset R 4 10.3 R
Output Solenoid value SV 1 Q0.0 SV

Fig. 6: LabVIEW ladder diagram of the pneumatic cylinder


system

Fig. 5: Siemens ladder diagram of the pneumatic cylinder

PNEUMATIC CYLINDER SYSTEM

Operation of the pneumatic cylinder: The operation Fig. 7: LabVIEW simulation of the pneumatic cylinder
of the pneumatic cylinder valve Alia et al. (2011)
requires the following steps: Initialize the operation by
the external ON push button or the internal one in the
software, the solenoid valve SV is works and moves the
cylinder to forward direction. When the cylinder touches
the limit switch LS, timer one T1 will be activated. After
the time value of T1 is ended, the SV is returns to off
state and the solenoid returns to the backward direction.
This makes the timer two T2 to turn on, T1 off and the Fig. 8: Optocoupler with phototransistor output
counter C1 increases by one.
After the time value of the T2 ends, the SV is
activated and the cylinder moves to forward direction Inputs and outputs of the pneumatic cylinder:
again. The sequence is continued until the counter LabVIEW will be used instead of PLC to control this
reaches its value, then the operation will be off system. As known, the inputs and outputs for the PLC
automatically. The user can switch off the operation at have to be identified prior to the design of a program.
any time by the external off push button or the internal Referring to the pneumatic cylinder system we can
one in the software, also the user can switch on the identify each element as input or output device and give
operation from the external on push button. it a unique identification as shown in Table 3.
5680
Res. J. App. Sci. Eng. Technol., 5(24): 5677-5682, 2013

Fig. 9: The hardware circuit of the pneumatic cylinder

The pneumatic cylinder program: Since LabVIEW is Table 4: DIO channels


to be used instead of PLC to control this system, then Symbols in
The channel Pin number State (I,O) the program
firstly design the program using the PLC, which is PLC
DIO5 51 Output SV
Siemens (S7-200) software as shown in Fig. 5, then DIO2 49 Input LS
using LabVIEW software as shown in Fig. 6. DIO4 19 Input ON
DIO0 52 Input OFF
• PLC ladder diagram of the pneumatic cylinder:
• LabVIEW ladder diagram of the pneumatic conditioning). The output of the power transistor
cylinder: activates the solenoid valve (Alia et al., 2011).

Figure 6 shows the ladder diagram of the pneumatic CONCLUSION


cylinder system
Using LabVIEW environment, thirteen different
The pneumatic cylinder simulation using labVIEW: virtual rungs have been designed and tested. Applying
Figure 7 illustrates the simulation of the pneumatic the same approach it is possible to design a complete set
cylinder application using LabVIEW software. of PLC functions in order to realize programmable PC-
based virtual PLC. In this case the virtual PLC will gain
The pneumatic cylinder hardware: It contains the advantages of PC-Based control.
Multichannel Optocoupler with Phototransistor Output
(CNY 4-2), its pin connections shown in Fig. 8- BD 237 REFERENCES
npn Transistor-Resistors 920 Ω, 440 KΩ- 2 Push
Buttons-LEDs-24 V DC Power Supply-4/2 Solenoid
Abuzalata, M.K., M.A.K. Alia, S. Asad and M. Salahat,
Valve, Double Acting Cylinder, Limit Switch-DAQ
2010. Design of a Virtual PLC using Lab View,
board .this study dealt with the following DIO (Digital
Input Output) channel in the DAQ board, Table 4, Res. J. Appl. Sci. Eng. Technol., 2(3): 283-288.
represents these pins. Alia, M.A.K., T. Yunis and M.K. Abuzalata, 2011.
As shown in Fig. 9, the construction of the Development of equivalent virtual instruments
hardware circuit. The electrical circuit includes two To PLC functions and networks. J. Software Eng.
parts; first part is the optocoupler, which isolates the Appl., 4: 172-180.
DAQ board from the high currents of the solenoid coil. Bolton, W., 1999. Mechatronics Electronic Control
Digital Channel 5 in the DAQ board activates the System in Mechanical Engineering. 2nd Edn.,
optocoupler and its output activates the second part British Library, Britain.
(power transistor). The aim of the second part is to Bolton, W., 2006. Programmable Logic Controllers. 4th
give the suitable current to solenoid (Suitablesignal Edn., British Library, Britain.

5681
Res. J. App. Sci. Eng. Technol., 5(24): 5677-5682, 2013

Morris, M.M., 1982. Computer System Architecture. Travis, J. and J. Kring, 2006. LabVIEW for Everyone:
Prentice-Hall, New Jersey. Graphical Programming Made Easy and Fun. 3rd
Thomas, L.F., 2002. Digital Fundamental. 6th Edn., Edn., Prentice Hall, New Jersey.
Prentice Hall, New Jersey.

5682

You might also like