Is_bound( ) built-in function, Syntax, Example – Echelon Neuron C User Manual
Page 126
![background image](/manuals/735747/126/background.png)
106
Functions
}
when (...) {
io_out(ioTriac, 0); // full off
}
is_bound( )
Built-in Function
The is_bound( ) built-in function indicates whether the specified network variable
or message tag is connected (bound). The function returns TRUE if the network
variable or message tag is connected, otherwise it returns FALSE.
Typically, the function is used to override error detection algorithms. Many
actuators, for example, are configured to receive updates to input network
variables periodically for new values, or for re-sent values (heartbeats). Failing
such updates for a period of time might constitude an error for such an
application, but the device cannot expect such an update if its network variables
(or message tags) are not yet bound.
The is_bound() function can be used to detect this case, and prevent entering the
error condition.
For network variables, is_bound( ) returns TRUE if the network variable selector
value is less than 0x3000. For message tags, is_bound( ) returns TRUE if the
message tag has a valid address in the address table.
Syntax
boolean is_bound (
net-object-name
);
net-object-name
Either a network variable name or a message tag.
Example
mtimer update_monitor;
network input cp SCPTmaxSentTime cpMaxSendTime;
network input SNVT_color nviColor nv_properties {
cpMaxSendTime
};
...
when(timer_expires(update_monitor))
{
if (is_bound(nviColor) && nviColor::cpMaxSendTime)
{
heartbeat_failure();
update_monitor = nviColor::cpMaxSendTime * 100ul;
}
}