Appendix c – Rockwell Automation 57C423 Common Memory Module User Manual
Page 29
CĆ1
Appendix C
Configuring the Common Memory Module
in DCS 5000 or AutoMax V 2.1
or Earlier Systems
In DCS 5000 or AutoMax Version 2.1 or earlier systems, a configuration task must
be created and loaded onto the Processor(s)in the rack before any application
task can be executed. The configuration task defines all common variables, i.e.,
variables that are accessible to more than one application task in the rack
(physical inputs/outputs and memory variables). The location of the Common
Memory module in the rack determines the type of statement required to define
these variables. This appendix describes the configuration task statements
required to configure the Common Memory module in DCS 5000 or AutoMax 2.1
Systems.
Common Memory Module Located in Slot 0
When the Common Memory module is in slot 0, the allocation of data storage on
the module is automatic and completely under the control of the operating
system. This means you can reserve storage space for the common variable, but
not specify its actual address. You define common variables in the configuration
task by using either the MEMDEF or NVMEMDEF statement. These statements
are described in detail below.
MEMDEF Statement
The MEMDEF statement is used to define common variables that will not retain
their current values in the event of a power loss. On power up, these volatile
variables are set to zero if there is a battery backup. However, if there is no
battery backup, all common data (variables)stored on the Common Memory
module is lost. This statement may be used to define any valid data type, i.e.,
real, integer, double integer, boolean, and string. Common variables can then be
accessed by any task that declares their variable names COMMON.
The following example defines a single precision integer (16 bits)with the name
WINDOW%", and a boolean (1 bit)with the name STOPPB@". Note the
terminating characters are used to specify data type. See JĆ3649 for more
information on data types.
1000 MEMDEF WINDOW%, STOPPB@
The MEMDEF statement also allows you to define array variables. The following
example defines an array of 20 (0-19)singleĆprecision integers with the name
SIZES%".
1650 MEMDEF SIZES%(19)
NVMEMDEF Statement
The NVMEMDEF statement is used to define common variables that will retain
their current value in the event of a power loss i.e., nonĆvolatile variables.
However, if the battery fails, all common data (variables)stored on the Common
Memory module is lost. This statement may be used to define variables of any
valid data type which can be accessed by any task that declares them COMMON.
The following example defines a single precision integer (16 bits)with the name
WINDOW%", and a boolean (1 bit)with the name STOPPB@".