We want to thermostat the dressing room by setting a setpoint between 20 and 25 degrees Celsius. Sensor in the system is a PT100 that acquire the temperature. A finder interface with analog voltage output, operating range is 0-10V to be scaled in 0-250 degrees centigrade is connected between PT100 and PLC analog input. basic.
It is available a PLC Siemens S7-1200 model AC/DC/RLY and a HMI model KTP400 basic.
Creating a new project in TIA Porta V15 enviroment
In the next step is necessary to configure the devices in the profinet net.
Insert in the “Network view” a CPU and a HMI, so interconnet it, using drag and drops, the ethernet connector. In aour specific case is assigned IP 220.127.116.11 and 192.168.0.3
The Profinet and the dedigned devices must appear like these:
In the “project tree” is necessary to create a minimal program structure where there are a main program (cycle OB1), a Data Block where to store data and exchange it with the HMI tags, and a function where to implement normalization and value scale.
Inside the cycle block OB1 (main program), there is a unconditional call to the function FC1.
Normalization and scaled are performed in FC1
The analogue signal normalization chain has two steps,The fist one put the value in percent of the total range, in the second the unit of measurement is assigned.
The standard saturation numerica value, for siemens analog channels is ever the number 27648. It mean, for 4-20mA the numeber is 20ma, for 0-10V it mean 10V, for bipolar +/-5V or ever +/-10V the value 27648 express the +5V and +10V respectively.
To clarify, the normalization transforms the numeric image of 0V into 0.0, which has direct correspondence with 0%.
similarly the number 27648, which corresponds to the full scale, which corresponds to 100%. This value becomes 1.0.
Both values 0.0 and 1.0 are necessarily expressed as real 32-bit numbers. This results in a type transformation by the NORMX block.
The normalized value is downloaded into a REAL variable inside the DB1. The same number is used as input for the SCALEX command. This value can move between the minimum and the boulders of the available sensor engineering scale. This range is shown in the sensor databook.
The image shows a converter for PT100 in the range 0-50 °C.
In the HMI side, the numeric field in which to display the temperature in the XX.X or XXX.X format must be show. The use of a sample thermometer, and a forced temperature change, are necessary to calibrate the instrument.
download the draft of the exercise-> Rest room termostat_1
The implementation on the touch panel side of the temperature setpoint setting buttons is left as a useful exercise. Insights and use of the PID block can be found in the textbook of the teacher Marco Gottardo for sale on Amazon.
The whole project, with extensive explanations, is found in the two textbooks on sale on www.lulu.com and on Amazon visible below. Text is in Italian but Step 7 programming and procedure can be well understand in any languages due to high number of figures explanation.
Let’s Program a PLC!!! Esercizi di programmazione in TIA Portal V15 S7-1200/1500: quarta edizione 2018 (pubblicazioni di automazione industriale) (Volume 2) (Italian Edition) (Italian) Paperback – July 27, 2018
by dott Marco Gottardo PhD (Author)
- Language: Italian
- ISBN-10: 1724436465
- ISBN-13: 978-1724436467
Advanced PLC Programming ediz.2018
Advanced PLC programming ed.2018: Pubblicazioni di Automazione Industriale (Volume 3) (Italian Edition) (Italian) Paperback – July 27, 2018
by dott Marco Gottardo PhD (Author)