FB_KL6811Config

The function block FB_KL6811Config is used to configure the KL6811. The configuration is executed when the PLC program starts, or it can be triggered by a positive edge at the input bConfigurate. The parameters are stored in the respective registers of the KL6811 in a fail-safe manner. In addition, some general information, such as the firmware version, is read from the KL6811.
Inputs
VAR_INPUT
bConfigurate : BOOL := FALSE;
eOperationMode : E_DALIV2OperationMode := eDALIV2OperationModeDALI;
bDisableInternalPowerSupply : BOOL := FALSE;
bEnableCountingDevicesAfterStartup : BOOL := FALSE;
nOptions : DWORD := 0;
END_VAR
Name | Type | Description |
---|---|---|
bConfigurate | BOOL | Configuration of the bus terminal is started by a positive edge at this input. |
eOperationMode | Defines the operation mode of the terminal (DALI or DSI). Corresponds to register 32, bits 12 to 15 of the bus terminal. | |
bDisableInternalPowerSupply | BOOL | If this input is TRUE, the internal DALI power supply of the terminal is disabled by the configuration. Corresponds to register 32, bit 3 of the bus terminal. |
bEnableCountingDevicesAfterStartup | BOOL | If this input is TRUE, the number of DALI devices is counted when the terminal starts. Corresponds to register 32, bit 4 of the bus terminal. |
nOptions | DWORD | Reserved for future developments. |
Inputs/outputs
VAR_IN_OUT
stInDataTerminal : ST_DALIV2InData;
stOutDataTerminal : ST_DALIV2OutData;
stInData : ST_DALIV2InData;
stOutData : ST_DALIV2OutData;
END_VAR
Name | Type | Description |
---|---|---|
stInDataTerminal | Reference to the structure for communication with the KL6811 | |
stOutDataTerminal | Reference to the structure for communication with the KL6811 | |
stInData | Reference to the structure for communication with the function block FB_DALIV2Communication | |
stOutData | Reference to the structure for communication with the function block FB_DALIV2Communication |
Outputs
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
nErrorId : UDINT;
nTerminalDescription : WORD;
nFirmwareVersion : WORD;
sDescription : STRING;
END_VAR
Name | Type | Description |
---|---|---|
bBusy | BOOL | When the function block is activated the output is set, and it remains active until execution of the command has been completed. |
bError | BOOL | This output is switched to TRUE as soon as an error occurs during the execution of a command. The command-specific error code is contained in nErrorId. Is reset to FALSE by the execution of a command at the inputs. |
nErrorId | UDINT | Contains the command-specific error code of the most recently executed command. Is reset to 0 by the execution of a command at the inputs (see error codes). |
nTerminalDescription | WORD | Contains the terminal name (e.g. 6811). Corresponds to register 8 of the bus terminal. |
nFirmwareVersion | WORD | Contains the firmware version. Corresponds to register 9 of the bus terminal. |
sDescription | STRING | Terminal name and firmware version as string (e.g. 'Terminal KL6811 / Firmware 2H') |
Requirements
Development Environment | PLC library to include |
---|---|
TwinCAT from v3.1.4020.14 | Tc2_DALI from v3.4.3.0 |