ProSoft Technology MVI69-GSC User Manual

Page 77

Advertising
background image

MVI69-GSC ♦ CompactLogix or MicroLogix Platform

Reference

Generic ASCII Serial Communication Module

User Manual

ProSoft Technology, Inc.

Page 77 of 102

September 24, 2010

Block Request from the Processor to the Module
These blocks of data are used to transfer information from the CompactLogix

processor to the module. The structure of the output image used to transfer this

data is shown below:

Word Offset

Description

Port 1

0

Block Sequence Number (Read block number as sent by module) (0 to

127)

1

Inter-character delay for this message (milliseconds between

characters)

2

Number of characters to transmit on Port 1 (0 to 50)

3 to 27

Port 1 ASCII character codes to transmit (up to 50 ASCII characters)

Port 2

28

Inter-character delay for this message (milliseconds between

characters)

29

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

30 to 54

Port 2 ASCII character codes to transmit (up to 50 ASCII characters)

55 to 59

Reserved

The Block Sequence Number is that received on the last read block transfer

through the input image on the module. The ladder logic should copy this value

from byte 0 of the input image to byte 0 of output image in the ladder logic. This

must be the last operation performed when constructing the write block. The

module’s program will trigger the process write block function when a new value

is recognized in byte 0 of the output image. If the number of characters to

transmit in the write block is not set to zero (non-zero value in bytes 2 and 29),

this indicates to the module there is data present in the block that needs to be

transmitted. If the selected port is not already busy transmitting data from a

previous write block, the data in the block will be moved to the port’s transmit

buffer and sent out the port as soon as possible.
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 in the write block

output image along with the length and set the inter-character delay byte (bytes 1

and 28) to a value of 200 in the module’s output image 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.

Advertising