ProSoft Technology MVI69-ADM User Manual

Page 52

Advertising
background image

Understanding the MVI-ADM API

MVI-ADM ♦ 'C' Programmable

Developer's Guide

'C' Programmable Application Development Module

Page 52 of 342

ProSoft Technology, Inc.

February 20, 2013

The Flex processor recognizes a new value in word 0 of the input image
(based on the last_write_block_code not equal to write_block_code) in its
ladder logic. The ladder logic computes the offset into the file based on the
following formula:
write_file_offset = (write_block_code - 1) * 6
The new data contained in the input image (words 2 to 7) is copied to the
offset in the processor’s user data file. The last_write_block_code storage
register in the processor is updated with the new write_block_code.

Note: If the data area transferred from the module exceeds the size of a single user file in the Flex
processor, logic will be required to handle multiple files.

3 The ladder logic next examines the value of the read_block_code and

computes the offset into the read data file as follows:

read_file_offset = (read_block_code - 1) * 6
The required 6-

word, read data is copied to the module’s output image

(words 1 to 6). To "trigger" the transfer operation, the ladder logic moves the
read_block_code into word 0 of the output image.

4

The module’s program recognizes the new read_block_code. It transfers the
data to the correct offset in the database using the following function:

offset = Read_Start_Register + (read_block_code - 1) * 6
The module sets the last_read_block_code to the value of read_block_code.

5 The module now selects the next read and write blocks. The data for the write

operation is placed in the input image and the read_block_code is set. The
module "triggers" the transfer operation by setting the new write_block_code
in word 0 of the input image. The sequence continues at step 3.

The discussion above is for normal data transfer operation. The following table
lists the block identification codes used by the module.

Block Identification Codes

Type

Number

Description

R/W

1 to 666

Data blocks used to transfer data from the module to the
backplane and from the backplane to the module. The module's
input/output images are used for the data transfers.

R

9998

Warm boot the module. When the module receives this block, it
will reset all program values using the configuration data.

R

9999

Cold boot the module. When the module receives this block, it
will perform a hardware restart.

Advertising