Rockwell-automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User M Manual do Utilizador Página 104

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 312
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 103
Chapter 6
&"''%"'"'%
6-23
All external access to the control coprocessors user memory is through the
TAG table of the coprocessor. The TAG functions provide a way for you
to specify access to control-coprocessor memory. The memory of the
tagged area can be of any data type—e.g., char, short, float, etc.—or
combination of data types. It is your responsibility to understand the
layout of the tagged memory. Transmission or reception of tagged
memory data is done as a “byte stream.” External devices can have
different memory structures—i.e., byte order, data sizes, etc. When
reading tagged data from the coprocessor, the external process must
accommodate the differences when interpreting the byte stream. Similarly,
when writing to the tagged area, the external process must generate a byte
stream to match that of the coprocessor tagged memory.
EXAMPLE Program of INTERCHANGE Access
to CoprocessorĆTagged Memory
The following example illustrates how to set up the tagged memory of the
coprocessor and access that memory over Ethernet using INTERCHANGE
software on the host computer.
In this example, we set up a tagged area defined by the structure CAR.
The TAG name “Car” points to the start of the CAR structure. The
memory allocated by the OS9 compiler for the CAR structure is:
Structure Offset Allocation
 *  ! '& *
 ! '& *
 ! '& *
 ! '& *
 !#
 '($
 # #%
 )$ ('
 (% '& *
 (% '& *
 (% '& *
(% '& *
Note the inclusion of a “pad” byte generated by the compiler. The pad
byte is necessary to make year start on an even addressed boundary. This
illustrates how imperative it is that you know the exact memory layout of
the tagged area.
The following example of a coprocessor program creates the Car TAG and
periodically increments the make, model and type elements of the
structure. In this example, the coprocessor is set up to be station 22 octal
(12h). To increase readability of the example, no error checking is done.
Vista de página 103
1 2 ... 99 100 101 102 103 104 105 106 107 108 109 ... 311 312

Comentários a estes Manuais

Sem comentários