You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old May 19th, 2010, 07:27 AM   #1
Combo
Lifetime Supporting Member
Belgium

Combo is offline
 
Combo's Avatar
 
Join Date: Jul 2002
Location: Belgium
Posts: 2,229
S5 code to write to DB data

Hi,

As an S7 programmer I do miss some S5 knowledge. Especially in german.

S5DB.jpg

I need to write value 50 or 150 to DB101 var 11. As you can see the value is now 50, I guess that this can be overwritten with S5 code ?

This is what I want to write:

U E6.0
JCN =NEXT

A DB101
L 75
T DW 11
JU =END

NEXT:
A DB101
L 150
T DW 11
END:

But offcourse, some instructions are faulty. Can anyone help with this ? Thanks.

Kind Regards,
Gerry
  Reply With Quote
Old May 19th, 2010, 07:54 AM   #2
Jeebs
Member
Belgium

Jeebs is offline
 
Join Date: Feb 2007
Location: Leuven
Posts: 807
Code:
    U E6.0
    JCN =NEXT
 
    A DB101
    L KF +75
    T DW 11
    JU =END

NEXT: Something missing here. Either NOP 0 or you start directly with A DB101
    A DB101
    L KF +150  
    T DW 11
END: If this is the end of the block, then in stead of JU =END, use BEU. If you use JU, then you need to add NOP 0
Sure you can't change to English?
  Reply With Quote
Old May 19th, 2010, 08:14 AM   #3
Combo
Lifetime Supporting Member
Belgium

Combo is offline
 
Combo's Avatar
 
Join Date: Jul 2002
Location: Belgium
Posts: 2,229
...

I'm not sure, but I think I have installed S5 für Windows (german).

Found some code that illustrated a jump (SPB)

I think this will be better, but I'm not sure (BEU = BEB in german I think):

;A DB101

U E6.0
SPB =M001
L KF +75
T DW 11
BEB
M001:
L KF +150
T DW 11
BE

Last edited by Combo; May 19th, 2010 at 08:21 AM.
  Reply With Quote
Old May 19th, 2010, 08:22 AM   #4
Jeebs
Member
Belgium

Jeebs is offline
 
Join Date: Feb 2007
Location: Leuven
Posts: 807
Code:
    :A DB101
    :
    :U E6.0
    :SPB =M001
    :L KF +75
    :T DW 11
    :BEA
M001:L KF +150  
    :T DW 11
    :BE
That should work.
  Reply With Quote
Old May 19th, 2010, 08:24 AM   #5
Combo
Lifetime Supporting Member
Belgium

Combo is offline
 
Combo's Avatar
 
Join Date: Jul 2002
Location: Belgium
Posts: 2,229
Thanks

Thanks Jeebs !!

Quote:
Originally Posted by Jeebs View Post
Code:
    :A DB101
    :
    :U E6.0
    :SPB =M001
    :L KF +75
    :T DW 11
    :BEA
M001:L KF +150  
    :T DW 11
    :BE
That should work.
  Reply With Quote
Old May 20th, 2010, 01:21 PM   #6
Combo
Lifetime Supporting Member
Belgium

Combo is offline
 
Combo's Avatar
 
Join Date: Jul 2002
Location: Belgium
Posts: 2,229
Uploading OB251

I know that DB101 DW11 is a parameter that influences a PID speed. But I wanna know if it's the I parameter. I tried to upload OB251 (where the PID is written), but I couldn't. Should the CPU be in stop to upload this special block ?

Regards,
Gerry

Quote:
Originally Posted by Combo View Post
Thanks Jeebs !!
  Reply With Quote
Old May 20th, 2010, 04:09 PM   #7
L D[AR2,P#0.0]
Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 4,561
Which CPU are you using ? OB251 is usually an in-built function.
  Reply With Quote
Old May 20th, 2010, 04:25 PM   #8
Combo
Lifetime Supporting Member
Belgium

Combo is offline
 
Combo's Avatar
 
Join Date: Jul 2002
Location: Belgium
Posts: 2,229
95u

And what does that mean ?
There must be some PID blocks in the program, but I cannot find them. OB251 is the only block that I can't upload, that's why I think the PID is processed in there ... ?

Don't know S5 very well..

Quote:
Originally Posted by L D[AR2,P#0.0] View Post
Which CPU are you using ? OB251 is usually an in-built function.
  Reply With Quote
Old May 21st, 2010, 12:56 PM   #9
moggie
Lifetime Supporting Member
England

moggie is offline
 
moggie's Avatar
 
Join Date: Apr 2002
Location: Devon, England.
Posts: 530
OB251 is the PID Algorithm OB for S5-95U.
Look here -
http://support.automation.siemens.co...iew/en/1091648
  Reply With Quote
Old May 21st, 2010, 02:38 PM   #10
FARIAM
Member
Venezuela

FARIAM is offline
 
Join Date: Jan 2010
Location: Caracas
Posts: 42
Combo,

In the page 250 of the Manual moggie posted you will find the info about the OB251, which is the PID Control block for the S595U.

You can't upload the block, you just call it cyclically to make it work.

DW11 is the control word for the PID. Before calling the OB251, what you have to do is open (OPN in english, AUF in german) the DB you want as the parameter DB and change the corresponding values, based on the Table of the page 254.

Regards.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Extracting Tag Values from ControlLogix MajorFault LIVE PLC Questions And Answers 8 July 9th, 2009 10:22 AM
Confused "again" S7 indirect Thim LIVE PLC Questions And Answers 17 July 22nd, 2008 04:47 PM
between s5 c db and s7 opn db teh LIVE PLC Questions And Answers 3 July 4th, 2008 07:59 AM
between s5 c db and s7 opn db teh LIVE PLC Questions And Answers 15 July 3rd, 2008 08:11 PM
transfer data code from pc to omron plc ahmed yousri LIVE PLC Questions And Answers 0 March 13th, 2008 06:43 AM


All times are GMT -5. The time now is 03:38 PM.


.