0% found this document useful (0 votes)
10 views

Get Memory Data

Uploaded by

Gowri Shankar
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Get Memory Data

Uploaded by

Gowri Shankar
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 6

Page 1of 6

Getting Controller Memory Properties Without Using OPC Creation Date:


5-10-02
Test Client
Getting Controller Memory Properties Without Using OPC Test Client

DISCLAIMER
Because of the variety of uses for this information, the user of and those responsible for applying this
information must satisfy themselves as to the acceptability of each application and use of the
program. In no event will Allen-Bradley Company be responsible or liable for indirect or
consequential damages resulting from the use or application of this information.

The illustrations, charts and examples shown in this application note are intended solely to illustrate
the principles of programmable controllers and some of the methods used to apply them. Particularly
because of the many variables and requirements associated with any particular installation, Allen-
Bradley Company cannot assume responsibility or liability for actual use based upon the illustrations
used and applications.

Allen-Bradley Company assumes no patent liability with respect to use of information, circuits,
equipment, or software described in this text.

Reproduction of the contents of the application note, in whole or in part, without the express written
consent of the Allen-Bradley Company is prohibited.

Software and Firmware Used

All examples shown were developed using RSLogix5000 Version 10.0.

Document Purpose

This document is not a manual or training material, but an Application Note, which could be useful in
helping a Rockwell Automation customer get memory utilization numbers from a Logix Controller
without having to use OPC test client

Intended Audience

This document is to be used by Rockwell Automation employees/customers supporting and selling


Logix based controllers.

V2.0
Page 2of 6

Concept of Application Note


This application is used to allow a Logix Controller to get the same data about memory utilization that
you can get thru the OPC test client. The data is:

1. Free memory for I/O, unused I/O memory


2. Free memory for Data Table, unused data table memory, not applicable for L1
3. Free memory General, unused general memory, only applicable for L55M16
4. Free memory, total unused memory, the sum of 1 thru 3
5. Total memory for I/O, total available I/O memory
6. Total memory for Data Table, total available data table memory, not applicable for L1
7. Total memory General, total available general memory, only applicable for L55M16
8. Total memory, total available memory, sum of 5 thru 7

Note: Free Memory General and Total Memory General will be zero unless you are using an L55M16
processor.

Also, this application is used to get data about the maximum available memory size in each memory
area; I/O, Data Table, and General. This is very useful for check if your memory has become
fragmented. If the data returned is under 1.1kbytes you will not be able to make connections to the
controller.

This application will utilize the CIP Generic message instruction to retrieve this data from the
controller and put it into a User Defined Data Type call Memory_Data. Included with this application
note is the example program.

The following figure shows the configuration of the CIP Generic message instruction. Enter the data
as seen.

V2.0
Page 3of 6

Select Custom Service Type.

 Service Code = 3 (Get Attribute List)


 Class = 72 hex (The User Memory Object)
 Instance = 1 (The only instance of the Memory Object)
 Attribute = 0 (This is a null)

Because we are doing a Get Attribute List service request will need to define what data we want.
This is done thru the Source Element. The tag Memory_Request_Data is a sint array 12 elements in
length. Here is where we define what we want. The figure below shows the form and data that need
to be in the array.

 Element 0 = 5 (The number of attributes requested)


 Elements 1 and 2 = 0 and 1 (The attribute requested, Free memory)
 Elements 3 and 4 = 0 and 2 (The attribute requested, Total memory)
 Elements 5 and 6 = 0 and 5 (The attribute requested, General memory block max)
 Elements 7 and 8 = 0 and 6 (The attribute requested, I/O memory block max)
 Elements 9 and 10 = 0 and 7 (The attribute requested, Data table memory block max)
 Element 11 = 0

The source length is 12, the length of the Source Element array.

V2.0
Page 4of 6

Finally, there is the destination. We are moving the data returned into a temp buffer. This is because
the data coming back is of varying sizes. The code will then move this data into a User Defined
Structure. The structure has the following format.

The next part of the message configuration is the communications path. The path takes the form of
1,XX, where the XX is the slot the desired controller is in. In the case of this example the processor is
in slot 0, so the path would be 1,0.

V2.0
Page 5of 6

Testing the Application

Download the program to the controller. Place the controller into run mode. Verify that the MSG is
getting DN. Once the program is running go into Controller Tags and open the tag called
Memory_Data, note you will want to be on the monitoring tag of the tag window. The figure below
shows the data from a running controller.

The next figure is the same data as returned from OPC Test Client. Notice that the Free Memory I/O
is 1060 (211736-210676) bytes below what the test client is returning this is also true for
Free_Memory. This is because when the message instruction is executed it takes away 1060 bytes
from memory. There is no memory general data because the controller used was an L55M14.
Currently the Biggest memory available for I/O and Data Table is equal to their free totals. This is
because we do not have for example OPC make connections to the controller consuming memory.

V2.0
Page 6of 6

V2.0

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy