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,737
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
4,017
🙃 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,658
Hi Everyone, I am facing an issue while installing the STUDIO 5000 in my windows 10 PC. During installation I am getting an error that " Error...
Replies
2
Views
40
I am connecting to a remote device. When attempting to upload I receive an error that states: Error: Auto_Functions: The Import was aborted due...
Replies
3
Views
137
Back
Top Bottom