Function Description

Use the ETH_PORT_CTRL function block to control the FTP TFTP, HTTP, and DHCP / BOOTP protocols when they are enabled in the Control Expert Security screen. (By default, these protocols are disabled.) For cyber security reasons (to help protect data against requests to modify in the monitoring mode), map the inputs on variables and on unlocated variables in which the HMI property is disabled (the variable is not in the data dictionary).

The additional parameters EN and ENO may also be configured.

FBD Representation

Representation:

LD Representation

Representation:

IL Representation

CAL ETH_PORT_CTRL_Instance (ENABLE := EnableSecurityChange, ABORT := AbortSecurityChange, ADDR := ModuleAddress, ETH_SCE := ServiceToChange, DONE => BlockExecutionDone, ACTIVE => BlockExecutionInProgress, ERROR => BlockExecutionError, STATUS => BlockErrorStatus, ETH_SCE_STATUS => ChangeServiceStatus)

ST Representation

ETH_PORT_CTRL_Instance (ENABLE := EnableSecurityChange, ABORT := AbortSecurityChange, ADDR := ModuleAddress, ETH_SCE := ServiceToChange, DONE => BlockExecutionDone, ACTIVE => BlockExecutionInProgress, ERROR => BlockExecutionError, STATUS => BlockErrorStatus, ETH_SCE_STATUS => ChangeServiceStatus);

Description of Parameters

This table describes the input parameters:

Parameter

Type

Comment

ENABLE

BOOL

Set to 1 to enable the operation.

ABORT

BOOL

Set to 1 to abort the currently active operation.

ADDR

ANY_ARRAY_INT

This array contains the address of the entity for which you want to change the security state, which is the result of the ADDMX or ADDMX or ADDM function. For example:

  • ADDM(‘0.0.10’) for a M580 CPU

  • ADDM(‘0.3.0’) for a BMENOC0301/11 plugged in slot 3 of main rack

ETH_SCE

WORD

For each protocol, use these binary values to control the protocol:

  • 00: The protocol is unchanged.

  • 01: Enable the protocol.

  • 10: Disable the protocol.

  • 11: reserved

    NOTE: A value of 11 reports a detected error in ETH_SCE_STATUS.

These bits are used for the different protocols:

  • 0, 1: FTP

  • 2, 3: TFTP (Only available for Modicon M580)

  • 4, 5: HTTP

  • 6, 7: DHCP / BOOTP

  • 8...15: reserved (value = 0)

(1) To address a module in the local rack, enter 0.0.10 (CPU main server address).

This table describes the output parameters:

Parameter

Type

Comment

DONE

BOOL

Operation completed indication. Set to 1 when the execution of the operation is completed successfully.

ACTIVE

BOOL

Operation in progress indication. Set to 1 when the execution of the operation is in progress.

ERROR

BOOL

Set to 1 if an error is detected by the function block.

STATUS

WORD

Code providing the detected error identification.

ETH_SCE_STATUS

WORD

For each protocol, these values contain the response to any attempt to enable or disable the FTP, TFTP, HTTP, or DHCP / BOOTP protocols:

  • 0: command executed

  • 1: command not executed

Reasons for not executing the command can be:

  • The communication service has been disabled by the configuration.

  • The communication service is already in the state requested by the command (Enabled or Disabled).

  • The communication service (x) is not supported by the module or is a non-existing service.

These bits are used for the different protocols:

  • 0: FTP

  • 1: TFTP

  • 2: HTTP

  • 3: DHCP / BOOTP

  • 4 ... 15: reserved (value = 0)

Execution Type

Synchronous:

When used on the following M580 CPU modules, the ETH_PORT_CTRL function block is executed synchronously. As a result, the DONE output turns ON as soon as the ENABLE input is set to ON. In this case, the ACTIVE output remains OFF.

  • BMEP581020

  • BMEP582020

  • BMEP582040

  • BMEP583020

  • BMEP583040

  • BMEP584020

  • BMEP584040

  • BMEP585040

  • BMEP586040

  • BMEH582040*

  • BMEH584040*

  • BMEH586040*

    * In BMEH58•040 Hot Standby CPUs, verify that the ETH_PORT_CTRL function block is executed equally on both primary and standby CPUs.

Asynchronous:

When used on the following modules, the ETH_PORT_CTRL function block is executed asynchronously and may take several cycles until the DONE output turns ON. Therefore, the ACTIVE output is set to ON until the completion of the ETH_PORT_CTRL function block.

  • M340 modules:

    • BMXNOC0401

    • BMXNOE0100

    • BMXNOE0110

  • M580 modules:

    • BMENOC0301/11

How to Use the ETH_PORT_CTRL EFB

Use the ETH_PORT_CTRL EFB:

Step

Action

1

Set the bits of the services you want to activate in ETH_SCE.

2

Set ENABLE input to activate the EFB.

3

ENABLE input should be an OR between a pulse command and the ACTIVE output of the EFB.

4

Check STATUS output value:

  • STATUS<>0: There is a communication issue.

  • STATUS = 0: Check ETH_SCE_STATUS. The services for which the bits are set haven’t been modified as they should be.