Studio 5000 Indirect Addressing

RobWad

Member
Join Date
Jun 2012
Location
Muskegon
Posts
27
Can someone explain to me the AND-16, and the AND 15 part of this indirect addressing? Thank you for any input.

B18[(N57_34 AND -16)/16].[N57_34 AND 15]
 
They are masks.
15 = 0000 0000 0000 1111
-16 = 1111 1111 1111 0000


In one case, looking at only the low 4 bits of the word, in the other case, looking at only the high 12 bits of the word.
 
Ahh thank you. It makes sense now. lol. This particular program was converted from a plc5 using the converter. Indirect logic is done differently in studio 5000 compared to the ole plc5 days. Thanks again.
 
Can someone explain to me the AND-16, and the AND 15 part of this indirect addressing? Thank you for any input.

B18[(N57_34 AND -16)/16].[N57_34 AND 15]






Sidebar: in some environments (e.g. MicroLogix 1xxx/RSLogix 500), that is equivalent to


Code:
B18[0].[N57_34]


OR


B18[0].[N57_34 AND 2147483647]
Also, the -16 should be positive and at most 2147482632 (0111 1111 1111 0000), because

  1. I doubt B18 has 16Melements, or even 8Melements.
  2. Dividing a negative number, which is what N57_34 will be if its MSBit is 1, by 16 will cause a fault, I think.
 

Similar Topics

I have upgraded an old RS500 project to Studio 5000, it has thrown multiple errors which I am currently working through. I have looked through...
Replies
8
Views
1,724
All, I have a question on Indirect addressing, is it possible to use two bits to indirectly address in Studio5000 or do you have to use multiple...
Replies
10
Views
3,993
🙃 I have been scratching my head for a couple of days on this issue. I am in the process of converting a program from rs500 to Studio 5000...
Replies
7
Views
5,633
Hi Everyone. Not posted on here for a long time, but I am hoping someone can help me. I am doing a differential pressure calculation in a L27ERM...
Replies
15
Views
237
Hi, how do I convert 2x Integer registers to a Real? The two integers are from Modbus registers that contain a floating point value, I need to...
Replies
2
Views
119
Back
Top Bottom