Data storage of measurements with an electronic balance

treescattleSoftware and s/w Development

Nov 2, 2013 (4 years and 5 days ago)

569 views

Data storage of measurements with an electronic balance
















Data storage of

measurements with an electronic

balance

Final Project













Bachelor's thesis


Auto
Maint


Valkeakoski 31.5.2007


Sacha Thermote


Olivier Claerhout


Data storage of measurements with an electronic balance







BACHELOR'S THESIS



Auto Maint

Tietotie 1

37630 Valkeakoski






Title

Da
ta storage of measurements with an electronic balance




Authors

Thermote Sacha


Kwadries 12


8560 Gullegem


Belgium



Claerhout Olivier


Emiel Hullebroecks
traat

14


8930 Menen


Belgium




Commissioned by

Väänänen; Matti


Tietotie 1


37630 Valkeakoski


+35
8 3 6462306




Supervised by


Candaele; Wim




Approved on

_____._____.20_____ grade: __________




Approved by






Scale of grades

5 = excellent, 4

3 = good, 2

1 = satisfactory


Data storage of measurements with an electronic balance







ABSTRACT



HÄMEENLINNA

Auto Maint


Author


Sacha Thermote, Olivier C
laerhout

Year

2007


Commissioned by


Matti Väänänen


Subject of Bachelor’s thesis

Data storage of measurements with an electronic balance


Archives

Häme Polytechnic, Valkeakoski



ABSTRACT



During our trainingship, we have learned to work with the LoadM
aster 8000 (an ele
c-
tronic balance). This balance is normally situated on the dashboard of a wheelloader (a
kind of bulldozer) to manipulate every measurement the machine does. This machine
has a memory of 5000 slots and in this memory we can stock 500 cust
omers and

products. It was really interesting to see how this machine relies on three kinds of se
n-
sors located in the wheelloader. Our primary task was sending data from the Loadma
s-
ter 8000 to a computer through a serial connection. Next we had to store t
he data into a
d
a
tabase and sort these by different categories. Finally the data had to be retrieved from
this database and presented to the user. For this assignment we created a small applic
a-
tion in VB.Net where we could

capture the data and store this i
nto the database. We also
created a way to dynamically adjust the settings for the serial connection with the pr
o-
gram. On the other hand for retrieving the data from the database, we created a small
web application

written in PHP and created some extra
pos
sibilities
.



Keywords

Loadmaster, VB.NET, PHP, MySQL, balance, electronic


Pages

23

p. + appendices 52

p.

Data storage of measurements with an electronic balance







CONTENTS


1

INTRODUCTION

................................
................................
................................
.......

5

1.1

Studying in Belgium

................................
................................
............................

5

1.2

ERASMUS program
................................
................................
............................

5

1.3

Studying in Finland

................................
................................
.............................

6

1.4

Project introduction

................................
................................
.............................

6

2

DEFINING

................................
................................
................................
..................

7

2.1

VB.NET

................................
................................
................................
...............

7

2.2

MySQL

................................
................................
................................
................

8

2.3

PHP

................................
................................
................................
......................

9

3

THE PROJECT
................................
................................
................................
..........

10

3.1

Loadmaster 8000

................................
................................
...............................

10

3.2

Goals

................................
................................
................................
..................

13

3.3

Planning

................................
................................
................................
.............

13

3.4

User interface
................................
................................
................................
.....

14

3.4.1

Program
................................
................................
................................
..

14

3.4.2

Website

................................
................................
................................
..

14

3.5

Database

................................
................................
................................
............

15

3.6

Developing environment

................................
................................
...................

15

3.6.1

Hardware
................................
................................
................................

15

3.6.2

Software

................................
................................
................................
.

15

3.7

Technical description
................................
................................
.........................

15

3.8

Achievements

................................
................................
................................
....

16

4

FINAL CONSIDERATIONS

................................
................................
....................

17

4.1

Future work and possible improvements
................................
...........................

17

4.2

Conclusion

................................
................................
................................
.........

17

4.3

References

................................
................................
................................
.........

18

4.4

Thank You:

................................
................................
................................
........

19

4.5

Appendix:

................................
................................
................................
..........

19













Data storage of measurements with

an electronic balance






5

1

INTRODUCTION

1.1

Studying in Belgium

Our degree in Belgium is Bachelor
in
Application Development. It b
e-
longs to the area of Applied Information science. Application

Develo
p-
ment and Software Management are the two main subjects for this educ
a-
tion. The total number of credits is 180. This degree is studied in the d
e-
partment “VHTI (KATHO, Kortrijk)”.


The target of these studies is becoming a professional “all round” i
nfo
r-
mation scientist who has knowledge on multiple domains. No specialis
a-
tions in the quick evolving ICT
-
environment. The studies provide a scie
n-
tific and technical education, extensive and generalist, for building and

maintaining applications and website
s.


In

the

professional world, the degree is orientated to become a progra
m-
mer, database administrator, network administrator, ICT
-
consultant or

webmaster. Even a job at a helpdesk or support for a product, especially in
telecommunications, informatics a
nd industrial electronics areas, is a

possibility.

1.2

ERASMUS program

This year has been our last year in the university. We had to complete
som
e subjects and do

our final project for being ready with our degree.
VHTI offers students the possibility of going

abroad to complete the stu
d-
ies, and we thought this was a really good opportunity for first, improving
our English, getting to know other cultures and travelling abroad. Having
an experience in a foreign country is also good for the academic

exped
i
ent. w
e had the opportunity of joining the ERASMUS program, and
looking at the possibilities that we had, we chose Finland. Finland has a
good reputation with technology and research development around E
u-
rope. And this was a good opportunity for visiting a north
ern country.


ERASMUS is the higher education action of SOCRATES II program. It
seeks to exchange the quality and reinforce the European dimension of
higher education by encouraging international cooperation between un
i-
versities, boosting European mobility

and improving the transparency and
full academic recognition of studies and qualifications throughout the U
n-
ion. ERASMUS action is targeted at higher education institutions and their
students and staff in all 25 Member States of the European Union.




Data storage of measurements with

an electronic balance






6

1.3

St
udying in Finland

The Hamk University of Applied Sciences was proposed to us by the head
of foreign affairs at our school in Belgium. The assignments he
re in A
u-
toMaint are mainly focu
sed on integrating automation systems and opt
i-
mise the production.

The ce
ntre provides a good working environment and has good conne
c-
tions with both industry and commerce.

For us, students in software development, it might not have been the best
environment for our final project, but we learned how to adapt to and work
in more
difficult circumstances. This gave us the experience to adapt to
other situations, which is something you can't really learn in class.


Looking back, the experience here in Valkeakoski, Finland has been a
good one for both of us.

1.4

Project introduction

The
main part of our assignment, was to create an application that would
allow people to retrieve data from the memory of the Loadmaster 8000
and store it onto a computer.


After analyzing the

assignment and the electronic

balance, we came to the
decision to s
plit up the project into two parts.

One part would be a database
-
driven application, developed in Visual

Basic.Net. This would take care of retrieving the data from the Loadma
s-
ter 8000 and storing everything into the database.

The second part of the projec
t is a database
-
driven PHP
-
website that

allows visitors to use a search function based on the
three

most important
search queries: product name, customer name and date.

The database itself was created using MySQL Administrator. It will be
filled wit
h data using the Loadmaster
-
application created in VB.Net
.

The
database

can be maintained and adapted with MySQL Administrator and
MySQL Query Browser.


Splitting the assignment up into two parts, we could easily create two di
f-
ferent projects. These projec
ts are attached to each other with the database.

This way, we could each occupy ourselves over our own part of the pr
o-
ject.
Data storage of measurements with

an electronic balance






7

2

DEFINING

2.1

VB.NET

Visual Basic .NET (VB.NET) is an object
-
oriented computer language
that can be viewed as an spiritual evolution of M
icrosoft's Visual Basic
(VB) implemented on the Microsoft .NET framework. (
Image

2)

Its introduction has been controversial, as significant changes were made
that broke backward compatibility with VB and caused a rift within the
developer community that ma
y or may not be resolved with the
introduction of Visual Studio 2005.




The Microsoft .NET Framework is a software component that can be ad
d-
ed to or is included with the Microsoft Windows operating system. It pr
o-
vides a large body of pre
-
coded solutions
to common program requir
e-
ments, and manages the execution of programs written specifically for the
framework. The .NET Framework is a key Microsoft offering, and is i
n-
tended to be used by most new applications created for the Windows pla
t-
form.



Image

1
: The Microsoft .NET Framework




Data storage of measurements with

an electronic balance






8

The pre
-
coded solutions that form the framework's class library cover a
large range of programming needs in areas including: user interface, data
access, database connectivity, cryptography, web ap
plication develo
p-
ment, numeric algorithms, and network communications. The functions of
the class library are used by programmers who combine them with their
own code to produce applications.



Programs written for the .NET Framework execute in a software
enviro
n-
ment that manages the program's runtime requirements. This runtime env
i-
ronment, which is also a part of the .NET Framework, is known as the
Common Language Runtime (CLR). The CLR provides the appearance of
an application virtual machine, so that pro
grammers need not consider the
capabilities of the specific CPU that will execute the program. The CLR
also provides other important services such as security mechanisms,
me
m
ory management, and exception handling. The class library and the
CLR together com
pose the .NET Framework. The framework is intended
to make it easier to develop computer applications and to reduce the vu
l-
ne
r
ability of applications and computers to security threats.



2.2

MySQL




MySQL is a multithreaded, multi
-
user SQL database managemen
t system
(DBMS) which has, according to MySQL AB, more than 10 million i
n-
stallations.

MySQL is owned and sponsored by a single for
-
profit firm, the Swedish
company MySQL AB, which holds the copyright to most of the codebase.

The company develops and mainta
ins the system, selling support and se
r-
vice contracts, as well as proprietary
-
licensed copies of MySQL, and e
m-
ploying people all over the world who collaborate via the Internet.
MySQL AB was founded by David Axmark, Allan Larsson, and Michael
"Monty" Widen
ius. The CEO is Mårten Mickos.


MySQL is popular for web applications and acts as the database comp
o-
nent of the LAMP, MAMP, and WAMP platforms (Linux/Mac/Windows
-
Apache
-
MySQL
-
PHP/Perl/Python), and for open
-
source bug tracking
tools like Bugzilla. Its popul
arity as a web application is closely tied to the
popularity of PHP, which is often combined with MySQL.

Data storage of measurements with

an electronic balance






9

PHP and MySQL are essential components for running the popular Wor
d-
Press blogging platform. Wikipedia runs on MediaWiki software, which
also uses PHP
and a MySQL database.


To administer MySQL databases one can use the included command
-
line
tool. Also downloadable from the MySQL site are GUI administration
tools: MySQL Administrator and MySQL Query Browser. Both of the
GUI tools are now included in one
package called MySQL GUI Tools.


In addition to the above mentioned tools developed by MySQL AB, there
are several other commercial and non
-
commercial tools available.
PhpMyAdmin is a free software webbased administration interface i
m-
plemented in PHP.


2.3

PHP




PHP is a reflective programming language originally designed for produ
c-
ing dynamic web pages. PHP is used mainly in server
-
side scripting, but
can be used from a command line interface or in standalone graphical a
p-
plications. Textual User Interfaces c
an also be created using n
-
curses.

The main implementation is produced by The PHP Group and released
under the PHP License. It is considered to be free software by the Free
Software Foundation. This implementation serves to define a de facto
standard for P
HP, as there is no formal specification.


PHP generally runs on a web server, taking PHP code as its input and cr
e-
ating Web pages as output, however it can also be used for command
-
line
scripting and client
-
side GUI applications. PHP can be deployed on mos
t
web servers and on almost every operating system and platform free of
charge. The PHP Group also provides the complete source code for users
to build, customize and extend for their own use.


Originally designed to create dynamic web pages, PHP's princip
al focus is
server
-
side scripting. While running the PHP parser with a web server and
web browser, the PHP model can be compared to other server
-
side scrip
t-
ing languages such as Microsoft's ASP.NET system, Sun Microsystems'
JavaServer Pages, mod_perl and t
he Ruby on Rails framework, as they all
provide dynamic content to the client from a web server.

Examples of popular server
-
side PHP applications include phpBB, Wor
d-
Press, and MediaWiki.



Data storage of measurements with

an electronic balance






10


3

THE PROJECT

3.1

Loadmaster 8000

LOADMASTER 8000 is an intuitive and us
er
-
friendly weighing system.

Image

1 shows it comes with an additional batch weighing facility as
standard, a clear, backlit screen and offers telemetry as an option.




Image

2

Structure of the on
-
board weighing
-

Loadmaster

8000



BENEFITS:



provides an operational and management record and verification of
weighbridge tickets;



eliminates return trips from the weighbridge of over/underloaded
vehicles;



reduces weighbridge queues;



ensures vehicles are correctly loaded first
time;



improves site safety by eliminating unnecessary vehicle mov
e-
ments;



weighing ‘on the lift’ speeds operation, enabling your operators to
load more vehicles per shift;



easy upgrade from existing systems.




KIT INCLUDES:

Data storage of measurements with

an electronic balance






11



Head unit,



2 x heavy duty lo
ad sensors,



vehicle hydraulic fitting kit,



reference / direction sensors,



enter button for lift lever.



FEATURES:



automatic, speed
-
compensated, dynamic weighing;



static weighing mode;



live last bucket tip off facility;



multiple attachment calibratio
n;



1,000 Store internal database for products and customers;



PCMCIA uploading and downloading;



printing;



PC data downloading;



overload logging;



net weighing (container/pallet weighing);



slope compensation option;



compatible with Load 2000 Management Syste
m for the PC;



telemetry capability;



batch weighing capability
-

for uploading pre
-
programmed blends
of materials to produce accurate mixing of batches;



proven sensor technology;



display screen protected behind hardened anti
-
glare glass LCD
graphic display;



LED backlit screen and keypads;



large easy
-
to
-
read display for normal loading operation showing
bucket load and target load, customer name, material handled and
time;



rugged construction with an integral aluminium chassis enclosed
by a heavy
-
duty ABS cas
e with easy
-
clean finish;



universal double ball
-
jointed mounting bracket allowing adjus
t-
ment to virtually any angle;



optional panel mounting kit.


Data storage of measurements with

an electronic balance






12



TECHNICAL DATA:



Approvals: ISO TR 10605 (electrostatic discharge)




ISO 11452 (Susceptibili
ty)



Display: 160 x 128 pixel (9.5cm x 7.5cm)





Dot matrix
-

LED backlit



Switches: Rubber membrane
-

sealed, tactile operation



Operating voltage: 11
-

30Vdc



Temperature range:
-
30° to + 50°C



System accuracy: +/
-

2% (or better)



Load sensor rating: 0
-
250 bar



Environmental protection: Instrument unit IP54




External sensors IP65




Full RFI/EMI protection



Enclosure: 1.6mm Aluminium box chassis



Dimensions: ABS outer casing
-

self
-
colour (dark grey)




24cm x 14cm x 4.
5cm(H x W x D) 0.75kg

Data storage of measurements with

an electronic balance






13


3.2

Goals



Creating a database that would act as a copy of the memory o
f

the
Loadmaster
;



Creating a program that would retrieve the data from the memory of the
balance and store it into the database
;



Being able to
read the data from the
database;



To fulfil these requests, we could use the programming languages of
our choice.

3.3

Planning

During our project, we worked in different phases. Thanks to this pla
n-
ning, the project was divided real good.


First of all we needed to investigate all the

different functions and the
working of the Loadmaster 8000. Knowing how the machine weighs,
stores and sends data is

a

primary requirement. Second
ly,

we needed to
focus on the connection between the Loadmaster and the
computer
. This
serial connection has
different settings which must be the same on both
sides.


After that we tried to receive the data with Hyper Terminal and
figured

out
what kind of data we got. We had to find out the meaning of everything
the Loadmaster sent to the
computer
. Then we could

start programming.
We started creating a VB.NET program and receive the data directly wit
h-
out the Hyper Terminal. Also we started creating the database and the d
a-
tabase connection for the VB program. When that was finished, we could
store the data into th
e database. Then we could design the program around
the page to store the data.


In the mean while we started creating a website in PHP to read the data
from the database. We wanted to search on different values to improve the
structure of the search resu
lts. We created a website around the page
where we read the data as last.

Data storage of measurements with

an electronic balance






14

3.4

User interface

3.4.1

Program

In general we obtain to have a real friendly user interface that’s very easy
to use. We also choose to create the interface with some images to
make

it
more a
ppealing. The banner for example in the different forms gives the
user a good idea

of

what the program’s about. In the other forms we
choose to keep it simple and very clear
so

the user immediately knows
what he can do there. Also
,

there

is a manual incl
uded which gives more
functionality about the Loadmaster 8000 itself. Also something very

i
mportant to mention is that we connected the program to the website and
let the website also be shown in the program.

3.4.2

Website




Image 3
-

Search function on t
he website



As Image 3 shows
, we included a search function

in the web application
.
This function allows users to input a query and search for results on three
different bases: Product name, Cu
s
tomer name and date.

This way, the most important values to
the visitor are already included in
the query.

Another nice feature about the search function is that only a part of the
name/date has to be entered. So, if a user is not entirely certain of a name
or date, he ca
n

just put in a couple of consecutive letter
s or numbers, and
all the matching data for this type of search will be shown.

Data storage of measurements with

an electronic balance






15


3.5

Database

For a full schematics of the database, view appendix 1.


3.6

Developing environment

3.6.1

Hardware



Dell Latitude D800 (CPU: Pentium IV 1,4 GHz; RAM: 1,3 GB;

Hard disk: 40 GB);



Acer Aspire 3690 (CPU: Intel Celeron M420; RAM: 1 GB;

Hard disk: 80 GB);

3.6.2

Software



Microsoft Visual Studio 2005



Macromedia Dreamweaver MX,



Filezil
l
a



MySql Community Server 5.0,



MySql Administrator 1.2.9,



MySql Query Browser 1.2.9,



Microsoft Office 2003 N
L SP1,



Windows XP Pro NL SP2,



Adobe Photoshop CS,



Adobe Acrobat 8.0.


3.7

Technical description

The program is
developed

in VB.NET, by means of Microsoft Visual St
u-
dio 2005. The data is stored in a MySQL
-
database. MySQL Admini
s
trator
and MySQL Query Browser ar
e being used to con
figure
the dat
a
base.


The website is
developed
in PHP, by means of Macromedia

Dreamweaver MX. The data is read from a MySQL
-
database. MySQL
Administrator and MySQL Query Browser are being used to con
figure

the
database.

Data storage of measurements with

an electronic balance






16


3.8

Achievements



The database was successfully created.



An application was developed which can retrieve data from the

Loa
d
Master 8000 and store it into a database.



For consulting the data, we created a database
-
driven
web based

appl
i-
cation, that can display the data
according to several search queries.



Both applications work with the same database, so no manual updating
of the database is necessary anymore.



































Data storage of measurements with

an electronic balance






17


4

FINAL CONSIDERATIONS

4.1

Future work and possible improvements

Both the program

and the website offer very ‘basic’
features. These can of
course be expanded in the future. For example, more functionalities can be
included in the website.

Another thing that could be looked into in the future, is the possibility of
transmitting data th
rough a wireless connection. Sadly, we did not have a
sufficient amount of time to explore those possibilities.

4.2

Conclusion

When we started the project,
three

weeks ago, we didn’t realize how it was
going to look when finished. It’s not the first time in ou
r lives that we face
an automation problem, but it was the first time that we faced a project
with these characteristics. Before starting with this, we never heard before
about ‘Loadmaster balances’, and didn’t know anything about how these
sensors work. T
his work has been very useful for us to learn how to do
such kind of automation projects. How to collect information and working
over a real machine, and not over ‘hypothetical’ exercises.



Our milestones have been, first of all, try to get an idea of wh
at we were
supposed to do with this project. Then, study the different problems that
came along the way. In one hand the working methods of the balance and
all the settings to con
figure

the balance. In the other hand the settings to
configure
the serial po
rt. And our last challenge has been to write this
documentation, mainly for other people that have no idea about the pr
o-
ject, to unde
r
stand why and how it has been done. This documentation has
also been written with the intension that some people can conti
nue and
improve this project.



One of the targets of storing this data in a database was that, after been fi
n-
ished, this project with a friendly interface could be used as a good point
to start further improvements. We really hope that after this work, fi
nally
some people can take some benefits from here.



During these
three

weeks we had some periods with different emotions
and feelings about the work. Sometimes, things have been going good,
when we could solve our problems and going ahead by a good way w
e got
more implicate in the project. You have more illusions and everything
goes good. But, other times we got stuck in some parts, and turned around
the same problems, and it looks like it will be very hard to solve it.

Data storage of measurements with

an electronic balance






18

Luckily
, good and bad times come a
lternatively, and all the problems get
solved. It would be unfair to say we have had no help from the people
here. Actually, we had help from the people in Automation and our supe
r-
visor, and thanks to this help the project was easier for us to complete.


A
round the project, but anyway connected with it, there has been our life
as an exchange student. We have had a very good time in Finland, but, for
sure it’s sometimes difficult to live in another culture, in another country.
We learned not to listen to som
e of our cultural instincts, and sometimes
behaved in a different way as we were educated in our society. It’s also
hard to feel so far from home, family and friends, and not to feel their
support. The language is necessary to communicate, but when you spe
ak
in another language everyday, and let the others understand, in some cases
you can’t express exactly what you want, or you’re misunderstood by the
others. Sometimes that’s really frustrating.


And of course, the majority of good moments that being in an

exchange
has. This has been one of the best experience of our lives for sure. It’s
good to travel out form your environment to discover other things, other
behaviours, and feel more free and more self confident.

4.3

References

VHTI:
http://www.katho.be/vhti/newsite.asp


Hamk Polytechnic:
http://www.hamk.fi


Hamk Valkeakoski:
http://www.valkeakoski.hamk.fi


Auto Maint:
http://www.automaint.hamk.fi


Code Project:
http://www.codeproject.com/


Loadmaster 8000:
http://www.rds
-
australia.com/lm8.htm


a1vbCode:
http://www.a1vbcode.com/


Codewalkers:
http://www.codewalkers.com/


MySQL:
http://www.mysql.com/


RS232 Information:
http://www.lammertbies.nl/comm/info/nl_RS
-
232.html


Dev Articles:
http://www.devarticles.com/c/b/ADO.NET/








Data storage of measurements with

an electronic balance






19



4.4

Thank You:

Our last words a
re for giving thanks to some people that have done

possible this project. First of all, to our parents, because they gave
us

the
possibility to study and to travel abroad, as well as helping us in our latest
hours. We want to say thank you also to Seppo A
nttonen and Sami Fede
r-
ley because of helping us with the project, and bringing us to the correct
way when we felt lost. And In the last place but not less important the
friends that we have done here in Finland during our exchange. Finally we
say thank you

to some special people that they know how much we need
them.

4.5

Appendix:

Appendix 1: Database

In this appendix is placed a scheme for the MySQL database


Appendix 2
: LM 8000 Manual

In this appendix is placed a Loadmaster 8000 manual in English


A
ppendix 3
: CODE program.

In this appendix is placed the code written in VB.NET


Appendix 4
: CODE website

In this appendix is placed the code written in PHP
Data storage of measurements with an electronic balance





APPENDIX 1: DATABASE





















































Data storage of measurements with an electronic balance





APPENDIX 2
: LM8000 MANUAL




















































Data storage of measurements with an electronic balance





APPENDIX 3
: CODE PROGRAM




















































Data storage of measurements with an electronic balance







APPENDIX 4
: CODE WEBSITE