S5 code to write to DB data

userxyz

Member
Join Date
May 2002
Location
any
Posts
2,768
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
 
Code:
    U E6.0
    JCN =NEXT
 
    A DB101
    L KF +75
    T DW 11
    JU =END

NEXT: [COLOR=Red]Something missing here. Either NOP 0 or you start directly with A DB101[/COLOR]
    A DB101
    L KF +150  
    T DW 11
END: [COLOR=Red]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[/COLOR]
Sure you can't change to English?
 
...

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:
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.
 
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

Thanks Jeebs !!
 
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..

Which CPU are you using ? OB251 is usually an in-built function.
 
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.
 

Similar Topics

Hi, I dont have much expirience with VBA programing and I have an RSView32 Application that needs to write certain data to an SQL database, Im...
Replies
1
Views
12,040
Does anyone know what Key Code does? This is linked to the button called "Alarm Ack." I searched for device FFB4 in the code but couldn't find...
Replies
5
Views
2,128
Hi, complete novice here. GXDeveloper: I work in a test facility controlled by Q-series PLC. I want to do some self-training on ladder logic...
Replies
22
Views
4,166
Good Morning everyone, I need your help to rewrite the code or better way to write the code because honestly I didn't like how the code is right...
Replies
27
Views
8,038
Need good example/sample of aoi RSLogix5000 code to read&write through RS232 port on Need good example/sample of aoi RSLogix5000 code to...
Replies
0
Views
1,844
Back
Top Bottom