Easy question!

mjoha266

Member
Join Date
Jan 2008
Location
Gothenburg
Posts
34
Ok! So I just want to load i DINT with L (in stl)
like:

L DI [ar1, P#0.0]

But I can't find what it should stand instead of DI...

It's possible to write all kinds of types here ie. W, MW and so on, so does anyone fist of all know what it should be for a DINT and secondley is there any good list of what they all mean?

/Thanks
 
OK... So after a little bit more brain washing I solved it!
DBD

(from the S7 help: Summary of Bit, Byte, Word, and Double Word Identifiers)
 
Got stuck again... ok this is my code so far...

L 100
T #ActivePID
OPN DB [#ActivePID]
L P##RobPrgNumb
LAR1

L D [AR1,P#2.0]
LAR1

L DBD [AR1,P#0.0]
T #TmpPrgNumb

CALL "269_MoveNumberDINT"
InNumber :=#TmpPrgNumb
OutNumber:=#TmpOutNumb

L P##PrgNumbToRob
LAR1
L ?? [AR1,P#0.0] /Trying to read the DB numb. from the POINTER
T #TmpDBNumb
OPN DB [#TmpDBNumb]

L DBD [AR1,P#2.0]
LAR1
L #TmpOutNumb
T W [AR1,P#0.0] /The W here is just a guess...
So this is ok in the compile (except for the ??) but it dosn't work... any Ideas?
 
Hmm, ok this is how I solved it...

L P##PrgNumbToRob
LAR1
L W [AR1,P#0.0]
T #TmpDBNumb
OPN DB [#TmpDBNumb]

L D [AR1,P#2.0]
LAR1
L #TmpOutNumb
T DBD [AR1,P#0.0]

But still, DBD referes to a DWORD in a shared DB.
What then does D, W represent?
D: DWORD in the in/out interface? and W for Word? what is Bit and Byte then?
 
Last edited:
mjoha266 said:
But still, DBD referes to a DWORD in a shared DB.
What then does D, W represent?
D: DWORD in the in/out interface? and W for Word? what is Bit and Byte then?

L D[AR1,P#0.0] will load a double word from the area specified in AR1 (area crossing indirect addressing)

L DBD[AR1,P#0.0] will load a double word from a shared DB whose offset is specified in AR1 (area internal indirect addressing)

other examples:

L MW[AR1,P#0.0]
L DBW[AR1,P#0.0]
L W[AR1,P#0.0]

L MB[AR1,P#0.0]
L DBB[AR1,P#0.0]
L B[AR1,P#0.0]

A M[AR1,P#0.0]
A DBX[AR1,P#0.0]
A [AR1,P#0.0]
 

Similar Topics

I would like to do change a kinetix drive, so i believe i just have to put the IP address in the new kinetix and just connect right? Do I need to...
Replies
1
Views
1,192
Good afternoon guys, I have a basic question on the bubble level in the picture attached. This is probably really easy, but I don't get it, haha...
Replies
11
Views
3,325
Hey All. Im using Easybuilder pro. Im familiar with using the enable/disable function of the security tab on an object to use visibility. Im...
Replies
2
Views
2,070
First time FTV user. So, I'm sure someone can answer this. It's probably already on this board somewhere, but maybe I just don't know how to...
Replies
6
Views
3,336
I'm embarrassed in advance. It's been a while I touched RSLogix 500. Why am I not getting the internal coil (B3:100/0) come on when the rung is true?
Replies
8
Views
2,104
Back
Top Bottom