Description of the Function

The PWS_DIAG function block is used to read the status of redundant power supplies in a Modicon M580 PAC main rack with an Ethernet backplane (local or remote rack, other connected Modicon M580 PAC).

The power supply status is interpreted with the PWS_DIAG_DDT or DDT type.

The additional parameters EN and ENO may also be configured.

NOTE: Redundant power supplies function is available on CPUs with OS firmware V2.12 or later, and BMECRA31210 communication adapters with firmware V2.16 or later.

FBD Representation

Representation:

LD Representation

Representation:

IL Representation

Representation:

CAL PWS_DIAG_Instance (ENABLE:=Enable, ABORT:=Abort, IP_ADDRESS:=IP_Address, DONE=>OperationSuccessful, ACTIVE=>OperationActiv, ERROR=>FaultyOperation, STATUS=>ErrorCode, LEFT_PWS=>LeftPwsDiagnostics, RIGHT_PWS=>RightPwsDiagnostics)

ST Representation

Representation:

PWS_DIAG_Instance (ENABLE:=Enable, ABORT:=Abort, IP_ADDRESS:=IP_Address, DONE=>OperationSuccessful, ACTIVE=>OperationActiv, ERROR=>FaultyOperation, STATUS=>ErrorCode, LEFT_PWS=>LeftPwsDiagnostics, RIGHT_PWS=>RightPwsDiagnostics);

Description of Parameters

The following table describes the input parameters:

Parameter

Type

Comment

Enable

BOOL

Set to 1 to diagnose the status of a power supply.

Abort

BOOL

Set to 1 to abort the current operation.

IP_Address

STRING

The IP_Address parameter value depends on the location of the redundant power supplies to diagnose:

  • In the local rack of the CPU: Leave the parameter empty, or use a variable with an empty string, or enter the CPU IP address.

  • In a distant rack: Enter the IP address of the communication adapter of the rack that contains the power supply module to diagnose.

    Example of IP address: 192.168.10.5 or 192.168.010.005

The following table describes the output parameters:

Parameter

Type

Comment

OperationSuccessful

BOOL

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

OperationActiv

BOOL

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

FaultyOperation

BOOL

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

ErrorCode

WORD

Code providing the detected error identification.

LeftPwsDiagnostics

PWS_DIAG_DDT

or

PWS_DIAG_DDT_V2

Diagnostic data for the power supply located on the left side of the rack (CPS1 marking on the rack).

RightPwsDiagnostics

PWS_DIAG_DDT

or

PWS_DIAG_DDT_V2

Diagnostic data for the power supply located on the right side of the rack (CPS2 marking on the rack).

Terminology Used in PWS_DIAG_DDT or PWS_DIAG_DDT_V2 Type and Power Supply Concerned

Redundant power supplies representation in a rack:

CPS1: Left-most power supply marking on the rack.

CPS2: Right-most power supply marking on the rack.

Description of the power supply concerned by the State field bits of the function block output parameters:

Parameter

PWS_DIAG_DDT or PWS_DIAG_DDT_V2 Field

Bits of the State Field

Concerned Power Supply

LeftPwsDiagnostics

State

Bits 0...4

(Pws•••)

CPS1

(left-most power supply)

Bits 5...7

(OtherPws•••)

CPS2

(right-most power supply)

RightPwsDiagnostics

State

Bits 0...4

(Pws•••)

CPS2

(right-most power supply)

Bits 5...7

(OtherPws•••)

CPS1

(left-most power supply)

NOTE: The power supply (Pws••• field or bit) is the one that currently provides the diagnostic data that appear in the structure. The other power supply (OtherPws••• bit) is the second power supply located on the same backplane that communicates some of its diagnostic data to the power supply currently diagnosed.

Description of PWS_DIAG_DDT and PWS_DIAG_DDT_V2 Type

Detailed description of PWS_DIAG_DDT and PWS_DIAG_DDT_V2 structures:

Field

Size

Value

PwsMajorVersion

1 BYTE

Power supply major firmware version.

PwsMinorVersion

1 BYTE

Power supply minor firmware version.

Model

1 BYTE

Model identifier.

State (1 BYTE)

Bit 0

PwsDiag

Operating mode of the power supply:

  • 0: Normal mode.

  • 1: Diagnostic ongoing.

    NOTE: The diagnostics occurs when the power supply performs an auto-test every 10 hours of cumulated operating time.

State (continued)

Bit 1

PwsDefect

Status of the power supply:

  • 0: Healthy.

  • 1: At least one defect detected (minor or major).

    • Possible cause if an under voltage is detected: internal defect detected, or over current.

    • Possible cause if an over current is detected: internal defect detected, or too many modules on the configuration, or any module defect detected, or backplane defect detected, or module hot-plugged.

State (continued)

Bit 2

PwsMode

Role of the power supply:

  • 0: Slave (ready to provide full power to the rack).

  • 1: Master (currently providing full power to the rack).

State (continued)

Bit 3

PwsPosition

Position of the power supply:

  • 0: Left side of the rack (CPS1).

  • 1: Right side of the rack (CPS2).

State (continued)

Bit 4

PwsDefectVoltage

Major status of the power supply:

  • 0: Healthy.

  • 1: Detected a major defect on output voltage that generates a role swap (the power supply role changed from master to slave, or the power supply remains slave).

    NOTE: When this bit is set, PwsDefect (Bit 1) is also set.

State (continued)

Bit 5

OtherPwsDefectVoltage

Major status of the other power supply:

  • 0: Healthy or no communication with the other power supply.

  • 1: Detected a major defect on output voltage that generates a role swap (the power supply role changed from slave to master, or the power supply remains master).

    NOTE: When this bit is set, OtherPwsDefect (Bit 7) is also set.

State (continued)

Bit 6

OtherPwsComOK

Communication of the diagnosed power supply with the other power supply:

  • 0: No communication.

  • 1: Communication established.

State (continued)

Bit 7

OtherPwsDefect

Status of the other power supply:

  • 0: Healthy or no communication with the other power supply.

  • 1: At least one defect detected (minor or major).

    • Possible cause if an under voltage is detected: internal defect detected, or over current.

    • Possible cause if an over current is detected: internal defect detected, or too many modules on the configuration, or any module defect detected, or backplane defect detected, or module hot-plugged.

I33BacPos

1 UINT

Current drawn on the 3.3 Vdc power supply internally and delivered to the rack as a producer (unit: mA, accuracy: +/-5%, value range: 20...4500 mA).

The master delivers current to the rack, the slave does not deliver current to the rack.

V33Buck

1 UINT

Voltage measured on the 3.3 Vdc power supply output (unit: mV, accuracy: +/-2%, value range: 3238...3471 mV).

NOTE: On a master power supply, the voltage on the output corresponds to the rack voltage. On a slave, the voltage on the output represents the voltage that can be applied to the rack if it becomes a master.

I24Bac

1 UINT

Current drawn on the 24 Vdc power supply internally and delivered to the rack as a producer (unit: mA, accuracy: +/-5%, value range: 36...1750 mA).

The master delivers current to the rack, the slave does not deliver current to the rack.

V24Int

1 UINT

Voltage measured on the 24 Vdc power supply output (unit: mV, accuracy: +/-2%, value range: 23512...24593 mV).

NOTE: On a master power supply, the voltage on the output corresponds to the rack voltage. On a slave, the voltage on the output represents the voltage that can be applied to the rack if it becomes a master.

Temperature

1 INT

Internal power supply temperature measured (unit: °C, accuracy: +/-1%).

OperTimeMasterSincePO

1 UDINT

Operating time as master since last power on (unit: s).

OperTimeSlaveSincePO

1 UDINT

Operating time as slave since last power on (unit: s).

OperTimeMaster

1 UDINT

Operating time as master since manufacturing (unit: s).

OperTimeSlave

1 UDINT

Operating time as slave since manufacturing (unit: s).

Work

1 UDINT

Energy delivered by the power supply since manufacturing (unit: mWh).

RemainingLTPC

1 UINT

Estimated remaining life time in percent.

The estimated remaining life time value represents the wear of some components in the power supply. This value is a theoretical estimation based on an algorithm that integrates several parameters such as working temperature, up-time, power consumption, and so on. When this value reaches 0% the power supply may still be working perfectly, but there is a high likelihood that a hardware defect occurs soon.

NOTE: When the estimated remaining life time reaches 0, there is no automatic swap (the power supply is used as long as it delivers the requested current and voltages).

RemainingLTMO

1 UINT

Estimated remaining life time in months.

NOTE: Only available in the PWS_DIAG_DDT_V2 structure, RemainingLTMO refers to the same value as RemainingLTPC but converted in months (see above).

NbPowerOn

1 UINT

Number of power-on since manufacturing or since last clear command with PWS_CMD.

NbUnderVoltageLow

1 UINT

Number of under voltage detected below low threshold (94 Vac +/-5%) on primary voltage since manufacturing or since last clear command with PWS_CMD.

NbUnderVoltageHigh

1 UINT

Number of under voltage detected below high threshold (194 Vac +/-5%) on primary voltage since manufacturing or since last clear command with PWS_CMD.