Access to the Configuration Screen

Proceed with the following steps:

Step

Action

1

Select the processor.

Example:

2

Using the contextual menu, click Open.

3

Select the Configuration tab.

Memory Management

The configuration screen differs, depending on the type of memory management to be used.

The option you select here must comply with the type of memory management you select for the input and output modules.

The following settings are possible:

If...

Then...

Topological memory management is configured for the processor

you can only select Topological memory management for the discrete and analog modules.

Mixed topological and State RAM memory management is configured for the processor

you can select either Topological or Mixed topological and State RAM memory management for the discrete and analog modules.

The memory management settings of the processor are compared with the memory management settings of the modules during Analyze. If any inconsistencies are detected, a appropriate message is displayed in the output window.

The type of memory management you selected for the processor is used as default setting for the Memory Management parameter in the Memory tab for input / output configuration.

NOTE:

If you want to import a legacy LL984 Compact application which uses Modbus request to communicate with an HMI, you have to use State RAM addressing to preserve the Modbus exchange between PLC and HMI.

NOTE: If you use the fallback configuration in your hardware configuration, take care that the fallback values can only be applied if the Topological option is checked.

Configuration of the Processor

NOTE: You can modify the parameters of this dialog box only in offline mode.

Configuration screen for topological memory management:

Proceed with the following steps:

Step

Action

1

If you wish, enable the Run/Stop input option.

Do not enable this option if the associated discrete input is mapped in State RAM because this inhibits the PLC start-up.

2

If you wish, enable the Memory protect option.

The protection is activated by an input bit. The protection level depends on the Firmware versions, see detailed information.

3

If you wish, enable the Automatic start in Run option.

4

Confirm whether the internal words %MWi are to be initialized on cold start triggered by software (application download, initialize command, restore command, %S0 activation, cold start button on the PLC screen) or not. By checking the box, the PLC writes the initial values to %MWI.

5

If you wish, enable the Cold Start Only option.

6

Define the type of Memory Management:

  • select the option Topological for topological addressing

  • select the option Mixed topological and State RAM for a mixture of topological and defined State RAM addressing

7

Proceed with address configuration for the 2 different addressing types as described in the following separate descriptions.

NOTE: The State RAM address starts at address 0, but the first available address for discrete and analog modules is %I1, %M1, %IW1, and %MW1.

Topological Addressing

Proceed with address configuration for topological addressing as follows:

Step

Action

1

In the Size of global address fields of the dialog box define for the application the number of internal bits %M.

2

Define the number of internal words %MW.

3

Define the number of constants %KW.

The system bits and system words are fixed by the manufacturer.

M340 applications of version 6.0 and earlier are automatically configured with this address configuration for topological addressing.

Mixed Topological and State RAM Addressing

Configuration screen for mixed topological and State RAM memory management:

For mixed topological and State RAM addressing, the following options are additionally available in the configuration screen:

Option

Value

Description

Mem usage

The value (expressed as a percentage and displayed on the scale bar) depends on the memory usage of the Modicon M340 configuration.

A bar graph displays the percentage of the memory already in use.

%M-0x

Enter the appropriate values. The values depend on the configuration.

Size of the different memory areas.

NOTE: The values for %IW and %MW have to be divisible by 8.

%MW-4x

%I-1x

%IW-3x

Viewer

Opens the State RAM Viewer tab which displays the allocation of used memory.

NOTE: The State RAM address starts at address 0, but the first available address for discrete and analog modules is %I1, %M1, %IW1, and %MW1.
NOTE: State RAM addresses are not checked during input. If any range overlapping is detected or any address exceeds the range of the State RAM, an appropriate message is displayed at the validation screen or during Analyze.
NOTE: With this type of memory management, all channels are associated to one task (MAST or FAST).

Pre-set values

To select the:

  • default values, press the Default values button,

  • maximum values, press the Maximum values button,

Window displayed by pressing the Default values button:

Use of the command buttons:

Button

Role

Unselect All

Is used to invalidate all the default values posted on the right of the check boxes if they have been selected.

Select All

Is used to select all the default values posted on the right of the check boxes.

Cancel

Is used to exit.

OK

Is used to exit taking the values into account.

NOTE: With the Maximum values button, the window displayed is the same, only the values on the right of the check boxes are different.

Input RUN/STOP

The input %Ir.m.c can be parameterized to switch the PLC to RUN/STOP mode in the following way:

  • %Ir.m.c to 1 -> the PLC switches to RUN (execution of the program),

  • %Ir.m.c to 0 -> the PLC switches to STOP mode (stop program execution).

NOTE: A STOP command always takes priority over a RUN command. A STOP command sent from a terminal or via the network has priority over the %Ir.m.c input.

An error on the RUN/STOP input causes a switch to STOP.

Do not enable this option if the associated discrete input is mapped in State RAM because this inhibits the start-up of the PLC.

Memory protect

The input %Ir.m.c can be parameterized to protect the internal application ram and the memory card in the following way:

  • %Ir.m.c to 0 -> the internal application and the memory card are not protected,

  • %Ir.m.c to 1 -> the internal application and the memory card are protected.

For Firmware versions < 2.60, the Memory Protect function prohibits the transfer of a project into the PLC and modifications in online mode, but RUN/STOP commands are available.

For Firmware versions greater and equal to 2.60, the Memory Protect function prohibits the transfer of a project into the PLC and modifications in online mode, for cybersecurity improvement, the connection to the PLC is forbidden then the RUN/STOP command are not available.

NOTE: If the input is in error (Input Module not physically plugged, wrong wiring, input not powered...), %Ir.m.c is considered at 1 (memory is protected). To remove this protection in this configuration screen, the input should not be in error.

Automatic start in Run

The enabling of this option automatically changes the PLC to RUN mode at the time of a cold start.

Initialize %MWi

On a cold start or on download if you check the box (default state):

  • the %MWi are handled like other global variables (initialized to 0 or initial value, according to current application) in all cold start cases,

On cold start or on download if you uncheck the box:

  • if %MW were previously saved in internal flash memory (using the %SW96 word) they are restored from internal flash memory,

  • if not,

    • if cold start is linked to a power-off or of a push on the reset button, the %MW are initialized:

    • if not, the current values of %MW are maintained.

NOTE: if the new (or restored) application has more %MW than the previous one, the added %MW are set to 0 (non-zero initial values are not applied).

Cold Start Only

If checked, this option forces the cold start of the application, instead of the normal warm start.

By default, the Cold Start Only option is unchecked.

The Cold Start Only option is only supported for CPU with OS version V2.1 or later.

An application using this functionality is not:

  • downloadable on a PLC with a previous version,

  • executable on a PLC with a previous version,

  • usable with Unity Pro V4.0 or earlier.

    Unity Pro is the former name of Control Expert for version 13.1 or earlier.

NOTE: The Cold Start Only check box is present only if the current selected PLC can support it.

Memory Management

This area of the dialog box allows you to define the type of addressing (topological or mixed addressing).

For mixed addressing it contains a bar graph indicating the size of the State RAM memory used in your project in relation to the maximum memory size and a Viewer button opening the State RAM memory viewer.

State RAM Memory Viewer

The following screen displays the content of the State RAM memory areas of the M340 processor:

NOTE: The State RAM viewer is directly accessible via the menu:
  • PLC > State Ram Viewer

Description of the screen zones

Zone

Description

Table

This table represents the mapping of the memory area selected with the Memory Area selection buttons.

The occupied memory addresses are marked by dashes:

  • blue: for module type objects

  • red: for objects entered in the program

  • green: for objects defined in the variable editor

The scroll bars can be used to access the entire memory area.

Modules, Variables and Language checkboxes

These checkboxes are used to filter the information displayed in the table. If, for example, Modules is the only checkbox that is selected, only module-type information is displayed.

Address information

By entering the object and its address in the Address fields and clicking on the Go To button, you display directly the address in the table (without using the scroll bars). This zone also has a display function; it displays the object and address of the box selected in the table. For module-type objects, it also gives the topological address of the module concerned.

Memory Area selection buttons

These buttons are used to select the memory area to display in the table:

  • %M (0x) output bits and internal bits

  • %I (1x) input bits

  • %IW (3x) input words

  • %MW (4x) output words and internal words

Size of Located Data in Case of State RAM

NOTE: To use State RAM configuration you need Modicon M340 firmware V2.4 or later.

The following table shows maximum and default size of located data in case of State RAM configuration according to the type of processor.

Type of Objects

Address

BMX P34 1000 Processor

BMX P34 2000, 20102, 2020, 20302 Processors

Maximum Size

Default Size

Maximum Size

Default Size

output bits and internal bits

%M (0x)

32765

752

65530

1504

input bits and internal bits

%I (1x)

32765

752

65530

1504

input words and internal words

%IW (3x)

32765

256

65530

512

output words and internal words

%MW (4x)

32765

256

65530

512

Impact of a Cold Start on %I and %IW Areas

After a Cold Start or %S0 setting, the %I and %IW areas are set to 0 and forcing state is reset.

CPU Modbus Server Uses %I and %IW Areas

  • When the State RAM is configured in a CPU, the Modbus server access to %I area for all input bits operations and to %IW area for all input words operations.

    Base address %SW138 and %SW140 are not used in this case.

    The first object address in a Modbus request (0000) corresponds to %I1 or %IW1.

  • With Modicon M340 using firmware V2.4 or later, when the State RAM is not configured, the Modbus server behaves as in firmware V2.3.

Base address for %M and %MW in system words %SW139 and %SW141 are used whether State RAM is configured or not.

Protecting Located Data

Introduction

Before any action on the data memory protection, you must activate this feature in your project settings.

In the Control Expert main window, click Tools > Project Setting > PLC embedded data . Then select the Data memory protect box and click Apply.

The data memory protection feature is supported by M340 CPU with the firmware V3.30 or later. For details, refer to chapter Data Memory Protection.

Procedure of Protecting Located Data

Follow the procedure below to define the located data to protect:

Step

Action

1

In the Control Expert Project Browser, double-click PLC Bus to display the main rack. Then double-click on the M580 CPU (but not on the Ethernet connectors) to view its properties.

2

Select the Data Protection tab:

3

Select the boxes to enable the data protection:

%M protect

The protected area is always located at the end of the %M area. Only the starting address of the protected area can be set. The end address of the protected area is not configurable (grayed).

The end address of the protected area equals to n-1 where n is the number of available %M defined by the PLC abilities and set in the Configuration tab.

If %M protect is selected, you can enter the starting address or the %M data to protect. By default, the starting address is 0.

Unchecking the %M protection reset the starting address.

%MW protect

The protected area is always located at the end of the %M area. Only the starting address of the protected area can be set. The end address of the protected area is not configurable (grayed).

The end address of the protected area equals to n-1 where n is the number of available %MW defined by the PLC abilities and set in the Configuration tab.

If %MW protect is selected, you can enter the starting address or the %M data to protect. By default, the starting address is 0.

Unchecking the %MW protection reset the starting address.

NOTE: Array variables which are mapped on a %MW range must be entirely inside or entirely outside of the protected %MW range.

I/O protect

If selected, all I/O objects (including DTM-objects) are protected.

NOTE: except state Ram objects.

%S, %SW protect

If selected, all system bits and system words are protected.

4

Select Edit > Validate (or click the toolbar button) to save the configuration.