Labview
Labview
Labview
CT047-3-2-SPCC
SYSTEM PROGRAMMING AND COMPUTER
CONTROL
NP2F1701IT
HAND OUT DATE : 29 AUGUST 2017
WEIGHTAGE: 50%
INSTRUCTIONS TO CANDIDATES
1
INDIVIDUAL ASSIGNMENT
LORD BUDDHA EDUCATION FOUNDATION
CT047-3-2-SPCC
Submitted By:
Submitted to:
Suresh Chand
2
Acknowledgement
I would like to express my heartfelt gratitude towards our Lecturer Mr. Suresh Chand
for his patient guidance and encouragement which helped us in completing this
project. Also, our sincere thanks goes to our coordinator Ms. Dolma Sherpa for her
practical suggestions and helpful advices.
Further, we would like to thank Asian Pacific University for providing us wonderful
project to make us able to develop a project in a real-time system. It has developed
our more technical skills and helps us to be more creative.
Special thanks go to my those who have taken part in each and every section
continuously for the completion of this project in a given time frame.
Last but not the least we would like to thank all the faculty members of the LBEF.
3
Executive Summary
The project in the smart home management system is made using the powerful system
of LabVIEW. The purpose of this assignment is to build a smart home control system.
The smart home system will be included as a package for the home owners. With the
floor plan provided with the system design, the whole system is expected to be able to
control devices that are in the home through TCP/IP based on the design of the floor
plan. The system is controlled using the central control keypad which make the
control over the whole system.
4
Contents
1. Introduction ....................................................................................................................... 1
1.1 LabView ........................................................................................................................... 1
1.2 Benefits of LabVIEW ........................................................................................................ 1
2. Flowchart ........................................................................................................................... 2
2.1 Client................................................................................................................................ 2
3.2 Server............................................................................................................................... 3
3. Floor plan........................................................................................................................... 4
4. Program Design ................................................................................................................. 5
4.1 Server Module ................................................................................................................. 5
4.2 Client Module .................................................................................................................. 6
4.3 TCP/IP .............................................................................................................................. 6
4.4 TCP Open Connection ...................................................................................................... 7
4.5 TCP Write ......................................................................................................................... 7
4.6 TCP Read .......................................................................................................................... 8
4.7 TCP Close Connection ...................................................................................................... 9
4.8 Type Cast Function .......................................................................................................... 9
5. Hardware/Sensor Device ................................................................................................. 11
5.1 Slider .............................................................................................................................. 11
5.2 Tv and Remote Light Control ......................................................................................... 11
6. User Interface .................................................................................................................. 12
7. Limitation......................................................................................................................... 14
8. Conclusion ....................................................................................................................... 15
9. References ....................................................................................................................... 16
Appendix.............................................................................................................................. 17
Appendix I: Marking Grid..................................................................................................... 17
5
1. Introduction
The rise of the technology has made the life easier and comfortable. The use of the
technology is increasing in every sector. Thus, there is huge increament in the
technological rise in the housing sector as well.
The purpose of this assignment is to build a smart home control system. The smart
home system will be included as a package for the home owners. With the floor plan
provided with the system design, the whole system is expected to be able to control
devices that are in the home through TCP/IP based on the design of the floor plan.
The system is required to have a central control keypad which will manually be
located in the master bedroom and the main entrance.
This documentation will include the core explanation of the system with the guide
which will give brief explanations on every function in the system.
1.1 LabView
There are numerous benefits of using LabVIEW. The main advantages of LabVIEW
are as follows :-
1
2. Flowchart
2.1 Client
2
3.2 Server
3
3. Floor plan
Picture above shown the floor plan that had been added feature into the home which
include the use of light, curtain, door, air-con and air-con temperature.
4
4. Program Design
5
4.2 Client Module
Client Module of the system is shown in above figure. Three type of TCP protocol
functions are used in this module. They are TCP Open Connection, TCP write, and
TCP Close Connection. TCP Open Connection is used to open TCP network
connection of client module and server module. TCP write function is used to write
the data on the memory so that it can be pass to the server for performing respective
function. And TCP Close Connection is used to end the connection of two modules
i.e. client module and server module.
4.3 TCP/IP
6
4.4 TCP Open Connection
TCP open connection function is used to open TCP network connection with address
and remote port or service name. (Anon., 2017)
TCP write function is used to write data to TCP network connection. It passes the
message through network. (Anon., 2017)
7
Figure 6: TCP Write Function in Client side
TCP read number of bytes from TCP network connection and sending result to data
out.
8
4.7 TCP Close Connection
Type cast function is data manipulation function. Cast x is the data type of input and
type is used to convert data into required data type and *(type)*&x is the output of
convert data type.
9
Figure 11: Type Cast Function
It is used in this prototype to convert receive data into string data type. It is used in
both client side and server side.
10
5. Hardware/Sensor Device
Hardware devices require for implementation of this prototype are described below:
5.1 Slider
Slider is required for doors and windows. Door required slide door open so that it can
sensor the people and open the door automatically. For window slider is used for
opening and closing of curtain as the user give instruction through.
11
6. User Interface
12
User Manual
Passage Bulb switch controls the bulb of passage, whereas Door2 controls the passage
door.
MasterRoomBulbRight controls the right bulb of master bedroom. Door3 controls the
door of master bedroom. MasterRoomBulbLeft controls the left bulb of master
bedroom.
13
7. Limitation
The smart home system needs server and client to connect each other to be able to
function properly. The major problems involved in the LabVIEW program are:-
There will be a chance where the port connections overflowing and the system
will not be able to function as the way it should.
Some of the hardware device may not tie up properly as mentioned in
LabVIEW.
Some of the hardware recommended in the LabVIEW are expensive to use.
The home security system can only operate only in the availability of
electricity
14
8. Conclusion
The smart home control system is a very good source of help for big homes with
several level and wide area. But this could also mean more expensive to be
implemented. The smart home control system is still very new in the market. The
usefulness and the comfort of using this system of design has increased the popularity
in the recent trend. This has made this system of design an ultimate choice usually for
the big house and offices.
The system is complete with basic functionalities that should satisfy most users.
However, there are still a lot of rooms for improvements. By doing more in depth
research and reviewing feedbacks from the users, we should be able to implement
more features into the system and meets the needs and demands of the home users.
15
9. References
16
Appendix
Appendix I: Marking Grid
2. User interface 15
7. Presentation 20
Total 100
17