S5-STL again

Watt

Member
Join Date
Jan 2006
Location
Bangkok
Posts
25
Hello anybody.
Im a PLC beginning.I need help form anybody in this board.
I have STL Code but comment it type German.I dont know the STL code
and i can not read comment if possible please help me.What this STL code Mean?

Best Regards
Watt
 
Network 1

:A -DB 50

:

:L -PW 152

:SLW 1

:SRW 4

:T DW 150

:L DW 151

::F

:T DW 46

:

:L -EB 12

:T DW 61

:L KF +5

:<=F

:SPB=M001

:

:L DW 61

:L KF +10

:>=F

:SPB=M001

:

:L DW 61

:B DW 61

:L DW 0

:T DW 5

M001:

:L DW 50

:SLW 4

:T DW 153

:

: L DW 153

: L DW 154

::F

:T DW 155

:

: L DW 155

: L DW 5

:-F

:L DW 140

:+F

:L KF +10

:-F

:T DW 45

:

:L KF+0

:>F

:SPB =M002

:L KF+0

:T DW 45

:

M002 :L DW 45

:L KF +35

:<=F

:SPB =M003

:L KF +35

:T DW 45

:

M003 :

:L DW 160

:L KF +22

:+F

:L DW 162

::F

:T DW 47

:

:L DW 160

:L DW 157

:XF

:T DW 158

:

:L DW 158

:T -PW200

:***

























 
Network 1
:A -DB 50 Open what should be DB50
:
:L -PW 152 Load what should be PW 152
:SLW 1 Shift the word left 1 pos (multiply by 2)
:SRW 4 Shift the word right 3 pos (divide by 8)
:T DW 150 Store the result in DW150
:L DW 151 Load DW150
::F Divide
:T DW 46 Store in DW46
:
:L -EB 12 Load what should be IB12
:T DW 61 and copy it to DW51
:L KF +5
:<=F if this is less than or equal to 5
:SPB=M001 jump to M001
:
:L DW 61
:L KF +10
:>=F if DW61 is greater than or equal to 10
:SPB=M001 jump also to M001
: this is only executed if 5 < DW61 < 10
:L DW 61 this instruction is not needed!!
:B DW 61 use DW61 as index
:L DW 0 load DW[DW61]
:T DW 5 store in DW5
M001:
:L DW 50 take DW50
:SLW 4 shift left 4 pos (multiply by 16)
:T DW 153 store in DW153
:
: L DW 153
: L DW 154
::F
:T DW 155 DW155 = DW153 / DW154
:
: L DW 155
: L DW 5
:-F DW155 - DW5
:L DW 140
:+F DW155 - DW5 + DW140
:L KF +10
:-F
:T DW 45 DW45 = DW155 - DW5 + DW140 - 10
:
:L KF+0
:>F if DW45 > 0
:SPB =M002 jump to M002
:L KF+0
:T DW 45 Store 0 in DW45
:
M002 :L DW 45
:L KF +35
:<=F if DW45 >= 35
:SPB =M003 jump to M003
:L KF +35 Store 35 in DW45
:T DW 45
:
M003 : at this point 0 <= DW45 <= 35
:L DW 160
:L KF +22
:+F DW160 +22
:L DW 162
::F
:T DW 47 = (DW160 +22) / DW162
:
:L DW 160
:L DW 157
:XF
:T DW 158 = DW160 * DW157
:
:L DW 158 Store DW158 in what should be PW200
:T -PW200
:***

 
Anyone know of a link to a siemens page that gives the list of operations? I have a little booklet 6ES5997-3UA22 that I use to look up Step 5 instructions.
 
Simon

I have the booklet for the 115U (6ES5 997-7LA21), which is probably very similar to the one you have.

A search on the Siemens site for part number 6ES5997 turns up a few documents in the manuals section, these are the reference guides for the various S5 CPU's available.

Paul
 

Similar Topics

Hi, I need to create a FC/FB to sort through DB error messages and prioritise them in the order of Importance. the values generated(x5)...
Replies
15
Views
4,483
Hi, I need to add some code to an existing program to provide error messages for all sensor faults. The address range of the sensors are M140.0 ->...
Replies
54
Views
7,927
Hi, I'm trying to write a FB which shows daily shift performance. Instead of just displaying everything, i want to increment/decrement the day to...
Replies
3
Views
1,780
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
175
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
267
Back
Top Bottom