Write logic to get memory information, Get memory information from the controller – Rockwell Automation Logix5000 Controllers Controller Information and Status Programming Manual User Manual
Page 20

Chapter 2 Determine controller memory information
There are several ways to use logic to get memory information.
•
Get memory information from the controller on page 20
•
Choose the memory information on page 21
•
Convert INTs to a DINT on page 22
Get memory information from the controller
To get memory information from the controller, execute a Message (MSG)
instruction. The following table lists configuration information for the
instruction.
On this tab
For this item
Type or select
Which means
Configuration
Message Type
CIP Generic
Execute a Control and Information Protocol command.
Service Type
Custom
Create a CIP Generic message that is not available in the list.
Service Code
3
Read specific information about the controller (GetAttributeList service).
Class
72
Get information from the user memory object.
Instance
1
This object contains one instance.
Attribute
0
Null value.
Source Element
source_array of type SINT[12]
In this element
Enter
Which means
source_array[0]
5
Get 5 attributes.
source_array[1]
0
Null value.
source_array[2]
1
Get free memory.
source_array[3]
0
Null value.
source_array[4]
2
Get total memory.
source_array[5]
0
Null value.
source_array[6]
5
Get largest contiguous block of additional free logic memory.
source_array[7]
0
Null value.
source_array[8]
6
Get largest contiguous block of free I/O memory.
source_array[9]
0
Null value.
source_array[10]
7
Get largest contiguous block of free data and logic memory.
source_array[11]
0
Null value.
Source Length
12
Write 12 bytes (12 SINTs).
Destination
INT_array of type INT[29]
Communication
Path
1, slot_number_of_controller
Write Logic to Get Memory
Information
20
Rockwell Automation Publication 1756-PM015F-EN-P – October 2014