S5 program help

srik

Member
Join Date
Sep 2005
Location
hyderabad
Posts
104
I know the PLC program in Ladder/Functional block only. However I seen the S5 program in statement list. How can I able to understand the statement list? and also Iam new to Siemens PLCS..

The program as follows.Can any one help me to understand the logic?
Advanced thanks.

Segment 1
:C -DB39
:L DD 30
: KG +4000000+3
::G
:C -DB6
:T DD 24
:
:
:C -DB6
:L DD 234
:L KG +1000000+3
:XG
:C -DB39
:T DD 33
:
:C -DB6
:L DD 236
: KG +100000+3
:XG
:C -DB39
:T DD 72
:
:C -DB6
:AN D 233.0
:C -DB39
:= D 40.8
:
:C -DB7
:L DD 70
:C -DB39
:T DD 79

***
 
:C -DB39 //call DB39
:L DD 30 //load data double word 30
: KG +4000000+3 //'L KG' load constant value (K=Konstante) real (G=gleitpunkt) +4.0+3 = 4.0*10 to the power of 3 = 4.0*1000
::G //divide real-numbers
:C -DB6 //call DB6
:T DD 24 //transfert to data double word 24
:
:
:C -DB6
:L DD 234
:L KG +1000000+3
:XG //XG ? multiply real-numbers
:C -DB39
:T DD 33
:
:C -DB6
:L DD 236
: KG +100000+3
:XG
:C -DB39
:T DD 72
:
:C -DB6
:AN D 233.0 //and not
:C -DB39
:= D 40.8 //if D233.0 is true then D40.8 is true
:
:C -DB7
:L DD 70
:C -DB39
:T DD 79
 
:C -DB39 //call DB39
:L DD 30 //load data double word 30
:L KG +4000000+3 //'L KG' load constant value (K=Konstante) real (G=gleitpunkt) +0.4+3 = 0.4*10 to the power of 3 = 0.4*1000 = 400.0!!!
::G //divide real-numbers
:C -DB6 //call DB6
:T DD 24 //transfert to data double word 24 of DB6
:
:
:C -DB6
:L DD 234 //Load data double word 234 of DB6
:L KG +1000000+3 //Load +0.1E+3 = 100.0
:XG //XG ? multiply real-numbers <- OK
:C -DB39
:T DD 33 //Store the result (DB6.DD234 * 100.0) in data double word 33 of DB39
:
:C -DB6
:L DD 236 //Load data double word 236 of DB6
:L KG +100000+3
:XG //Multiply by 100.0
:C -DB39
:T DD 72 //STore in data double word of DB39
:
:C -DB6
:AN D 233.0 //and not data bit 233.0 of DB6
:C -DB39
:= D 40.8 //if D233.0 in DB6 is false then D40.8 in DB39 is true
:
:C -DB7
:L DD 70
:C -DB39
:T DD 79 // Copy data double word 70 of DB7 to data double word 79 in DB39


Real numbers are entered in a special way in S5: only the mantissa is entered and the exponent. The number is then interpreted as being of the form: 0.mantissa * 10exponent, e.g. KG +1234567+3 is to be read as +0.1234567*10+3 or 0.1234567 * 1000 = 123.4567.

Kind regards,
 
Please find the following link
for programing manual

www.fer.hr/_download/repository/S7_300_STL_programming_manual.pdf
 

Similar Topics

Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
6
Views
55
I am completely stuck on building a ladder program that requires a start button to be pressed 3 times to turn on motor 1. Then motor 2 starts...
Replies
20
Views
513
Hi all, I’m new to programming and want to write a simple routine. Push start button, turns on sensor. 2 second delay before anymore logic read...
Replies
1
Views
318
Hi! I need help converting an old MicroLogix 1100 project to Micro 820. Project Details I have an old MicroLogix 1100 program that has been in...
Replies
0
Views
465
Hello friends. I need to write a program. This is exactly what is asked of me: When Sensor 1 and Sensor 2 give output, it will allow Robot to...
Replies
3
Views
945
Back
Top Bottom