PLC programming principles

alex_kr

Member
Join Date
Apr 2013
Location
moscow
Posts
3
In dicussion with my chief he stated 5 layers of programming of plc.

Has anybody extended description of this approach:
1) request level
2) preset level
3) algoritm level
4) activitet level
5) i/o level

thanks in advance,
alex
 
Welcome to the forum,

I've always used a three layer model rather than 5 as described below in an extract from a technical suppliment I wrote for a Winder in 2001.

The PLC program has a 3 layer structure to perform its automation tasks:

· Layer 1 Automation / Process (The highest level).


· Layer 2 Logic / interlocks.


· Layer 3 Actual control.

All the higher level functions of the winder are in level 1. For example: the reelchange sequence may request the turret to rotate to a given position but it does not actually control the turret, it can only make a request for the turret to move.

The logic and interlocking functions are performed in layer 2. For example: the reelchange sequence might request “spindle A to winding position”. The turret routine (layer 2) will then request the layer 3 program to start the drive and give it a speed. When the turret is in the correct position, the turret program requests the drive to stop via the layer 3 program and reports to the layer 1 program that it’s request was completed.

Layer 1 Reelchange Sequence
Layer 2 Turret routine
Layer 3 Drive control
Drive / Motor

Some advantages of using this control philosophy are:

· Higher level functions are kept as simple as possible.


· Program is broken into smaller pieces which are easier to understand.


· Re-usable components can be generated e.g. the layer 3 program above is the same for all of the Siemens drives.


· De-bugging time is kept to a minimum because of simplicity of code.



· More stable programs as a result of the structured approach.

Nick
 
Nick, thanx.

Do you set more detailed separation on sublevels, or not?

And can you show more comprehensive example? Im using only Siemens, so fragments in Step7 would be excellent demonstration of your aproach.
 
Please expand

I'm entirely new to any programming

Are you saying that you locate these "layers" in separate sections of a *ladder logic program? * (insert language of your choice)

Some similarity to a "block"?
 
The example I gave of the turret control of a film winder is a real world example. The winder winds plastic film from a production line on to a one of two spindles that are mounted in a turret wheel assembly 180 degrees apart. When one spindle is full, the the machine turrets over and the plastic film is transferred to the other spindle automatically. The full reel is replaced by an empty core and the process continues.

The Level one program is a state sequence which exist as function block. The state sequence request the turret to move to pre-defined positions.

Sitting at level 2 is a further function that responds to the postion requests from level 1 and reports status back to level 1. The level 2 program also communicates with level 3 functions for drive control to start/stop the turret drive and determine the speed demand. It also uses the turret position provided by another level 3 function.

There are two level three functions involved in the process. The first is a function that communicates directly with the drive and performs tasks such as translating a start request from a higher level function to the actual control bits that the drive needs. The second level 3 function in this application interfaces to an absolute encoder and generates an absolute position in degrees for the turret.

Each function described above exists as a separate FC or FB within the program and signals are passed between them.

I hope that this makes some sense. The problem with rigid structures is that they don't fit all applications.

Nick
 
Last edited:
Actually I do like the five step process,
depending on actual program size.
when initialising - you know where the preset area is.
When Fault tracing, it is easy to find the inputs and outputs.
(I prefer the outputs to be in order and where possible rung comments to be inserted.
 

Similar Topics

Hello colleagues, Some time ago I started my adventure with programming. With your help and the courses, things are starting to come together...
Replies
13
Views
661
Dear All, I need a sample PLC program to count the output pulse of a mass flow meter so that a specific amount of mass (for example 100gm)can be...
Replies
2
Views
143
Hi Please I have zeilo smart relay #SR2A201BD but I don't have it's programming cable. Can I use any general usb/rs232 converter? Or need...
Replies
3
Views
130
Hi, Does anyone have thoughts or know of, can point in the right direction any published materials with a plumbing centric point of you explaining...
Replies
1
Views
161
@ All: what is your best guess on a potential range in increase in efficiency in % (i.e. saved programming hours, greater output, etc.) when...
Replies
5
Views
343
Back
Top Bottom