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

Page 104

Advertising
background image

Chapter 6

PLC-5/VME Processor
Communications Commands

6-35

d.

Calculate the number of full physical reads that will be done
from the processor during the upload operation.

The maximum number of bytes is 244 for a physical read. We
will use 238 bytes in this example because that is the maximum
for physical write operations—this makes it easier to download
the processor’s memory in the future. This is an integer
division calculation:

fullReadCount = segmentSize / 238

e.

Calculate the number of bytes in the final physical read that may
have to be done from the processor. This could be zero if the
segmentSize is an even multiple of 238 bytes. This is a
modulus integer calculation:

fullReadSize = segmentSize % 238

f.

Do fullReadCount PCCC Read Bytes Physical (see page 6-26)
operations on the processor. For each packet read from the
processor, write the following into a binary file:

Address Read From PLC

(4 bytes)

Physical Read Size

(1 byte)

Processor Memory

(up to 238 bytes)

Verify the upload by reading the packet just written to the file
against the version in memory.

Be sure that you update the next address to read by the Physical
Read Size in your reading loop.

9.

Verify the upload by repeating the process described in step 8 with
this change: instead of writing the data to a file, compare it to the
data that you previously stored in the file.

10.

Terminate the processor upload operation. You can do this by using
the PCCC command Upload Complete described on page 6-24.

11.

Return the edit resource so that others can write to the processor. You
can do this by using the PCCC command Return Edit Resource
described on page 6-30.

Advertising