Example 3 – event for a range of network variables, Nv_update_occurs event, Syntax – Echelon Neuron C User Manual
Page 32
12
Predefined Events
...
when (nv_update_fails(nvoHumidity))
{
...
}
Example 3 – Event for a Range of Network
Variables
network output SVNT_abs_humid nvoHumidity1, nvoHumidity2,
nvoHumidity3;
...
nvoHumidity2 = 32;
...
when (nv_update_fails(nvoHumidity1 .. nvoHumidity3))
{
...
}
nv_update_occurs
Event
The nv_update_occurs event evaluates to TRUE when a value has been received
for an input network variable.
If an array name is used, then each element of the array is checked to see if a
value has been received. The event occurs once for each element that receives an
update. An individual element can be checked with use of an array index. When
nv_update_occurs is TRUE for an event qualified by the name of an entire NV
array, the nv_array_index built-in variable (type short int) can be examined 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 to see if a value has
been received. The event occurs once for each network variable in the range that
receives an update.
Syntax
nv_update_occurs [(
network-var
)]
nv_update_occurs [(
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 for any network
variable update.