beautypg.com

ProSoft Technology MVI69-GEC User Manual

Page 54

background image

Contents

MVI69-GEC ♦ CompactLogix or MicroLogix Platform

User Manual

Page 54 of 86

ProSoft Technology, Inc.

February 18, 2014

5.2.1 Receiving ASCII Text as a Client

The MVI69-GEC can receive ASCII strings from the same server it sends to. Since the client
socket connection has already been established with the server, the incoming data will be
stored in the GEC.C

LIENTS

[

X

].R

EAD

D

ATA

array.

1 When the MVI69-GEC receives an ASCII string from a server, the

GEC.S

TAT

.C

LIENT

[

X

].R

X

C

OUNT

controller tag increments by 1. You will need to monitor

this tag to determine a new message was received.

2 The GEC.C

LIENT

[

X

].R

EAD

D

ATA

array contains the ASCII text of the new message. This

array is overwritten every time a new string is received. You will need to create logic that
monitors when a new message is received (GEC.S

TAT

.C

LIENT

[

X

].R

X

C

OUNT

increases by

1), and copies the text out of the GEC.C

LIENTS

[

X

].R

EAD

D

ATA ARRAY

.

3 The number of characters received in the new message is located at

GEC.C

LIENTS

[0].R

EAD

D

ATA

C

OUNT

.

4 The accumulated total number of characters received is located at

GEC.C

LIENTS

[0].R

EAD

T

OTAL

C

OUNT

.

5.2.2 Receiving ASCII Text as a Server

When a server port of the MVI69-GEC is set up, it will accept incoming ASCII text from a
client only.

1 When the MVI69-GEC receives an ASCII string from a client, the

GEC.S

TAT

.S

ERVER

[

X

].R

X

controller tag increments by 1. You will need to monitor this

tag to determine a new message was received.

2 The GEC.S

ERVERS

[

X

].R

EAD

D

ATA

array contains the ASCII text of the new message.

This array is overwritten every time a new string is received. You will need to create logic
that monitors when a new message is received (GEC.S

TAT

.S

ERVER

[

X

].R

X

increases by

1), and copies the text out of the GEC.S

ERVERS

[

X

].R

EAD

D

ATA

array.

3 The number of characters received in the new message is located at

GEC.S

ERVERS

[0].R

EAD

D

ATA

C

OUNT

.

4 The accumulated total number of characters received is located at

GEC.S

ERVERS

[0].R

EAD

T

OTAL

C

OUNT

.