L(local data), Inderect adressing.

SapherJalt

Member
Join Date
Jul 2016
Location
Kamchatka
Posts
4
Siemens S7-300

Hello! i'm new in PLC and have some questions.
1 question.

How i can read this:
L DW#16#84000000
Decimal number unsigned.

Can, someone, explain it across bits?
for example:
1111 0000 0101 0101 0001 1110 1100 0010 - this style

And this:
L2# *bit combination*
L# 103


2 question.

L P#0.0
T MW 20
A m0.0
L mw 20
+ 2
T mw20

Why not increase during the cycle?

3 question.

How many loops i can use with LOOP:*marker*
Where i can find math for measuring?

4 question.

In FB, first command is
= L 96.1
L DIW [AR2,P#14.0]
T LW 98

But the sytem data of FB (Input/OutPut/In_Out/Stat/Temp) have no adress of memory more than 96.
For exmple:
The max adress in TEMP is 94.0 with length 2 bytes -> 96 bytes.
Where i can find 96.1? 98? Or we use it just for saving temp values and will use it later? (just for storage)

Also, i don't see the mention about this local data in Reference data. Just see that the max length of the FB is 140 bytes

L DIW[AR2,P#14.0] how i can recognize this?
I have no direct declaration for start adress in AR2.
Or it's just pointer which shows that we load in ACCU1 the DI(numer of DI).W14.0? But what the numer of DI?
As i see from the book about inderect adressing:

L P#M0.0 //Load ACCU1 with pointer value
LAR1 //Load AR1 with pointer in ACCU1
L W [AR1, P#10.0] //Load the word whose address is determined by the contents of AR1 plus 10 bytes (MW10) into ACCU1
here i see that we load L P#M0.0 in Accu1, then we load in AR1.

But where i can find or recognize the loaded pointer value for AR2?
remeber the code:
= L 96.1
L DIW [AR2,P#14.0]
T LW 98
TAK
OPN DB [LW 98]
L DID [AR2,P#16.0]
LAR1
TAK
L D [AR1,P#0.0]
T #temp_status.PV
L DIW [AR2,P#14.0]
T LW 98
TAK

Help, pls!
 
Last edited:
None of your questions are related to indirect addressing of local data. Start again with one question at a time.
 
.. no indirect addressing of local data there, or is your thread title referring to two separate items; 1. local data, 2. indirect addressing. As already said, keep to one question per thread, digest and understand and then move on to the next.
 

Similar Topics

Hi all, I am trying to read the opc data's of 5000 Code from a remote plc to a local plc. In that local PC rslinx enterprise was installed , in...
Replies
0
Views
2,828
Hi everyone, I'm in the process of (learning) tiding up an s7 project and came accross a small problem. In the attached image is a flip flop for...
Replies
7
Views
2,704
Hi I have the attached code and am testing it using PLC SIM. The PLC goes to STOP mode with an "Error when allocating local data", requested...
Replies
6
Views
3,961
This may sound academic, but just for the sake of my understanding, I would like to copy the fixed part of local variables in for instance...
Replies
2
Views
1,634
Hi I've just been analysing a crash on an S7-414, which was caused by the error "Error when allocating local data" Looking at the Stack...
Replies
5
Views
3,277
Back
Top Bottom