Siemens step7 - why you need SLD 3 before loading word into AR1 as a pointer?

plcnoob69

Member
Join Date
Jun 2023
Location
Nigeria
Posts
30
I have a word in some DB which I want to load to AR1 and use as a pointer. In order to do this I need to write

L DBxy.DBW xy
SLD 3
LAR1

I understand what SLD 3 does, but can someone explain a bit more why this is necessary? And in general, when else can this SLD command be useful?
 
AR is pointer.
Pointer is pointing to byte address + 8 bit fields.
SLD 3 shift these 8 bits. (three first bits)


If you don't shift 3 then you point to bit field instead of full byte area.
 
Bit level (No SLD 3 command)
OPN DB100
L DW 10 // (let assume that value of DB100.DB10 = 5
LAR 1 // [FONT=&quot]/Load AR1 with pointer in ACCU1 (0.5)[/FONT]
A I [AR1, P#0.0] //Check input I0.5 indirectly



Byte level
OPN DB100
L DW 10 // (let assume that value of DB100.DB10 = 5
SLD 3 // SLD 3 == multiple by 8.
LAR 1 // [FONT=&quot]/Load AR1 with pointer value (5.0)[/FONT]
A I [AR1, P#0.0] //Check input I5.0 indirectly
 

Similar Topics

This is the first time I am working with Simatic Manager Step7 as I started my siemens journey with TIA which is pretty easy and do a lot of stuff...
Replies
3
Views
146
When you download a DB, the values get overwritten by what is in the "actual" column in offline DB. Does this happen at the start of the PLC...
Replies
6
Views
142
Hi, I received a Step7 Backup from my client and tried opening this backup but it won't open as there seems to be files missing from the backup...
Replies
11
Views
3,016
Hi! i'm just wondering did there is any chance to change Set Time(TV) on Siemens plc timer without step 7 using c# or python if timer not set in...
Replies
1
Views
1,247
I'm using a 3rd party USB to MPI adapter cable. I can see 157 blocks of various types listed under Accessible Nodes in Simatic Manager. The Upload...
Replies
28
Views
8,205
Back
Top Bottom