S7 Pointer Help

If you follow the load with
Code:
LAR1

the monitoring display on the right for AR1 will show DIX?.0 indicating the start address for this instance of the FB
 
Code:
	 LAR1 P##Stat_Rob_RX_Buffer	 //point to start of buffer
	 TAR2						 //get current instance base address
	 +AR1						 //compute absolute base address
	 L	 240					 //fill 240 bytes
Loop: T	 #iCount				 //update loop count (temp variable)
	 L	 #byFillValue			 //get fill value (byte)
	 T	 B [AR1,P#0.0]			//write to buffer
	 +AR1 P#1.0					 //inc to next byte in buffer
	 L	 #iCount				 //test for end of loop
	 LOOP Loop					 //loop for all bytes
 

Similar Topics

i write code STL and simulate but result Q2.7 not set , i dont know why :scratch: , help me plz thanks LAR1 P#Q2.7 S [AR1,P#0.0] or LAR P#2.7...
Replies
3
Views
1,717
Hi Folks, I'm having problems completing a FB and suspect my pointer programming maybe the issue. The purpose of the FB is to transfer a...
Replies
13
Views
10,647
I just want to set db2.dbx0.0 when q100.0 is on, just trying to learn pointer. Please help what i m doing wrong. thank for help..... L 2...
Replies
8
Views
1,662
Hi all, I have the following FC: FC100 INPUT TRACK_NR := dint FUNCTIE_NR := dint BITJE := bool INPUT/OUTPUT FUNCTIE_WOORDEN :=...
Replies
5
Views
2,058
Hi I am looking into code to set a block of 8 booleans within a datablock, depending on the condition of 8 'flags'. The start bit of the 8 bools...
Replies
13
Views
3,588
Back
Top Bottom