Technical Forum

SIMATIC S5 / STEP 5

Help with this S5 code please

Erstellt von Sah1 am 19.07.2012 18:20 (2 Antworten)

« Vorheriges Thema Nächstes Thema »
Seite 1 von 1 (3 Objekte)
  19.07.2012, 18:20
Beigetreten am: 06.07.2012
Letzter Besuch: 19.07.2012
Beiträge: 4
Bewertung:
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
Would you please explain to me the operations that are going on in this function block?I am trying to understand these codes in S5 - 115U.



FB 12                                C:FURNACST.S5D                    LEN=65  
                                                                        Page   1
Segment  1
Name :NITROFLO
 
     :C   DB  35
     :A(
     :L   PW 152                    01
     :SRW      3                    01
     :L   KF +651                   01
     :>=F                           01
     :)                             01
     :JC  =M001
     :
     :L   PW 152
     :SRW      3
     :L   KF +635
     :<F
     :JC  =M002
     :
     :BEU
     :
M001 :
     :L   KF +1400
     :T   DW   9
     :JU  =M003
     :
M002 :
     :L   KF +800
     :T   DW   9
     :
M003 :
     :L   PW 158
     :SRW      3
     :L   KF +1126
     :>=F
     :JC  =M004
     :JU  =M005
     :
M004 :
     :L   KF +2000
     :T   DW   9
     :
M005 :JU  OB 251
     :JU  FB  49
Name :READPW
AI   :    PW 154
AO   :    DW  22
     :
     :
     :L   DW  48
     :SLW      4
     :                                           T PW210
     :BE

PW 152   = FIZO2ANAYL                 OXYGEN ANALYZER
PW 158   = FIZCOMBUST                 COMBUSTABLES ANALYZER
PW 154   = FIZINRTGSF                 INERT GAS FLOW


Thank you very much! laugh
Top
  19.07.2012, 19:15
Beigetreten am: 21.11.2007
Letzter Besuch: 23.05.2013
Beiträge: 539
Bewertung:
Bewertung: Exzellent [4,04 von 5 / 24 mal bewertet]. (24) 
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
Hello Sah1

This is a logic for Controlling a PID Loop ( In S5 100U / 95U ).
Here is a detailed Analysis of the program :

--------------------------------------------------------

FB 12                                C:FURNACST.S5D                    LEN=65  
                                                                        Page   1
Segment  1
Name :NITROFLO
 
     :C   DB  35                                   // Open DB 35
     :A(              
     :L   PW 152                    01             // Read AI Address 152
     :SRW      3                    01             // Remove Unnecessary Bits
     :L   KF +651                   01             // Check if AI Value >= 651
     :>=F                           01             // ( 100%=2048 so 651 = 31.78% )
     :)                             01
     :JC  =M001                                    // If "Yes" then Jump to Label M001
     :
     :L   PW 152                                   // Again Read the AI
     :SRW      3
     :L   KF +635                                  // Check if AI Value < 635 ( 30% )
     :<F
     :JC  =M002                                    // If "Yes" then Jump to Label M002
     :
     :BEU                                          // Uncondition Block END
     :
M001 :                                             // Label M001
     :L   KF +1400                                 // Load +1400
     :T   DW   9                                   // Transfer to DW 9 in DB35
     :JU  =M003                                    // Jump to Label M003
     :
M002 :                                             // Label M001
     :L   KF +800                                  // Load +800
     :T   DW   9                                   // Transfer to DW 9 in DB35
     :
M003 :
     :L   PW 158                                   // Read AI PW 158 Combus. Analyser
     :SRW      3
     :L   KF +1126                                 // Check if > 55%
     :>=F
     :JC  =M004                                    //  If yes the Jump to M004      
     :JU  =M005                                    // Else Jump toM005
     :
M004 :
     :L   KF +2000                                 // Transfer 2000 to DB35.DW9
     :T   DW   9
     :
M005 :JU  OB 251
     :JU  FB  49
Name :READPW
AI   :    PW 154
AO   :    DW  22
     :
     :
     :L   DW  48
     :SLW      4
     :                                           T PW210
     :BE

PW 152   = FIZO2ANAYL                 OXYGEN ANALYZER
PW 158   = FIZCOMBUST                 COMBUSTABLES ANALYZER
PW 154   = FIZINRTGSF                 INERT GAS FLOW

------------------------------------------------------

Summary of Operation :

The Program Calls OB251 ( Which was a PID Controller in S5 95U / 100U )

DB35 may be the POD DB. In that case DB35 DW9 is the Setpoint


If AI PW 152( Oxygen Analyser ) is >= 31.78% Then Transfer 1400 (68% ) to PID Setpoint

If AI PW 152 ( Oxygen Analyser ) is < 30% Then Transfer 800 (39% ) to PID Setpoint

 
If AI PW 158( Comb. Analyser ) is >55% Then Transfer 1400 (68% ) to PID Setpoint


Execute PID Loop

Connect AI PW 154 ( Inert Gas FLow ) to the PID Actual Value

Connect PID Loop Putput ( DW 48 ) to the ANalog O/P PW 210

------------------------------------------------------------

Hope this helps

Cheers

Navnag

 


There is no such thing as the last bug in a program
There are no stubborn bugs, There are only stubborn Debuggers.
Top
Für diesen Beitrag bedankt sich:
  19.07.2012, 19:38
Beigetreten am: 06.07.2012
Letzter Besuch: 19.07.2012
Beiträge: 4
Bewertung:
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
Thank you Navnag,
That was very helpful!

Sah.
Top
Seite 1 von 1 (3 Objekte)
Aktionen