FB_DALI209StartAutoCalibration

FB_DALI209StartAutoCalibration 1:

The calibration procedure is started in order to measure the x-coordinate, the y-coordinate and the TY value of all supported primary colors.

The command starts a 15-minute timer or initiates it again. Bit 2 of the colourStatus variable is 1 as long as the timer is active (see FB_DALI209QueryColourStatus). On expiry of the timer the last color representation, the last color value and the last lamp power level are directly saved again.

During the timer period the DALI control gear carries out a calibration procedure in order to measure the x-coordinate, the y-coordinate and the TY value of all supported primary colors. Whilst the calibration procedure is running, the DALI control gear does not react to any commands apart from TERMINATE, QUERY COLOUR STATUS and START AUTO CALIBRATION. In addition, bit 3 in the variable colourStatus is set to 0 at the start of the calibration. The TERMINATE command ends the procedure and stops the timer.

If the calibration was successful, bit 3 in colourStatus is set to 1 and the timer is stopped. If the calibration was not successful, then the last successful calibration data are restored if the DALI control gear is able to do so. Bit 3 of colorStatus is then set to 1. The ability to restore the last successful calibration data is a feature of the operating device (see FB_DALI209QueryGearFeaturesStatus command).

Due to the fact that the calibration can take longer than 15 minutes, the status of the automatic calibration should be checked periodically using the QUERY COLOR STATUS command and the calibration timer restarted with the START AUTO CALIBRATION command. The calibration procedure is started in order to measure the x-coordinate, the y-coordinate and the TY value of all supported primary colors.

The command starts a 15-minute timer or initiates it again. Bit 2 of the colourStatus variable is 1 as long as the timer is active (see FB_DALI209QueryColourStatus). On expiry of the timer the last color representation, the last color value and the last lamp power level are directly saved again.

During the timer period the DALI control gear carries out a calibration procedure in order to measure the x-coordinate, the y-coordinate and the TY value of all supported primary colors. Whilst the calibration procedure is running, the DALI control gear does not react to any commands apart from TERMINATE, QUERY COLOUR STATUS and START AUTO CALIBRATION. In addition, bit 3 in the variable colourStatus is set to 0 at the start of the calibration. The TERMINATE command ends the procedure and stops the timer.

If the calibration was successful, bit 3 in colourStatus is set to 1 and the timer is stopped. If the calibration was not successful, then the last successful calibration data are restored if the DALI control gear is able to do so. Bit 3 of colorStatus is then set to 1. The ability to restore the last successful calibration data is a feature of the operating device (see FB_DALI209QueryGearFeaturesStatus command).

Due to the fact that the calibration can take longer than 15 minutes, the status of the automatic calibration should be checked periodically using the QUERY COLOR STATUS command and the calibration timer restarted with the START AUTO CALIBRATION command (if necessary).

FB_DALI209StartAutoCalibration 2:

The function block supports the following color representations:

  • xy coordinates
  • Color temperature Tc
  • Primary (color) N
  • RGBWAF

FB_DALI209StartAutoCalibration 3: Inputs

VAR_INPUT
  bStart            : BOOL;
  nAddress          : BYTE;
  eAddressType      : E_DALIAddressType := E_DALIAddressType.Short;
  eCommandPriority  : E_DALICommandPriority := E_DALICommandPriority.MiddleLow;
END_VAR

Name

Type

Description

bStart

BOOL

Execution of the DALI commands is triggered via a positive edge at this input.

nAddress

BYTE

Address of a DALI control gear or a DALI group.

eAddressType

E_DALIAddressType

Defines whether the input nAddress contains a short address (0…63) or a group address (0…15). The input nAddress has no meaning if a broadcast or a broadcast to unaddressed devices (BroadcastUnaddr) has been selected.

eCommandPriority

E_DALICommandPriority

Priority (low, middle low, middle, middle high, high) with which the DALI commands are sent.

FB_DALI209StartAutoCalibration 4:

eCommandPriority has no function with the KL6811. The DALI command priorities are supported by the KL6821 from the firmware version BD.

FB_DALI209StartAutoCalibration 5: Outputs

VAR_OUTPUT
  bError                  : BOOL;
  ipResultMessage         : I_TcMessage;
  bBusy                   : BOOL;
END_VAR

Name

Type

Description

bError

BOOL

This output is switched to TRUE if an error occurs during the execution. Further information about the error can be queried via the variable ipResultMessage. The output is set to FALSE again as soon as bBusy switches to TRUE.

ipResultMessage

I_TcMessage

Interface pointer (see error evaluation) that can be used to obtain detailed information about the processing of the function block (see runtime messages). The interface pointer is valid after bBusy has changed from TRUE to FALSE.

bBusy

BOOL

The output is set as soon as execution of the DALI commands has commenced. It remains active until all DALI commands have been processed.

FB_DALI209StartAutoCalibration 6: Properties

Name

Type

Access

Initial value

Description

ipDALICommunication

I_DALICommunication

Get,Set

0

Interface Pointer to the communication block (see Transfer of the reference to the communication block).

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.55

Tc3_DALI from v3.18.1.0