Nv_in_index variable, Read_only_data variable, Read_only_data_2 variable – Echelon Neuron C User Manual

Page 216: Read_only_data_3 variable

Advertising
background image

196

Built-In Variables, Objects, Symbols, and Semaphore

nv_in_index

Variable

The nv_in_index variable contains the network variable global index for an

nv_update_completes, nv_update_fails, nv_update_succeeds, or nv_update_occurs
event. When one of these events evaluates to TRUE, nv_in_index contains the

network variable global index to which the event applies. The contents of

nv_in_index are undefined if no network variable events have occurred. Updates
occur when one of the above events are checked or when post_events( ) is called

(either explicitly from the program or by the scheduler between tasks) and events

arrive for network variables for which there is no corresponding event.

The global index of a network variable is set during compilation and depends on

the order of declaration of the network variables in the program. The type of
nv_in_index is unsigned short. The global index of a network variable can be

accessed using either the global_index property, or using the nv_table_index( )

function.

read_only_data

Variable

read_only_data_2

Variable

read_only_data_3

Variable

The read_only_data, read_only_data_2, and read_only_data_3 variables contain

the read-only data stored in the Neuron Chip or Smart Transceiver on-chip

EEPROM, at location 0xF000. The secondary part (read_only_data_2) is
immediately following, but only exists on Neuron Chips or Smart Transceivers

with version 6 firmware or later. The tertiary part (read_only_data_3) is

immediately following, but only exists on Neuron Chips or Smart Transceivers
with version 16 firmware or later.
This data defines the Neuron identification, as well as some of the application

image parameters. The types are structures, declared in <access.h> as follows:

#define NEURON_ID_LEN

6

#define ID_STR_LEN

8


typedef struct read_only_data_struct {

unsigned neuron_id [NEURON_ID_LEN];

unsigned

model_num;

unsigned

: 4;

unsigned

minor_model_num

:

4;

const nv_fixed_struct * nv_fixed;

unsigned read_write_protect

: 1;

unsigned

: 1;

unsigned nv_count

: 6;

const snvt_struct * snvt;

unsigned id_string [ID_STR_LEN];

unsigned NV_processing_off : 1;

unsigned two_domains : 1;

unsigned explicit_addr : 1;

unsigned

: 0;

unsigned address_count

: 4;

Advertising