Function Description

The EthPort_Control_MX function is used in a Unity Pro V8.0 version, for a Modicon M580 CPU embedded Ethernet, to deactivate or activate the following protocols:

  • FTP

  • TFTP

  • HTTP

Enable the protocol in the configuration before the EthPort_Control_MX function is used to deactivate or re-activate the protocol.

If a protocol is not enabled in the configuration, the EthPort_Control_MX function does not apply any change and an error is reported.

The additional parameters EN and ENO can be configured.

FBD Representation

Representation:

LD Representation

Representation:

IL Representation

Representation:

EthPort_Control_MX (ENABLE:=EnableControl, ADR:=EntityToControl, ETHERNET_SERVICE:=ServicesControl)

ST ControlStatus

ST Representation

Representation:

ControlStatus:=EthPort_Control_MX (ENABLE:=EnableControl, ADR:=EntityToControl, ETHERNET_SERVICE:=ServicesControl);

Parameter Description

The following table describes the input parameters:

Parameter

Type

Description

ENABLE

BOOL

Enable or disable the EF.

ADR

ANY_ARRAY_INT

Array containing the address of the destination entity of the write operation, result of ADDM or ADDMX function.

NOTE: EthPort_Control_MX is only used for Modicon M580 CPUs with a Unity Pro V8.0 version, use ADDM('0.0.0') to enable/disable the CPU protocols services.

ETHERNET_SERVICE

WORD

Word structure:

  • bit 0-1: FTP

  • bit 2-3: TFTP

  • bit 4-5: HTTP

  • bit 6-15: reserved

Bits combination meaning for each protocol:

  • 00: no change in service state

  • 01: enable the protocol

  • 10: disable the protocol

  • 11: reserved

The following table describes the output parameter:

Parameter

Type

Description

STATUS

INT

Status returned by the system:

  • 3: Bad address format

  • -1: Invalid Parameters

  • 0: Success