Nv_update_completes event, Syntax – Echelon Neuron C User Manual
Page 29
Neuron C Reference Guide
9
...
msg_out.tag = tag_out;
msg_send();
...
when (msg_succeeds(tag_out))
{
...
}
nv_update_completes
Event
The nv_update_completes event evaluates to TRUE when an output network
variable update completes (that is, either fails or succeeds) or a poll operation
completes. Checking the completion event (nv_update_completes, or
nv_update_fails in combination with nv_update_succeeds) is optional by network
variable.
If an array name is used, then each element of the array is checked for
completion. The event occurs once for each element that experiences a
completion event. An individual element can be checked by using an array index.
When nv_update_completes is TRUE for an event qualified by the name of an
entire NV array, you can examine the nv_array_index built-in variable (type
short int) to obtain the element’s index to which the event applies.
If a network variable range is used, then the network variable at the beginning of
the range must have a lower global index than the network variable at the end of
the range. Each network variable in the range is checked for completion until
the first such network variable with an event is found. The event occurs for each
network variable in the range that experiences a completion event.
If a program checks for the nv_update_succeeds event, it must check for the
nv_update_fails event as well. The alternative is to check
only
for
nv_update_completes. A program is also permitted to check only for
nv_update_fails as long as there is no use of nv_update_completes or
nv_update_succeeds for
any
network variable.
Syntax
nv_update_completes [(
network-var
)]
nv_update_completes [(
network-var1
..
network-var2
)]
network-var
A network variable identifier, a network variable array
identifier, or a network variable array element. A range
can be specified with two network variable identifiers or
network variable array elements separated with a range
operator (two consecutive dots). The range is defined by
the indices of the referenced network variables. If the
parameter is omitted, the event is TRUE when any
network variable update completes.