FC_DcBusDischarge - General Information

Overview

Type:

Function

Available as of:

SystemInterface_1.33.10.0

Versions:

Current version

Supported devices:

Lexium LXM62 Power Supply, Lexium 52

Task

Discharging the DC bus. This function is used with PowerSupplies or drives with integrated power supply.

Description

This function block enforces a discharge of the DC bus.

  • Enable = TRUE

    The ready contact is opened and the DC bus is discharged. The DC bus is not charged again until Enable is set to FALSE.

  • Enable = FALSE

    The discharge is disabled. The ready contact is closed and the DC bus may be charged.

The discharging process can only be started if:

  • No detected errors are pending for the device which lead to the opening of the ready contact

  • The device is not enabled (PowerSupplyCheck or ControllerEnable are FALSE)

  • The allocated drives are not being controlled if an LXM 62 PS is used (ControllerEnable is FALSE for the allocated drives)

  • The DC bus is charged

  • Sercos is in phase 4

The discharge process can take more than 100 ms. Therefore, the FC_DcBusDischargeState function can be used to check when the discharge was completed.

Interface

Input

Data type

Description

i_sDeviceId

ST_LogicalAddress

logical address of the device

i_xEnable

BOOL

TRUE = DC bus is being discharged

FALSE = discharging disabled (DC bus is being charged)

Return Value

Data type

Description

DINT

0: Discharging disabled

1: Preparing discharge process

2: DC bus is being discharged

3: DC bus was discharged successfully

-1: Incorrect logical address

-2: Discharging cannot be started because the drives are still being controlled.

-3: Discharging cannot be started because the device is enabled (PowerSupplyCheck = TRUE or ControllerEnable = TRUE).

-4: Discharging cannot be started because the device has detected an error which leads to the opening of the ready contact.

-5: Discharging cannot be started because the DC bus is not charged.

-6: Discharging not possible

-461: Incorrect Sercos phase