Echelon FTXL User Manual

Page 221

Advertising
background image

FTXL User’s Guide

209

/* Update the status. If the object is not the
* node object, just return the current status
* of the object. Special processing below for

* node object only.
*/
if (index == FBIDX_NodeObject) {

/* When requesting the status of the node
* object, return a status that represents

* the OR of the statuses of all functional

* blocks.
* Don't report the status of the node object
* - use the summary below.

*/

reportStatus = FALSE;


for (i = start; i <= limit; i++) {

nvoStatus.Flags_1 |= FbStatus[i].Flags_1;
nvoStatus.Flags_2 |= FbStatus[i].Flags_2;

nvoStatus.Flags_3 |= FbStatus[i].Flags_3;
nvoStatus.Flags_4 |= FbStatus[i].Flags_4;

}
}

break;

case RQ_REPORT_MASK:

/* All bits are zero unless set explicitly.

* Don't report the status of the object. The

* nvoStatus is filled in below. All fields

* that are untouched are left as 0, indicating

* that the function block does not support the
* associated operation.

*/
reportStatus = FALSE;

/* Mark this as the result of a RQ_REPORT_MASK

*/

LON_SET_ATTRIBUTE(nvoStatus, LON_REPORTMASK,
1);

/* All objects support disable */

LON_SET_ATTRIBUTE(nvoStatus, LON_DISABLED, 1);

break;


case RQ_DISABLED:
/* Disable the object or all objects */

for (i = start; i <= limit; i++) {

LON_SET_ATTRIBUTE(FbStatus[i], LON_DISABLED,

1);

}

break;


case RQ_ENABLE:
/* Enable the object or all objects */

for (i = start; i <= limit; i++) {
if (i == FBIDX_VoltActuator &&
LON_GET_ATTRIBUTE(FbStatus[i], LON_DISABLED))

Advertising