CMD_LGT: Command lighting
CMD_LGT is used to command a single analog or binary lighting output object. CMD_LGT can command, at a particular priority, the Control command property (control-command commanding) or the Present value property (target state commanding). CMD_LGT is also used to release a priority as needed.
CMD_LGT reads back the arbitrated Present value and Present command properties, as well as Present priority, State flag and Reliability. CMD_LGT may optionally query a specified priority of the Priority array property to see if it is in use. CMD_LGT also reads additional required properties which provide information about status, progress and lifecycle of the light actuator.
Compatible data points:
- Analog lighting output [LgtAOut]
- Binary lighting output [LtgBOut]
Refer to data point objects for a detailed description of the BACnet data points.
Required properties:
- Present value
- Progress value
- Control command
- Present command
- Present priority
- State flag
- In process
- Lifecycle state
- Burn-in time
- Life time
- Elapsed active time
Operate with priorities
The function block uses 2 approaches to control if operating with priorities:
1. Exclusive control (planned for priorities 1...5, 9...12, 14...16)
- Only one command source is permitted for a data point priority.
- A function block on a project can command this priority.
- An input set of a function block can command this priority.
- The function block commands the priority anew or releases it if a priority is used from a function block and another commanding source changes this priority.
- For target state command if priority is released or value changed.
- For control command if priority is released.
2. Last win control (planned for priorities 7, 8, 13)
- Multiple, command sources can use the same priority.
- The last commanded value (release) remains on the priority until a new command is performed by one of the commanding sources.
| Exclusive control | Last win control |
|---|---|---|
Behavior at plant startup | [EnIn1] = 0 | [EnIn1] = 0 |
[EnIn1] = 1 | [EnIn1] = 1 | |
Command process | If [EnIn1] changes from 0 to 1. | If [EnIn1] changes from 0 to 1. |
If [EnIn1] = 1 and [ValIn1] or [OpIn1] or [LvlIn1] or [StepIn1] change. | If [EnIn1] = 1 and [ValIn1] or [OpIn1] or [LvlIn1] or [StepIn1] change. | |
If [EnIn1] = 1 and [RptcIn1] = 1. | If [EnIn1] = 1 and [RptcIn1] = 1. | |
Release | If [EnIn1] changes from 1 to 0. | If [EnIn1] changes from 1 to 0. |
If [EnIn1] = 0 and [RptcIn1] = 1. | If [EnIn1] = 0 and [RptcIn1] = 1. | |
Behavior in the event of commanding from another source | [EnIn1] = 0 | [EnIn1] = 0 |
[EnIn1] = 1 | [EnIn1] = 1 |
The data point periodically saves the value of priority 8 to controller memory. After a power outage, the value is restored in the property 'Priority array' and evaluated by the data point. All other priorities are not saved to controller memory.
Operation with other input sets of function block ([EnIn2]...[EnIn4], [ValIn2]...[ValIn4], [OpIn2]...[OpIn4], [LvlIn2]...[LvlIn4], [StepIn1]...[StepIn4], [RptcIn2]...[RptcIn4]) is the same.
Pin description (inputs)
BaObjRef | |
|---|---|
BA-Object reference Structure [BaObjRef] defines a bound connection between XFB and BACnet object. The binding occurs automatically. Manual configuration attempts are not necessary and can result in system errors. | |
DeviceId | Device identifier Double word (default value: 16#3FFFFF) [DeviceId] comprises object type and object instance in a single identifier. It is used to identify device object: local or remote. Local device object could also be identified by value 16#3FFFFF. |
ObjectId | Object identifier Double word (default value: 16#3FFFFF) [ObjectId] comprises object type and object instance in a single identifier. It is used to identify object within a device. |
ItemId | Item identifier Integer (default value: -1) [ItemId] represents an item index in the functional view node object, which references the BACnet object. [ObjectId] and [ItemId] together define an indirect access reference to the BACnet object. Value -1 indicates that direct binding is used. |
TshVal |
|---|
Threshold value Real (default value: 0.1) A parameterized value used to control the XFB write attempts. An attempt is only allowed if the value difference is equal or greater than [TshVal]. Exception: the change equals a limit value such as 0.0 or 100.0 ([TshVal] is ignored). Note |
EnIn1...4 | |
|---|---|
Enable input 1 Boolean (default value: False) [EnIn1] controls whether [ValIn1] or [OpIn1] is commanded at the priority held by [PrioIn1] or if the priority is released. [EnIn1] belongs to one of four input sets, each containing [EnInX], [ValInX], [OpInX], [LvlInX], [StepInX], [PrioInX], and [RptcInX]. These input sets command a single lighting output object at different priorities as needed. [EnIn1] can be parameterized (set by developer), or it is linkable in the CFC chart and calculated by the control program during runtime. [EnIn2]...[EnIn4] functionality is identical to [EnIn1]. | |
1 (True) | The priority held by [PrioIn1] is commanded. |
0 (False) | The priority held by [PrioIn1] is released if it is not currently active by a different [EnInX] set to True. |
ValIn1...4 |
|---|
Value input 1 Real (default value: 0.0) [ValIn1] is used to command the present value property at [PrioIn1] (target state commanding). [ValIn1] can be parameterized (set by developer), or it is linkable in the CFC chart and calculated by the control program during runtime. [ValIn1] will command present value at the priority held by [PrioIn1] if:
[ValIn2]...[ValIn4] functionality is identical to [ValIn1]. Note |
OpIn1...4 |
|---|
Operation input 1 Integer (default value: 32767) [OpIn1] is used to command the control command property (sub elements [LvlIn1] and [StepIn1]) at [PrioIn1]. [OpIn1] can be parameterized (set by developer), or it is linkable in the CFC chart and calculated by the control program during runtime. If [OpIn1] equals the maximum integer value, the input set runs as a target state command. For all other values [OpIn1] runs as control-command. [OpIn1] will command at the priority held by [PrioIn1] if:
[OpIn2]...[OpIn4] functionality is identical to [OpIn1]. Note |
LvlIn1...4 |
|---|
Level input 1 Real (default value: 0.0) [LvlIn1] is part of the command field [OpIn1] and defines the target level for the input set. It is written to the lighting output object in conjunction with the commanding of [OpIn1] and is used in combination with some of the Op commands (for example, goto-level, fade-to, ramp-to). [LvlIn1] can be parameterized (set by developer), or it is linkable in the CFC chart and calculated by the control program during runtime. [LvlIn2]...[LvlIn4] functionality is identical to [LvlIn1]. |
StepIn1...4 |
|---|
Step input 1 Real (default value: 0.0) [StepIn1] is part of the command field [OpIn1] and defines the step increment for the input set. It is written to the lighting output object in conjunction with the commanding of [OpIn1] and is used in combination with some of the Op commands (for example, step-up and step-down). [StepIn1] can be parameterized (set by developer), or it is linkable in the CFC chart and calculated by the control program during runtime. [StepIn2]...[StepIn4] functionality is identical to [StepIn1]. |
PrioIn1...4 | |
|---|---|
Priority input 1 Integer (default value: 17) [PrioIn1] holds the priority that accompanies [ValIn1] or [OpIn1]. [PrioIn1] is parameterized and cannot be changed during runtime. A value of 17 means the input set is not being used. [PrioIn2]...[PrioIn4] functionality is identical to [PrioIn1]. Note | |
Priority range | 1...16 See restrictions on priority 6 and priority 8 below. |
Exclusive control | Priorities 1...5, 9...12 and 14...16 On start-up of the control program, the function block uses exclusive control to initialize any assigned priorities in ranges 1...5, 9...12 and 14...16. At runtime the function block continues to hold exclusive control. If an external overwrite is detected, the function block will re-command or re-release at the priority held by [PrioIn1]. Two or more input sets on the same function block must not share a common exclusive control priority, otherwise a conflict will result. |
Last wins | Priorities 7, 8 and 13
|
Priority 6 | Per BACnet, command priority 6 is reserved for minimum on/off functionality. Commands at priority 6 are rejected by the BACnet object. To provide minimum on/off functionality, the control program should contain the feature and command at another priority. |
Priority 8 | Per BACnet, command priority 8 is for manual operator use and is not typically assigned on the function block. Last wins functionality could allow the control program to change or release an operator command. |
RptcIn1...4 |
|---|
Repeat command input 1 Boolean (default value: False) [RptcIn1] is used to force repeat a command or release a priority.
[RptcIn2]...[RptcIn4] functionality is identical to [RptcIn1]. Note [RptcIn1] is linkable and will typically be calculated and set by the control program. |
PrioX |
|---|
Priority X Integer (default value: 17) A parameterized input that can be used to query if a particular priority contains a valid commanded value or is released (NULL). [PrioX] cannot be changed during runtime. If [PrioX] is set to a value 1...16, the corresponding priority will be queried. The result is provided by the output pin [PrioXAct]. |
OphMod |
|---|
Operating hours mode Integer (default value: 1) An input which can be used to write the calculated lifecycle state of the illuminant to the lifecycle state property. The value of lifecycle state is read back and provided by output pin [OphSta]. [OphMod] is linkable and will typically be calculated and set by the control program. |
Pin description (outputs)
PrVal |
|---|
Present value Real (default value: 0.0) The arbitrated present value of the referenced lighting output object, based on the priority array. If the arbitrated value is a target state command, [PrVal] represents the commanded target-state value. If the arbitrated value is a control-command, [PrVal] represents the progress value of the actuator. |
Valid | |
|---|---|
Valid Boolean (default value: False) An indication of whether output pin [PrVal] is reliable. | |
1 (True) | [PrVal] is reliable.
AND
|
0 (False) | [PrVal] is not reliable.
OR
|
PrPrio |
|---|
Present priority Integer (default value: 17) The active priority of the referenced BACnet object. [PrPrio] is set to:
|
PrCmd | |
|---|---|
Present command Boolean (default value: False) Indicates whether the current present value is from a target state command or a control-command command. | |
1 (True) | Control-command. |
0 (False) | Target state. |
PrioXAct | |
|---|---|
Priority X active Boolean (default value: False) [PrioXAct] indicates whether the priority being queried by input pin [PrioX] contains a valid commanded value or is released (NULL). Note | |
1 (True) | The queried priority is commanded. |
0 (False) | The queried priority is released (NULL), or the input pin [PrioX] is not being used. |
PrgsVal |
|---|
Progress value Real (default value: 0.0) The actual value of the lighting actuator as indicated by the progress value property. |
InPrgs | |
|---|---|
In progress Boolean (default value: False) An indication of whether a lighting command is being processed and if the light is changing, based on the In process property. | |
1 (True) | A lighting command is being processed. |
0 (False) | No lighting command. |
OpSta | |
|---|---|
Operating state Boolean (default value: False) [OpSta] indicates whether the lighting actuator is on or off. | |
1 (True) | For analog lighting output object, [PrgsVal] is greater than 0.0. For binary lighting output object, Present value = 1 (True). |
0 (False) |
|
OphSta |
|---|
Operating hours state Integer (default value: 0) [OphSta] represents the lifecycle state property, which indicates the lifecycle state of the illuminant. |
OphBrnin |
|---|
Burn-in operating hours Double word (default value: 0) The required burn-in time of an illuminant based on the burn-in time property from the output object. |
OphExpd |
|---|
Expected operating hours Double word (default value: 0) [OphExpd] represents the Life time property of the output object and indicates the expected lifetime of an illuminant. |
Oph |
|---|
Operating hours Double word (default value: 0) [Oph] represents the elapsed active time property of the output object and indicates the accumulated operating hours of the illuminant. It is only updated in intervals of 15 minutes, or when another property of the output object changes. |
ErrCode | |
|---|---|
Error code indication Integer (default value: 20) The status of the last performance of the XFB read operation. | |
= 0 | No error. |
> 0 | Error, see XFB error codes. |
ErrCmd | |
|---|---|
Error command Integer (default value: 20) The status of the last performance of the XFB command operation. | |
= 0 | No error. |
> 0 | Error, see XFB error codes. |
Use case examples
NOTICE

Note
Graphics reflect examples of XFB implementations; See ABT for current examples of CFC.
Push button control: R_LGTX receives push button commands and provides them to CMD_LGT. Only valid commands are ran.
Control program feedback: CMD_LGT reads the actual state and value of the lighting output object and provides these to R_LGTX.
Normal and manual operation:
