beautypg.com

Configuration data transfer – ProSoft Technology MVI46-GSC User Manual

Page 48

background image

MVI46-GSC ♦ SLC Platform

Reference

Generic Serial Communication Module

Page 48 of 78

ProSoft Technology, Inc.

December 5, 2007

Port 2

M0: File Offset

Description

232

Number of characters to transmit on Port 2 (0 to 256)

233 to 360

Port 2 data to transmit

Important:

The Sequence Block Number is generated by the module and sent in the

input image. After the ladder has processed inputs and set up outputs, the module
expects to see this number returned back in word offset 100 of the Output Image.
When the module sees this value there, it assumes the ladder has completely
processed the last Input Image and is ready for another. Until it sees the SBN it sent in
the Input Image returned in the Output Image, then it will not set up a new Input Image.

If the number of characters to transmit in the write block is not set to zero (words
102 and 232 in the M0 file), data to transmit is present in the block. If the
selected port is not busy transmitting data, the data in the block will be moved to
the port's transmit buffer and sent out the port.

In order to pace the characters for the write operation, an inter-character delay
value is associated with each write message. For devices that do not buffer
received data, when interfacing with a modem in command mode or when
simulating keyboard or keypad entry, inter-character delays may be required. For
example, if the port is tied to a device that expects input with delays of 200
milliseconds between each character, place the data to send to the buffer along
with the length and set the inter-character word (words 101 or 231) to a value of
200 in the module's M0 file in the processor's ladder logic program. The message
will be transmitted with a 200-millisecond wait period between each character.
Because this delay value is sent from the processor for each write message, the
inter-character delay can be set independently for each message. For example,
when writing AT commands to a dial-up modem, an inter-character delay of 100
may be required. But when the modem is in data mode, the inter-character delay
can be set to 0. When the delay is set to 0, the whole packet of data will be
placed in the module's transmit buffer at one time.

Configuration Data Transfer

When the module performs a restart operation, it will request configuration
information from the SLC processor. This data is transferred to the module in the
M0 file using registers 0 to 64. The module will indicates its request for the data
by setting the Configuration Request Bit in the input image (bit 0). The ladder
logic must recognize this bit and fill the M0 file with the module configuration
information stored in a user file. After completing this task, the ladder logic must
set the Configuration Set and Ready bit in the output image (bit 0). The module
will recognize this bit and use the configuration in the M0 file to set up the
module. After the module is completely configured, the Configuration Complete
bit will be set in the input image (bit 1). This indicates to the ladder logic that
normal data transfer can now be performed. The format of the configuration block
is shown below: