Vous êtes sur la page 1sur 2

Presentation

With four internal words (%MWk:4), parameters identify the address of the PL7 data used to monitor the communication functions. The first two words %MWk and %MWK+1 are managed by the system. You will be in charge of managing the last two words %MWk+2 and %MWk+3.

Structure

The four words %MWk:4 respect the following structure:

Data managed by the system

Number of the word %MWk

Most significant byte Number of exchange

Least significant byte Activity bit

%MWk+1

Operation report

Communication report

Data managed by you

%MWk+2

Timeout

%MWk+3

Length

Activity bit

This bit corresponds to %MWk:x0. It signals the state of the application of the communication function.It is set at 1 whilst started and drops back down to 0 at the end of its execution.

Number of exchange

During the sending of a communication function, the system automatically assigns it a number, allowing the identification of the exchange. This number allows the exchange in progress to be stopped if necessary (by the functions intermediary CANCEL ).

Introduction

Communication and operation reports make up part of the management parameters. Note: It is recommended that communication function reports be tested after use and before being started

again. For cold starts, it is imperative that communication functions management parameters for ?? be reset to

0.

Communication report

This report is common to all functions. It is significant when the value of the activity bit changes from 1 to 0.The reports with a value between 16#01 and 16#FE concern the errors detected by the processor that has started the function. The different values of this report are indicated in the following table:

Value

Communication report ( least significant byte )

16#00

Correct exchange

16#01

Stopping the exchange via a timeout

16#02

Stopping the exchange on user request CANCEL

16#03

Incorrect address format

16#04

Incorrect target address

16#05

Incorrect management parameter format

16#06

Incorrect specific parameters

16#07

Problem with sending to destination

16#08

Reserved

16#09

Size of reception buffer is insufficient

16#0A

Size of emission buffer is insufficient

16#0B

Absence of processor resource system

16#0C

Incorrect exchange number

16#0D

No telegram received

16#0E

Incorrect length

16#0F

Telegram service non configured

16#10

Network coupler absent

16#11

Request absence

16#12

Application server already active

16#13

UNI-TE V2 transition number incorrect

16#FF

Message refused

Note: The function can detect an error in the parameters before activating the exchange. In this case the activity bit remains 0, the report is initialized with the values corresponding to the default.

Operation report

This report byte, which is specific to each function, specifies the effect of the operation on the remote application.It is only significant if the communication report has the values:

16#00 (correct exchange), 16#FF (message refused). If the communication report has the value 16#00, the operation report has the following values:

Value

Communication report ( least significant octet )

16#00

Positive result

16#01

Non processed request

16#02

Incorrect response

16#03

Reserved

If the communication report has the value 16#FF, the operation report has the following values:

Value

Communication report ( least significant octet )

16#01

Lack of resource to the processor

16#02

Lack of line resource

16#03

Item of equipment absent or without resource (*)

16#04

Line error

16#05

Length error

16#06

Communication channel at fault

16#07

Addressing errors

16#08

Application error

16#0B

Absence of resource system

16#0C

Communication function non active

16#0D

Destination absent

16#0F

Intra-station routing problem or non configured channel

16#11

Address format not handled

16#12

Lack of destination resource

16#14

Non operational connection ( example: ETHERNET TCP/IP)

16#15

Lack of resource on the local channel

16#16

Non authorized access (example: ETHERNET TCP/IP)

16#17

Incoherent configuration network (example: ETHERNET TCP/IP)

16#18

Connection temporarily unavailable

16#21

Application server at a stop

Caption :

(*)

Code uniquely managed by PCMCIA cards TSX FPP20 et TSX FPP10

Introduction

These two parameters are dependant upon you.

Length

The length parameter is used both to specify the number of characters (in bytes) to send when sending a message and to store the number of characters (in bytes) received upon the receipt of a message. Each time before starting certain communication functions SEND_REQ, DATA_EXCH , PRINT_CHAR ,SEND_TLG you must update the length parameter. Note: For a functionPRINT_CHAR for example, the length parameter %MWk+3 must contain the number of octets (characters) to be sent before sending a message. After sending the characters, it contains the number of characters sent in the form of a communication report. If another function, which has a differing amount of bytes to be sent from the preceding function, uses the same report table during the application, you must initialize %MWk+3 with the new number of bytes to be sent. If not %MWk+3 maintains the number of bytes sent by the preceding function.

Timeout

Timeout determines the maximum waiting time for a response. The time base for this parameter is 100 ms (value 0 corresponds to an infinite stand by value).If timeout has elapsed, the exchange finishes with an error report, in the same way the receipt of a response is refused by the system after the end of timeout.