📜 ⬆️ ⬇️

How we started production, or my software development experience for a Siemens Simatic PLC

I would like to talk about my experience in commissioning and developing industrial software. When reading the article, please note that it happened almost two years ago, and since then much has changed.

So, in the early spring of 2014, I climbed to the third floor of the concrete mixing hub of one plant. I had at my disposal two Wiggert planetary concrete mixers, a Kubat targeted supply line for two mono-rails and a fully bombed shop downstairs into which concrete had to be delivered. In perspective.

What was the cunning plan? We had to start from scratch the production of hollow flooring in one bay of the workshop and wall panels in the other.
')
Here is what the hollow flooring looks like in a section:

image
Photos from echo.co.za

So, to test the concrete mixer, you need to put some successfully (or not) manufactured concrete. The option with ten Dzhamshutami was not considered, so you need to connect the address feed (AP). The mechanical part of the AP includes a pair of specially trained shuttles (kubels), rolling on a monorail, and a concrete distributor operating in a semi-automatic mode:



We begin to enjoy the Kubat documentation: the electrical part consists of a central control cabinet for 314-2DP, two ET200S stations (shuttles) and a CPU 313-2DP IFM (distributor), communicating via Powercom (analogue of Siemens PowerRail, i.e. RS-485 220 / 380V trolleys).



Oops, here are the first rakes: there are no software sources, and they are not foreseen. Okay, we reveal the passwords of the controllers with a special utility. With the dispenser, everything is more or less normal, but the central wreck is decompiled into a hearty porridge on STL, since Most of the program is written on the SFC is not clear what version.

Okay, not a question. To begin with, I send installers to prokidyvat communications along the monorails, connect power and install sensors, while I myself am looking at the diagram:



So, the inverter company Nord, controlled by Profibus. In our case it is used to power the drives of movement and rotation. Download the documentation, cheer up the control registers and write the code:

FUNCTION_BLOCK nord_control VAR_INPUT cmd:INT; //0 - fast stop //1 - smooth stop //2 - run to setpoint //3 - get info; setpoint:REAL; hw_addr:INT; END_VAR VAR_OUTPUT state:TNordInfo; END_VAR VAR_TEMP // Temporary Variables d: ARRAY [0..5] OF WORD; setpoint1:REAL; END_VAR VAR t:INT; c: WORD; s: WORD; cw AT c: TNord_CW; sw AT s: TNOrd_SW; st:WORD; END_VAR s:=IW[hw_addr]; //256 257 state word * state.sw:=sw; state.act_value1:=INT_TO_REAL(WORD_TO_INT(IW[hw_addr+2]))*50/16384;//258 259 state.act_value2:=INT_TO_REAL(WORD_TO_INT(IW[hw_addr+4]))*50/16384;//260 261 state.act_value3:=INT_TO_REAL(WORD_TO_INT(IW[hw_addr+6]))*50/16384;//262 263 state.w0:=IW[hw_addr+8];//264 265 state.w1:=IW[hw_addr+10];//266 267 // Statement Section CASE cmd OF 0: c:=0; cw.ack_err:=TRUE; //SWITCH OFF; cw.enable_op:=FALSE; cw.on1:=FALSE; cw.on2:=FALSE; cw.on3:=FALSE; cw.enable_op:=FALSE; cw.enable_ramp:=FALSE; cw.unfreeze_ramp:=FALSE; cw.en_setpoint:=FALSE; cw.pzd_valid:=FALSE; setpoint1:=0; t:=0; 1: cw.on1:=FALSE; 2: setpoint1:=setpoint; CASE t OF //run to setpoint 0: IF (sw.start_disabled=TRUE) THEN //wait for mains voltage t:=1; END_IF; 1: cw.on2:=TRUE; //switch to standby cw.on3:=TRUE; cw.enable_op:=TRUE; cw.enable_ramp:=TRUE; cw.unfreeze_ramp:=TRUE; cw.en_setpoint:=TRUE; cw.pzd_valid:=TRUE; cw.ack_err:=FALSE; IF (sw.ready=TRUE) AND //Wait for standby (sw.no_off2=TRUE) AND (sw.no_off2=TRUE) THEN //change to no_off3 t:=2; END_IF; 2: cw.on1:=TRUE; t:=3; END_CASE; END_CASE; IF cmd<3 THEN //Write data QW[hw_addr]:=c; st:=INT_TO_WORD(REAL_TO_INT((setpoint1*16384.0/50.0))); QW[hw_addr+2]:=INT_TO_WORD(REAL_TO_INT((setpoint1*16384.0/50.0))); END_IF; END_FUNCTION_BLOCK 

Oh, it seems the shuttle has gone, but, it seems, some joyful shouts are heard from below. With obscene howls, the installers try to escape along the crane tracks from the racing five-ton glands. Emergency turn off the power and make a break for the calculation of personnel.
It would be nice to have at least some visualization. OK, we make a small project for the touch panel.



Within a couple of weeks, I finish the rest of the program (there should be a picture about the owl), so that concrete could be delivered ... which is not there yet.

In the meantime, the concreting of thermal stands ends at the bottom and the Echo line can be reactivated. It's simple. Or almost easy. The machines have been standing in the rain and pigeon feces since 2008, the trolley and the slip-former, after oil filling and cleaning, start working normally, but the saw throws a full screen of errors and says that it will not go anywhere.



Good fellows from Deutschland are eager to help, but only for a few tens of thousands of euros. Rubles do not accept.
Well, download the program from the controller, trying to understand what it needs. Everything looks as if the two positioning axes are stuck. In principle, this is not surprising: the power modules in the two inverters are completely burnt out. Well, we order new Emerson Unidrive and, in order not to waste time, we return to the BSU for a sekas with planetary concrete mixers.

One Wiggert is already mounted, plugged in and seemingly even tested. However, as always, the devil is in the details (well, of course, except for the extremely curved air connection and electrical wiring).



Dosing inert goes well, fun, with an error of a kilogram of 500. I adjust the sensors of the opening of the dispensers, I set the amount of charge, the error decreases to 2-10 kg.

A couple of weeks come chastotniki. We put them in the cabinet, we carry out the transfer of settings (yes, there are still SM-Applications Plus modules with their own programs) and axis referencing.



Profit! You can begin to produce products. Of course, if you first choose the composition of concrete.

In general, everything ended happy ending and the line safely works to this day.

Source: https://habr.com/ru/post/274849/


All Articles