R_LGTX: Read multiple lighting

R_LGTX reads a structured Present value property from one of multiple (up to 16) aggregated member lighting input objects (member objects are aggregated by means of a Collection view node object). R_LGTX is designed to detect the first input that has been updated since last read. R_LGTX provides the signals Valid, UpdInd, ErrCode and ErrWrit to the Control program for processing.

R_LGTX will also, optionally, provide the current lighting state, value, and condition of manual operation lock from the control program to be written back to each aggregated lighting input object. R_LGTX will do this if the associated input pins have been wired to receive values during runtime. Otherwise (input pins not wired) R_LGTX will write to the aggregated BA-Objects after a download / restart only those values (set by engineer) that are not default.

Control-command commanding
Control-command commanding is the typical runtime condition in which lighting input objects receive push button commands represented by the structured Present value property with elements [PrOp], [PrLvl], and [PrStep]. R_LGTX provides the most recent input request to a command lighting XFB. The command lighting XFB writes the request with an accompanying priority level to a lighting output object, and also reads the actual lighting state and value (which could be different than what was commanded) and present priority from the lighting output object. The command lighting XFB provides these values back to R_LGTX, to be (optionally) written to each aggregated lighting input object’s properties (Lighting state, Lighting value, and Room operator unit, manual operation locked). Since typically there are multiple inputs affecting the same lights, each input object needs to be aware of and reflect the actual state and value of the lights based on the most recent input request.

Manual operation lock
The command lighting XFB can read the current priority at the lighting output object, and if it is higher than the priority used for manual operation, then the lighting input devices can be notified and manual operation prevented.

Hardware interrupt

This XFB supports hardware interrupts (OB trigger) for immediate response to specific events such as manual switching of lights. If the XFB is applied in a chart assigned to OB40 or OB41, OB triggering occurs automatically on interrupt signals from I/O modules.

Compatible data points:

Refer to data point objects for a detailed description of the BACnet data points.

Required properties:

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.

Val

Value

Real (default value: 0.0)

The current value of the lighting actuator, as read by the control program from the lighting output object.

[Val] represents the lighting value to write to all aggregated member lighting input objects, to the Lighting value property. Entries to, and use of [Val] are optional.

[Val] will be written for any of the following:

  • [Val] changes by an amount equal or greater than [TshVal].
  • [Val] changes to ActlMin (0) or to ActlMax (100). [TshVal] is ignored.
    (ActlMin and ActlMax are internal variables of this XFB.)
  • [RptWrit] is True.

Note
[Val] will be written to all aggregated member lighting input objects regardless of valid or out of service state. These states (fault, out of service) apply to the physical input for the present value fields (operation, level and step-increment). If communication to the object is possible, the update of the current application directed values are still applicable to be sent to the object fields.

Sta

State

Boolean (default value: False)

The current state of the lighting actuator, as read by the control program from the lighting output object.

[Sta] represents the lighting state (On/Off) to write to all aggregated member lighting input objects, to the lighting state property. Entries to, and use of [Sta] are optional.

[Sta] will be written for any of the following:

  • [Sta] changes.
  • [RptWrit] is True.

Note
[Sta] will be written to all aggregated member lighting input objects regardless of valid or out of service state. These states (fault, out of service) apply to the physical input for the present value fields (operation, level and step-increment). If communication to the object is possible, the update of the current application directed values are still applicable to be sent to the object fields.

TshVal

Threshold value

Real (default value: 1.0)

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
[TshVal] must not be set to 0.0.

ManOpLck

Manual operation locked

Boolean (default value: False)

[ManOpLck] provides information on whether manual operation should be allowed at the lighting input devices (push button or operation panel). The lighting command XFB can read the current priority at the lighting output object, and if it is higher than the priority used for manual operation, then the lighting input devices can be notified and manual operation prevented. Entries to, and use of [ManOpLck] are optional.

[ManOpLck] will be written for any of the following:

  • [ManOpLck] changes
  • [RptWrit] is True.

Note
[ManOpLck] will be written to all aggregated member lighting input objects regardless of valid or out of service state. These states (fault, out of service) apply to the physical input for the present value fields (operation, level and step-increment). If communication to the object is possible, the update of the current application directed values are still applicable to be sent to the object fields.

RptWrit

Repeat write

Boolean (default value: False)

[RptWrit] forces a write of inputs [Val], [Sta], and [ManOpLck] to the lighting input objects. The write operation is repeated with each program cycle for as long as [RptWrit] is True.

[RptWrit] will typically be calculated and set by the control program.

Note
[RptWrit] must not be forced permanently to True by connecting to a block output that is always True. Doing so will cause a high level of communication traffic.

1 (True)

[Val] and [Sta] are written to the lighting input objects with each program cycle for as long as [RptWrit] is True.

0 (False)
default

No action.

Pin description (outputs)

PrOp

Present operation

Integer (default value: 0)

The value of the Operation element of the present value property from the last updated member of the aggregated lighting input objects.

[PrOp] will deliver the last valid value if [Valid] = False.

0 (Stop) default

Command to stop dimming.

1 (Start dim-up)

Command to increase the current dimming value continuously up to 100% or until a stop command is received.

2 (Start dim-down)

Command to decrease the current dimming value continuously down to 0% or until a stop command is received.

3 (Step-up)

Command to increase the current dimming value in discrete steps (step increments) by adding an amount specified by [PrStep].

4 (Step-down)

Command to decrease the current dimming value in discrete steps (step increments) by subtracting an amount specified by [PrStep].

5 (Switch-on)

Command to switch the lighting actuator on.

6 (Switch-off)

Command to switch the lighting actuator off.

7 (Goto level)

Command to directly set the lighting actuator to the target level specified by [PrLvl]. (For example, target state commanding.)

20 (No command)

Command indicating no action to be taken on the lighting actuator.

PrLvl

Present level

Real (default value: 0.0)

The value of the level element of the present value property from the last updated member of the aggregated lighting input objects.

[PrLvl] will deliver the last valid value if [Valid] = False.

PrStep

Present step

Real (default value: 0.0)

The value of the step element of the present value property from the last updated member of the aggregated lighting input objects.

[PrStep] will deliver the last valid value if [Valid] = False.

Valid

Valid

Boolean (default value: False)

An indication of whether output pins [PrOp], [PrLvl] or [PrStep] are reliable.

1 (True)

Present value output pins are reliable.

  • XFB can access the lighting input object(s).

AND

  • In the last updated object, fault flag in state flag property = 0 (no fault)
    (Reliability = 0 (no error) or Reliability was not detected).

0 (False)

Present value output pins are not reliable.

  • XFB cannot access the lighting input object(s).

OR

  • In the last updated object, fault flag in state flag property = 1 (fault)
    (Reliability ≠ 0).

UpdInd

Update indication

Boolean (default value: False)

An indication of whether the Present value (structured lighting input command) property for one of the aggregated member objects has been newly updated.

When an update occurs, [UpdInd] toggles from 0 to 1 (True) and returns to 0 (False) on the next cycle (immediate). It is not possible to detect the toggle without an additional function block connected to [UpdInd] (for example, a counter function block). [UpdInd] will only be set to True if [Valid] is True.

[UpdInd] uses the update count property. This makes it possible to recognize a value as having been updated if the new value is the same as the previous value.

UpdMbr

Update member

Integer (default value: 0)

The last updated lighting input object.

[UpdMbr] will show the index number of the collection view node object ItemId for the last updated member object.

NumVals

Number of valid values

Integer (default value: 0)

The number of valid lighting input objects in the collection view node object.

NumMbrs

Number of aggregated members

Integer (default value: 0)

The total number of member objects in the collection view node object.

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.

ErrWrit

Error while writing

Integer (default value: 20)

The status of the last performance of the XFB write operation to the result object.

= 0

No error.

> 0

Error, see XFB error codes.

Use case examples

 

NOTICE

notice

Note
Graphics reflect examples of XFB implementations; See ABT for current examples of CFC.

 

Push button control-command: R_LGTX receives push button commands and provides them to CMD_LGT.