Primitive field definitions (continued) – Siemens 500 NIM User Manual

Page 65

Advertising
background image

NIM Primitives

4-12

SIMATIC TIWAY I Series 500 NIM User Manual

Primitive Field Definitions (continued)

The symbols used in the remainder of this section to denote the different
types of Primitive fields are summarized in Table 4-3.

Table 4-3

Summary of Primitive Field Symbols

Symbol

Description

LLLL

Length field

PP

Primitive code

HH

Attached device status

TT

Data element types

NNNN

Number of data elements

AAAA or AAAA AAAA

Data element location

DDDD

Data unit(s)

XX

Number of user-derfined structures requested

CC

User-defined structure number

EEEE EEEE

User-defined structure mask

YYYY

Application sequence count

RRRR

Host reference number

MMMM

Attached device data segment definition

OOOO

Attached device time-out value

The Length Field (refer to Figure 4-3) is a 16-bit field that represents the
length (in bytes) of the Primitive, Descriptor(s), and Data Unit field(s). The
Length Field is initialized by the Primary in transmissions to the NIM. It is
also initialized by the NIM in transmissions to the Primary. (Example: the
Length Field for a Primitive 02 request would have a value of 1.)

The Primitive Code Field (see Figure 4-3) is eight bits long, which allows for
256 unique Primitives. The most significant bit of the primitive field code is
used to designate that the extended addressing mode is in effect. In this
mode, the data element location descriptor is a 32-bit field rather than the
16-bit field associated with non-extended addressing.

The Series 500 NIM currently supports a subset of the Primitives: 00, 01,
02, 03, 04, 05, 06, 07, 10, 20, 21, 30, 31, 50, 51, 52, 55, 56, 57, 58, and 59.
The corresponding extended addressing codes are: 80, 81, 82, 83, 84, 85, 86,
87, 90, A0, A1, B0, B1, D0, D1, D2, D5, D6, D7, D8, and D9 (all values in
hexadecimal). These Primitive Codes are described in detail later in this
chapter.

The attached device status is updated by the NIM every four seconds. The
most recent attached device status is returned in most primitives.

Primitive Field
Symbols

Length Field – LLLL

Primitive Code
Field – PP

Attached Device
Status – HH

Advertising