STL for S5

joko_suntoro

Member
Join Date
Nov 2006
Location
Bandung
Posts
2
Dear All

Could any body help me...

Im' not familiar with STL S5 (I have been accustomed using Ladder diagram), now I still get dificulty to understand STL like snipset such below one

:BLD 131
:AN T9
:L KT 25.0
:SE T9
:CU C1
:L C1
:T FY252
:A F252.0
:= F5.0
:A F252.1
:= F5.1
:A F252.2
:= F5.2
:A F252.3
:R C1


Could anybody makes me clear to understand that code (I feel so happy if you explain me with ladder).


My best regard


Joko Suntoro
 
Here's a ladder version but it's in Step 7. You should be able to see what is happening. The trick to get back to ladder is to re-create the logic using the ladder editor and then switch between ladder/stl representation to see what is going on and compare it with the original logic.

s7lad.JPG
 
:BLD 131 //bild = screen-instruction; normaly has nothing to do with
// the plc-program

:AN T9 // and not Timer 9
:L KT 25.0 // load time 25x (.3=x10s / .2=x1s / .1 =x0.1s /
// .0=x0.01s
:SE T9 // set einschalt = on-delay

:CU C1 // count up Counter1 (if AN T9)

:L C1 // load always countervalue-C1
:T FY252 // transfer always to flag (F) byte (Y) 252

:A F252.0 // and flag 252.0
:= F5.0 // equals flag 5.0

:A F252.1
:= F5.1

:A F252.2
:= F5.2

:A F252.3
:R C1 // reset counter C1 to zero


p.s. I'm half sleeping so if somebody see's an error...by my guest to correct me....I'm off to sleep:p


p.s. 2: I'm sleeping.ā˜Æ .. I did not see 'L D''s answer...šŸ¤žšŸ» I hope I get home in one piece...
 
Last edited:
:BLD 131 "Change to STL"
:AN T9 " and not timer 9"
:L KT 25.0 "load a constant of 250ms into timer
:SE T9 "Timer T9 start as extended pulse"
:CU C1 "Count up Counter 1"
:L C1 " load the value of counter 1 *BCD*
:T FY252 " transfer to flag byte 252" 250 to 255 are used as scratch area by siemens standard blocks"
:A F252.0 move the bcd value (4 bits) to flags 5.0-5.3
:= F5.0
:A F252.1
:= F5.1
:A F252.2
:= F5.2
:A F252.3
:R C1 "if count = 8 bit 3 of counter on then reset counter.

In stl you can create a segment (rung) upto 255 instructions long this will not convert into ladder, however if you insert a bld255 instruction after SE T9 & remove the BLD131 it will convert the timer bit into ladder in a seperate segment but you will have to make sure that the following segments if converted have the right rlo (result of logical operation i.e. A T9 CU C1 etc.
I once converted a program written entirely on an old 100u using the handheld into ladder by uploading into a PG then adding the bld255 instructions.
 

Similar Topics

i am new to simatic manager and i am trying to figure what this part do in the code : A I 5.6 = DB50.DBX 4.6...
Replies
3
Views
146
Hello everyone, can anyone help me with covert the STL code to ladder. Iam using plc s71200. A %DB1.DBX33.7 // angel of vaccum...
Replies
2
Views
230
Hello nice to meet you, im new in here, I'm currently trying to convert code written in STL for a S7-400 to SCL for an S7-1500, because when i run...
Replies
5
Views
381
First off thank you in advance. Second I am very new to STL. I am trying to build a counter that has one count up and 23 count down options. Am...
Replies
6
Views
403
Hi Siemens Experts, I am hoping someone can shed some light on my issue. I have uploaded the code from a S7-300 (317-2PN/DP) using Step 7...
Replies
9
Views
743
Back
Top Bottom