Object Oriented Design in Industrial Automation

. Sunday, November 23, 2008
3 comments

Object Oriented Programming (OOP)  is supported by many PC programming languages.

How about PLC programming systems? Do you think that object oriented programming is possible for industrial automation systems?

Some automation gurus say that 'object oriented programming is for only programs, an automation system is not a program; may have a program but it is not a program, it is not a desktop application. So automation systems can not be object oriented'

And some gurus say that 'we are already designing in object oriented for many years, before it applied to PC programming'

What do you think?

I will be glad if you write some comments before starting a new post series. Should I define and describe the basics of object oriented design? Or directly run in to a case study of 'object oriented design in an automation system?'

INDAFINS - OMRON Fins OCX

. Tuesday, November 18, 2008
40 comments

--------------------------------------------------------
05.12.2009 21:05

INDAFINS sources are uploaded to

http://groups.google.com/group/indanotes/web/OCX.zip

I was planning to publish all source codes by releasing beta version. (INDAFINS is still alpha version).

Unfortunately I don't have too much time to upgrade it. So I have decied to publish source codes of alpha version.

And also I was planning to upgrade INDAFINS as INDAFINS.Net for .Net environment after adding several more functionalities:
- Serial port support
- Read / Write I/O and timers, etc.

Please feel free to modify it,but I have several petitions:
- Please do not remove any links and information about indanotes.blogspot.com and this post.
- Please keep existing comments.
- Please add your name to source code as a comment if you modify it, and send to me to publish new versions here. I promise, I will keep your name also in this historical post.

--------------------------------------------------------
26.11.2008 00:35

I have released the documentation. I also realized that bad naming on source codes and fixed them.

You can download them from

http://code.google.com/p/indafins/downloads/list

--------------------------------------------------------
19.11.2008  13:32

Google rocks! I decided to host the project at google code instead of sourceforge.

You can download the setup files from

http://code.google.com/p/indafins/downloads/list

Setup file contains the ActiveX and a tester. I am going to publish the source codes soon.

---------------------------------------------------------
18.11.2008

An ActiveX controller 'INDAFINS' for OMRON FINS protocol is going to be published.




This posts address will be a permanent link, I am planning to edit this post on each version release.

It is still in alpha version and supporting only read & write data memories and extended memory banks over ethernet UDP.

I am planning to cover at least %90 of FINS protocol. Also I am planning to give FINS over RS 232 in the same ActiveX, so it should be very easy to change an applications communication method just only chancing one   single line in a project.

Unfortunately, there is no documentation yet, I am planning to write a draft document as soon as possible.

However, when you are using this ActiveX, please:
- Use it by your own risk, it is not a commertial product. Just a freeware.
- Never place an emergency stop function on your PC applications, PC devices and communications are not stable, you may not stop the system in case of emergency.
- New warnings about INDAFINS can be added to this blog, it would be better to subscribe to RSS feed of this blog to be get informed.

I was planing to publish this ActiveX controller as an open source project in www.sourceforge.net, however I need to study more on CVS to publish on SourceForge.

I am going to find a reliable download host other than rapidshare, I would be glad if someone can offer me a good link.

Operation Times Reporting In an Assembly Line - DB Application

. Saturday, November 15, 2008
0 comments

Operation Times Reporting In an Assembly Line  - DB Application


In our previous post, we have studied on data collection. In this post, we are going to study on database design.

Let's remember, we were going to deal with more than 30 million records annually in a database, and we were seeking a way to handle it without throttling the database server.

Let's remember what our customer needed:

Operation times distribution as an histogram : Calculating an histogram may be a little bit difficult. We should prefer to display reports which are easily derived with SQL sentences. And displaying 70 stations histogram in a single page may not help to understand bottlenecks.

The box plot graphics  seemed the best alternative for histogram. It includes basic information from histogram:


and can present all stations graph in a single page:


Pictures are taken from wiki pages, unfortunately I can't publish samples from customers reports.


Idle time to find out bottle necks: For idle time, less is better. So, what about displaying them with a colourful background? Report data is simple, will just include two rows, 'Station name' for first row and average idle time for the second row. It would be nice to change proportionally the background of the cell for idle time according to idle time. If smaller values are better, we can display minimum idle time in totally green, and maximum idle time in totally red. And the others may be proportionally colourized in a gradient:


Station 3 is totally red, so customer can easily understand the most unbalanced station is the third one and can give more operations to station 3.

Also a box plot report should be fine for idle times to see more details.

Efficiency of stations : There are loops in the assembly line and those loops are used for fine tuning of some products if necessary. Because of those fine tuning operations, some products visits same stations more than once and this decreases efficiency of course. 

So, customer wanted an efficiency calculation of station x as follows:

Efficiency of x =  100 x (Total products produced by last station / products produced by station x)

A gradient colourized report fits for this need.

Transfer times:  Customer wants to see how mechanical movements between stations limit the productivity. Box plot fits better. 

Now, lets see the structure that we can get by PLC:


Nearly, 2 or 3 records in a second. 

We decided to store them in database in two steps. At first step, we appended all records in to a text file and gave a name ending with date and hour, e.g.

LogFile08_11_15_13.dat

which includes all detailed information between 13:00:00 and 13:59:59

Next file name should be LogFile08_11_15_14.dat.

Then we developed an application for summarising the detailed data file for database, and inserting them into database. It was a scheduled task to run for every hour, summarising the data, inserting the summary records into database and finally copying the detailed data file into a zipped archive file.

And the summary included following fields:
  • Station number
  • Date
  • Hour
  • Number of products
  • Minimum of T1
  • Maximum of T1
  • Q1 of T1
  • Q3 of T1
  • Median of T1
  • Average of T1
  • Standard deviation of T1
  • And same calculations same as T1 for T2 and T3 time intervals.

Our database transaction seriously decreased from approximately 8500 records to 70 records hourly.

And overall cost of the project was not too much:
  • Half a day for PLC software modification
  • Quarter of a day for PC software development
  • Quarter of a day for PC summarising task application
  • One day for report web pages

However, customer was angry with us because the project was too easy and cheap to be as a default feature of the assembly line. What can I say, customer is always right. I am planning to add this system as a default feature if someone orders us an assembly line again.

Followers

Search This Blog

Comments

About Me

My photo
Automation engineer especially working on PC software development. Formerly I was coding on PLC, but now I am using mostly Visual Basic on PC.