Rockwell Automation T80011 User Manual

Trusted
TM
AN-T80011
Application Note
Application Variable Limit Check
This document describes how to check for the temporary variable numbering overflow.
Issue Record
Issue Number
1 Dec 07 Nick Owens Pete Stock Gerry Creech Initial Issue
Date Revised by Technical
Check
Authorised by Modification
Issue 1 Dec 07 AN-T80011 1
Trusted
TM
AN-T80011 Application Variable Limit Check
1. Application Variable Limit Check
1.1. Compiled file appli.h
Compile the application as normal. When compilation is complete, before downloading or updating, open Windows Explorer and navigate to the Toolset application folder. This will normally be a sub­folder of c:\Trusted\Toolset\apl. In this folder, find a file called appli.h.
The file size is a reasonable guide to the chances of having a problem. This example is just over 2MB and its temporary variable numbering is still 39% short of the limit.
Open the file using Notepad or another text editor. The temporary variables are listed in categories with their internal tagname and hexadecimal address. If the address is greater than hexadecimal FFFF (0XFFFF, decimal 65,536), it rolls over to zero and will overwrite other data. The category which is most likely to roll over is the Booleans, because these include variables for power flow debugging.
Request a search for the text ‘FFFF’. In Notepad, select Edit | Find… and type FFFF in the ‘Find what:’ window. If an address 0XFFFF is found, then there are too many temporary variables and other data will be corrupted.
Issue 1 Dec 07 AN-T80011 2
Trusted
TM
AN-T80011 Application Variable Limit Check
In the example below, all variables addressed from 0X0000 onwards will overwrite other data.
#define _SCC_TMA0252CF 0XFFFB #define _SCC_TMA0252D0 0XFFFC #define _SCC_TMA0252D1 0XFFFD #define _SCC_TMA0252D2 0XFFFE
#define _SCC_TMA0252D3 0XFFFF
#define _SCC_TMA0252D4 0X0000 #define _SCC_TMA0252D5 0X0001 #define _SCC_TMA0252D6 0X0002 #define _SCC_TMA0252D7 0X0003 #define _SCC_TMA0252D8 0X0004
If an address overrun is discovered, follow the advice given in Technical Alert TA20004.
If the application has not exceeded the limit, a guide to the size of the largest list can be obtained by finding the end of the Booleans list. Searching for ‘Analogs’ will find the beginning of the next list. Check the address of the last variable in the list; in this example it is 887A, which is a little over half way to FFFF.
Issue 1 Dec 07 AN-T80011 3
ICS Triplex technologies and services are available worldwide.
Regional Headquarters:
Americas:
4325 West Sam Houston
arkway North, Suite 100
P
Houston
Texas 77043-1219
USA
Tel: +1 713 353 2400
Fax: +1 713 353 2401
Europe, ME & Africa:
Hall Road
Maldon Essex
CM9 4LA
UK
Tel: +44 1621 854444
Fax: +44 1621 851531
Asia Pacific:
Unit 2/12 Keegan Street
O’Connor
Western Australia
Tel: +61 89 314 7787
Fax: +61 89 314 7786
www.icstriplex.com
For technical support email: support@icstriplex.com
Sales enquiries: sales@icstriplex.com
Technology Driven Customer Led
Loading...