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.

oEnable = 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.

oEnable = 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:

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

oThe device is not enabled (PowerSupplyCheck or ControllerEnable are FALSE)

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

oThe DC bus is charged

oSercos 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