Echelon Mini FX User Manual

Page 78

Advertising
background image

Mini FX User's Guide

65

Neuron C also provides a way to organize the network variables and configuration

properties in the device into functional blocks. Functional blocks provide a collection of
network variables and configuration properties that are used together to perform one

task. These network variables and configuration properties are called the functional

block members.

Each network variable, configuration property, and functional block is defined by a type

definition contained in a resource file. Network variables and configuration properties
are defined by network variable types (NVTs) and configuration property types (CPTs).

Functional blocks are defined by functional profile templates (FPTs).
Network variables, configuration properties, and functional blocks in Neuron C can use
standardized, interoperable types. The use of standardized data types promotes the

interconnection of disparate devices on a L

ON

W

ORKS

network. For network variables,

the standard types are called standard network variable types (SNVTs). For
configuration properties, the standard types are called standard configuration property

types (SCPTs). For functional blocks, the standard types are called standard functional

profiles (SFPTs). If you cannot find standard types or profiles that meet your
requirements, Neuron C also provides full support for user-defined network variable

types (UNVTs), user-defined configuration property types (UCPTs), and user-defined

functional profile templates (UFPTs).

A Neuron C application executes in the environment provided by the Neuron firmware.

This firmware provides an event-driven scheduling system as part of the Neuron C
language’s run-time environment. Therefore, a Neuron C application does not use a

single entry point, as is the case with ANSI C’s main() function. Instead, a Neuron C

application uses when-tasks and interrupt-tasks to specify application code to be
executed in response to various system events or interrupt requests, much in the way of

a .NET event handler.
The Neuron firmware contains a scheduler, which executes these when-tasks in an
orderly and deterministic fashion as and if needed. Neuron C when-tasks can be

triggered by system events (such as reset), network events (such as a network variable
update or network error), I/O events (such as a new reading from an I/O input), timer

events, or any arbitrary application-defined event.
Interrupt-tasks are activated as the interrupt request occurs, subject to interrupt
prioritization rules. Neuron C interrupt-tasks can be triggered by edge or level

conditions on any of the dedicated I/O pins, by events occurring in the embedded timer
and counter units, or by a dedicated high-resolution system timer. Interrupt-tasks are

only supported by Series 5000 chips. Other interrupt sources, such as those related to

sending or transmitting serial data over the embedded UART, are handled transparently
by the Neuron firmware.
Neuron C also provides a lower-level application messaging service integrated into the

language in addition to the network variable model. While the network variable model
has the advantage of being a standardized method of information interchange that

promotes interoperability between multiple devices from multiple vendors, application
messaging is available for proprietary and standard special-purpose solutions.

Application messages are used with the L

ON

W

ORKS

file transfer protocol, a standard

mechanism for transfer of large amounts of data, and the ISI protocol, a standard
mechanism to manage networks without intervention of a dedicated tool or specialist.
Another Neuron C data object is the application timer object. Timer objects can be

declared and manipulated like variables. When a timer expires, the Neuron firmware
automatically manages the timer events and notifies the program of those events.

Advertising