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,720
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,937
🙃 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,626
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
85
What is the best way to extract the hour and minute from the register that comes from Yaskawa VFD. In studio 5000 I have a register saved as INT...
Replies
3
Views
93
Back
Top Bottom