Typed write – Rockwell Automation 1785-Vx0B, D17856.5.9 PLC-5 VME VMEbus Programmable Controllers User Manual User Manual

Page 87

Advertising
background image

Chapter 6

PLC-5/VME Processor
Communications Commands

6-18

This command lets the host CPU write file data to the PLC-5/VME
processor one packet at a time starting at a specified address plus packet
offset. Your driver program must:

re-issue the command for each packet the number of times required to

complete the total transaction.

manipulate the offset field to place data of each packet in the correct

destination location.

The PLC-5/VME processor:

automatically checks that the total transaction value does not extend

beyond the end of the data file.

does not check for overlap or spaces between packets.

Typed-write commands contain a data-type ID. The host CPU places the
data-type code in the typed-write command packet. The PLC-5/VME
processor places the data-type code in the reply packet of a typed-read
command. The type of data sent with this typed-write command must
match the file type written to. The driver program of the host CPU must
convert data types when necessary.

Important: You may write multiple elements of the same data type
in a packet by selecting the data-type ID for the array. You may write
one element of a data type in each packet by selecting any of the
standard data-type codes such as for integer, timer, counter, control, or
floating point.

See the “Header Bit/Byte Descriptions” section on page 6-4 for
descriptions of all bytes except the following:

Use the:

To:

PLC-5/VME processor
ADDR field

specify the destination file number and first element number. If the total
transaction requires more than one packet, keep this address constant
and manipulate the OFFSET value.

OFFSET field
(2 byte, low byte first)

point to the starting element of each packet when the total transaction
requires more than one packet. The offset specifies the number of
elements above the base address (PLC-5/VME processor ADDR). Set
the offset to zero for the first packet and manipulate its value for each
successive packet. The PLC-5/VME processor does not check overlaps
or spaces between packets.

TOTAL TRANS field
(2 bytes, low byte first)

specify the number of data elements (excluding ID bytes) of the
total transaction. By specifying the total transaction in the first of
multiple packets, the PLC-5/VME processor can generate an error
code if the total transaction value will exceed the end boundary of the
destination file.

Typed Write

Advertising