AR2 in multi-instance

s7user

Member
Join Date
Sep 2005
Location
Taiwan
Posts
14
Example_1:
TAR2 #AR2_TMP
L P##VARIABLE
TAR2
+D
LAR1

A [AR1,P#0.6] //operate with bit
L B[AR1,P#0.0] //load 1st BYTE
L W[AR1,P#1.0] //LOAD WORD
L D[AR1,P#3.0] //load double word

LAR2 #AR2_TMP

Example_2:
TAR2
T #AR2_TMP
L P##VARIABLE
+AR2

A [AR2,P#0.6] //operate with bit
L B[AR2,P#0.0] //load 1st BYTE
L W[AR2,P#1.0] //LOAD WORD
L D[AR2,P#3.0] //load double word

LAR2 #AR2_TMP

Is the cross-area of AR2 empty?

31---------24---18---------------2------0
cross-area byte address bit address


Doesn't +AR2 command affect cross-area ?
 
What do you mw=ean by

A [AR1,P#0.6] //operate with bit
L B[AR1,P#0.0] //load 1st BYTE
L W[AR1,P#1.0] //LOAD WORD
L D[AR1,P#3.0] //load double word

//operate with bit ??

L and T instructions are unconditional, the 'A [AR1,P#0.6]' part does nothing.
 
No. Here's the help on +AR2 (put the cursor on the instruction and then hit F1 for the help)
Thanks,
This is my question and you answer another.
I pess upper arrow+question mark icon and move to instruction.
I cann't get my need help.:)
 
What do you mw=ean by

A [AR1,P#0.6] //operate with bit
L B[AR1,P#0.0] //load 1st BYTE
L W[AR1,P#1.0] //LOAD WORD
L D[AR1,P#3.0] //load double word

//operate with bit ??

L and T instructions are unconditional, the 'A [AR1,P#0.6]' part does nothing.
Hi, PeterW
I want to show bit,byte,word,double word access method.
 

Similar Topics

Hi All, I have a question regarding the population of AR2 when a multi instance FB is called. Would I be correct in thinking that the value...
Replies
10
Views
4,007
Hi, I have silly question(try to understand Pointer Application) can someone explain this below question. OPN DI10 A DB5.VAR76 FN...
Replies
0
Views
1,238
I am looking for some advice on this FC I just wrote. I have trace numbers that are constantly moved and want to verify that they match. They are...
Replies
7
Views
5,112
Hello I wrote this piece of code to do indirect adressing for a DB using both AR1 and AR2. When I run this code in a FB for situation #Drive_No =...
Replies
5
Views
4,276
I see you approaching 1000 posts again, does this mean morphing once more :D.
Replies
6
Views
2,878
Back
Top Bottom