università di genova facoltà di ingegneria genova 28 settembre 2007 a benchmark for softplc...
TRANSCRIPT
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
Genova 28 settembre 2007
A benchmark for SoftPLC Technology in Windows
EnvironmentValerio Malerba
Università degli Studi Genova Facoltà di Ingegneria
Chiar.mo Prof. Ing. Paolo PincetiDott. Ing. Micaela Caserza Magro
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
What’s a benchmark
Genova 28 settembre 2007
A benchmark is a sequence of operations allowing to obtain a performance assessment of a system.
A program which evaluates the capability of a computer to perform additions by counting the number of operations executed in a while.
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
Benchmark: requirements
Genova 28 settembre 2007
A good benchmark satisfies the following requirements:
• Linearity• Reliability• Repeatability• Easiness• Independence
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
A matter of measure
Genova 28 settembre 2007
A benchmark performs a measure.For a measure the following parameters are important:
• Accuracy• Precision• Resolution
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
PLC (1)
Genova 28 settembre 2007
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.
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
PLC (2)
Genova 28 settembre 2007
The PLC is a machine substantially…
HARDREALTIME
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
SoftPLC
Genova 28 settembre 2007
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.
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
PLC and SoftPLC: languages
Genova 28 settembre 2007
PLC programs follow a standard, IEC 61131-3, which defines 5 languages:
• Instruction List
• Function Block
• Structured Text
• Ladder
• Sequential Flow Chart
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
PLC and SoftPLC: difference
Genova 28 settembre 2007
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…
HARDREALTIME
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
Purpose of the benchmark
Genova 28 settembre 2007
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.
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
Used applications
Genova 28 settembre 2007
These a re the main applications used during the realization and use of the benchmark;
Infoteam OpenPCS 2006Infoteam SmartPLC/OPC
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
Used applications
Genova 28 settembre 2007
Client OPC
These a re the main applications used during the realization and use of the benchmark;
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
OPC
Genova 28 settembre 2007
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
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
The network
Genova 28 settembre 2007
Complessively, the network which is affected by the benchmark is the following:
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
The benchmark (1)
Genova 28 settembre 2007
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.
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
The benchmark (2)
Genova 28 settembre 2007
The program which gets the measure can be represented with a finite state machine:
TPROCESSTIN TOUT
Time
PLC cycle n.1
TOUT TPROCESSTIN TOUT
PLC cycle n.2
TIN
t1 t2
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
Clock resolution
Genova 28 settembre 2007
The GETTIME function implemented by OpenPCS to detect the times strictly depends by the so-called Windows clock interval.
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
The time packet
Genova 28 settembre 2007
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.
1 105
Number of cycles
Time value
• 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.
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
Experiments
Genova 28 settembre 2007
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.
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
Metrics
Genova 28 settembre 2007
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.
• Lost cycles: is the percentage of cycles which aren’t arrived to the OPC client.
SoftPLC
SoftPLC
Server O
PC
Server O
PC
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
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 low priority
Server OPC with high priority
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
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 with high priority
Server OPC with low priority
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
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
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
Results – Timer mode
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
Results – Other macchines
Worthly of mentions are some properties due to different clock intervals on other machines:
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
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
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
Conclusions and future developments (2)
The benchmark can be extended to evaluate the performances of other elements in the network:
PC
Profibus
Wago Input
Wago Output
infoteam
Woodhead
Smart PLC (SoftPLC)
InternetProsys OPC Test Client
HMI
Web Server
4
3
1
2
5 6
7
8
9
Università di GenovaFacoltà di Ingegneria
Ex falso
quodlibet
MAI LabMeasurement & Automation forIndustry
THANK YOU!