S7-300 siemens - RLO STATE

naturephoenix

Member
Join Date
Jan 2015
Location
Vienn
Posts
181
I want to do something in STL if my bit is SET:

A L 19.0
= M50.0
R M50.1

is this the same

A L 19.0
OPN DB [#db_Num]
L P#DBX 0.0
LAR1
= M50.0
R M50.1

Question is would these 3 lines change the RLO state:
OPN DB [#db_Num]
L P#DBX 0.0
LAR1
?
 
No. But why would you mess it up by putting all that inbetween?

Kalle

Good question, well in STL
I have to very often work with 2 DBs

So I keep doing codes like this
OPN DB1
L P#DBX 0.0
LAR1

Here is 1 example
OPN DB488
L #state1
LAR1
L #state2
LAR2

ON [AR1,P#0.0]
ON [AR2,P#0.0]
= L 19.0
A L 19.0

JNB _007
OPN DB [#db_Num](DBs from 61 to 66)
L P#DBX 0.0
LAR1


= [AR1,P#0.0]
R [AR1,P#0.1]
...
...

_007: NOP 0

when i do something with another DB, then i do this
OPN DB2
L P#DBX 0.0
LAR1
 
Last edited:
To conditionally open the DB, you would have to put in a Jump after the first line.
 
Click on an instruction and then press F1, the help will tell you if the instruction affects the RLO.

If you are using FCs then you can make use of the two DB registers. You can also load address registers directly.

e.g.

2db.jpg
 

Similar Topics

Hi, I'm setting up a modbus master on an S7-300. It seems to work in OB1 but not when I use it in OB35. Does anyone have any ideas why? Could...
Replies
10
Views
140
Hello all. I have an ESA HMI that is connected to a Simatic S7-300 (CPU312). I have uploaded the program from the PLC which is written with Step7...
Replies
6
Views
1,494
Hello. There is a problem with Siemens S7 300. We got a replacement PLC but it does not run the program from the MMC. The new PLC is dated 2011...
Replies
3
Views
734
Hi to all, Our company does not usually use Siemens PLCs, but have a press with one in it. We are trying to change the IP address in our Simatic...
Replies
2
Views
1,089
G'day guys, I am setting up a s7-300 as a test rig for the workshop and when I downloaded the PLC is not going into run mode, I keep getting a...
Replies
35
Views
5,356
Back
Top Bottom