280 likes | 446 Views
A benchmark for SoftPLC Technology in Windows Environment. Valerio Malerba. Università degli Studi Genova Facoltà di Ingegneria. Chiar.mo Prof. Ing. Paolo Pinceti Dott. Ing. Micaela Caserza Magro. What’s a benchmark.
E N D
A benchmark for SoftPLC Technology in Windows Environment Valerio Malerba Università degli Studi Genova Facoltà di Ingegneria Chiar.mo Prof. Ing. Paolo Pinceti Dott. Ing. Micaela Caserza Magro
What’s a benchmark A benchmark is a sequence of operations allowing to obtain a performance assessment of a system. Example! A program which evaluates the capability of a computer to perform additions by counting the number of operations executed in a while.
Benchmark: requirements A good benchmark satisfies the following requirements: • Linearity • Reliability • Repeatability • Easiness • Independence
A matter of measure A benchmark performs a measure. For a measure the following parameters are important: • Accuracy • Precision • Resolution
PLC (1) PLC (Programmable Logic Controller): is an industrial computer that runs periodically three phases aiming to control a manufacturing process. • Read input: the PLC reads the incoming variables from the system, such as levels, pressures and temperatures. • Elaboration: the PLC elaborates, following a program, the input and produces a new series of values or actions. • Update output: the PLC updates its output variables.
PLC (2) The PLC is a machine substantially… HARD REAL TIME
SoftPLC A SoftPLC is instead a PLC completely made via the use of a common personal computer. Despite of a traditional PLC, it offers some advantages: • Higher intergrability. • Possibility to write more complex programs. • Lower cost.
PLC and SoftPLC: languages PLC programs follow a standard, IEC 61131-3, which defines 5 languages: • Instruction List • Structured Text • Ladder • Function Block • Sequential Flow Chart
PLC and SoftPLC: difference The behaviour of a SoftPLC deeply depends by the operating system on which it runs: if the operating system is not a real-time one (e.g. Windows XP), the SoftPLC isn’t either… HARD REAL TIME
Purpose of the benchmark The goal of the benchmark is hence to assess the SoftPLC perfomances under the point of view of regularity of working. A second important purpose is to provide a tool to be used during the projecting phase of an industrial plant.
Used applications These a re the main applications used during the realization and use of the benchmark; Infoteam OpenPCS 2006 Infoteam SmartPLC/OPC
Used applications These a re the main applications used during the realization and use of the benchmark; Client OPC
OPC OPC (OLE for Process Control) : is a series of standards based on Microsoft DCOM regarding the communication among devices in an industrial network (sensors, PLCs, etc.). OPC
The network Complessively, the network which is affected by the benchmark is the following:
The benchmark (1) The main component of the benchmark is a SoftPLC program that measures its own times, allowing to get information about the overall performances. The language chosen for this duty is Instruction List. The reason is due to its low level programming and therefore its speed and lightness.
The benchmark (2) The program which gets the measure can be represented with a finite state machine:
Clock resolution The GETTIME function implemented by OpenPCS to detect the times strictly depends by the so-called Windows clock interval.
The time packet The time value is recorded inside a 32 bit variable with a resolution of 1ms.This supplies an overmuch range, which can be optimized by transforming the 32 bit variable into a true packet with three decimal fields. • Number of cycles: it’s the number of the current cycle. • Empty field: it’s a value that is kept at zero in order to improve the readability. • Time value: is the time elapsed since the program was launched.
Experiments During this thesis numberous tests have been conducted, under different conditions. Considered interesting for study are the cases with different processor occupation levels. Furthermore, being each element in the network a Windows process, various combinations of priority have been considered. In order to generate the occupation levels of the processor, a small software has been developed, called CPU Waster.
Metrics These are the used metrics to evaluate the performances of the network: • Mean period: is the average duration of a SoftPLC cycle. • Minimum and maximum: minimum and maximum duration of a PLC cycle; in particular, the maximum provides the worst case. • Variance: is the variance of a SoftPLC cycle. SoftPLC • Lost cycles: is the percentage of cycles which aren’t arrived to the OPC client. Server OPC
Results (1) Several preliminar tests have been made to measure the CPU occupation of each process involved in the network. The most interesting case is the OPC client: Server OPC with high priority Server OPC withlow priority
Results (2) The percentage of cycles lost by the OPC server increases with the the load but only when its priority is lower or equal to the other processes’ ones: Server OPC withhigh priority Server OPC with low priority
Results (3) The mean duration of a PLC cycle is almost constant with any load but changes a little depending by the combination of priorities: SoftPLC con high priority
Results – Other macchines Worthly of mentions are some properties due to different clock intervals on other machines:
Conclusions and future developments (1) The tests made show that, under proper conditions, the SoftPLC can satisfy the requests of a control system. • Multi-core architecture • Higher number of OPC clients • Altered update rate for the OPC server • Routine that weighs down the SoftPLC code • Adaptation of the benchmark to other platforms, different from OpenPCS
Conclusions and future developments (2) The benchmark can be extended to evaluate the performances of other elements in the network: