Introduction
The PWS_CMD function block can be used to issue two commands:
Swap request: This command specifies the power supply to serve as the master. If both power supplies are operational, the specified power supply becomes the master, the other becomes the slave.
Clear request: This command resets the counters of the number of times:
main voltage fell below under-voltage level 1.
main voltage fell below under-voltage level 2.
power supply has powered ON.
Both requests are available only for power supplies on the main rack. A main rack is one with an address of 0 and a CPU or communication adapter module (CRA) in slot 0 or 1. An extension rack is not a main rack.
The LEDs indicate the command is ongoing. A record of the event is stored in power supply memory.First paragraph of fact block.
Representation in FBD

Parameters
Input Parameters:
Parameter Name |
Data Type |
Description |
---|---|---|
ENABLE |
BOOL |
When ON, the operation is enabled. |
ABORT |
BOOL |
When ON, the currently active operation is aborted. |
REMOTE_IP |
STRING |
IP Address ("ip1.ip2.ip3.ip4") of the drop that contains the power supply module. Leave this field an empty string ("") or attach no variable to its pin to address the power supply in the local rack. |
CMD |
ANY |
Use variable of type PWS_CMD_DDT for correct interpretation. Available command code:
|
PWS_TARGET |
BYTE |
Power supply to address:
|
Output Parameters:
Parameter Name |
Data Type |
Description |
---|---|---|
DONE |
BOOL |
ON when the operation concludes successfully. |
ERROR |
BOOL |
ON when the operation is aborted without success. |
ACTIVE |
BOOL |
ON when the operation is active. |
STATUS |
WORD |
Detected error identifier. |
DATA |
ANY |
Response data (depending of command code). No data are reported for swap and clear commands. |
Example
The following diagram demonstrated a PWS_CMD block used for a swap request:

The following data editor screen shows the variable values of a swap request:
