0% found this document useful (0 votes)
116 views

A.2 Receive Message Function (MSG-RCV)

This document describes the MSG-RCV function, which receives a message from a remote station on a specified communication line and protocol. It has the following key points: 1) MSG-RCV receives messages and supports multiple communication devices and protocols. The EXECUTE command must remain ON until processing is complete or an error occurs. 2) It has inputs to specify the communication device, protocol, line number, channel number, and parameter address. The parameter address points to a list defining the message. 3) The parameter list contains status and processing results. For MEMOBUS, it also defines the function code, addresses, sizes, and station numbers. This provides details about the received message.

Uploaded by

White Tiger
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views

A.2 Receive Message Function (MSG-RCV)

This document describes the MSG-RCV function, which receives a message from a remote station on a specified communication line and protocol. It has the following key points: 1) MSG-RCV receives messages and supports multiple communication devices and protocols. The EXECUTE command must remain ON until processing is complete or an error occurs. 2) It has inputs to specify the communication device, protocol, line number, channel number, and parameter address. The parameter address points to a list defining the message. 3) The parameter list contains status and processing results. For MEMOBUS, it also defines the function code, addresses, sizes, and station numbers. This provides details about the received message.

Uploaded by

White Tiger
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

A.

2 RECEIVE MESSAGE Function (MSG-RCV)

A.2 RECEIVE MESSAGE Function (MSG-RCV)


A.2.1 Basic Specifications

Function MSG-RCV
Name
Function Receives a message from the remote station on the line specified by the COMMUNI-
CATIONS DEVICE TYPE command (DEV-TYP). Supports multiple protocol types.
The EXECUTION command (EXECUTE) must be held ON until COMPLETE or
ERROR turns ON. A
Communications devices: 215IF, 217IF, 218IF, serial, SVB-01
Protocols: MEMOBUS, no-protocol
Function
Definition MSG-RCV

EXECUTE BUSY

ABORT COMPLETE

DEV-TYP ERROR

PRP-TYP

CIR-NO

CH-NO
PARAM

I/O No. Name I/O Designation Description


Definitions
Inputs 1 EXECUTE B-VAL RECEIVE MESSAGE command
2 ABORT B-VAL RECEIVE MESSAGE ABORT com-
mand
3 DEV-TYP I-REG Communications device type:
215IF = 1, 217IF = 5, 218IF = 6, Serial
= 8, SVB-01 = 11
4 PRO-TYP I-REG Communications protocol:
MEMOBUS = 1*
No-protocol 1 = 2
No-protocol 2 = 3
5 CIR-NO I-REG Line number:
215IF = 1 to 8, 217IF = 1 to 24
218IF = 1 to 8, Serial= 1 or 2
6 CH-NO I-REG Transmission buffer channel number
215IF = 1 to 13, 217IF = 1
218IF = 1 to 10, Serial = 1
7 PARAM Address input Leading address of setting data
(MW, DW, #W)
Outputs 1 BUSY B-VAL Message is being received.
2 COMPLETE B-VAL Message receiving has been completed.
3 ERROR B-VAL Error has occurred.
* Refer to A.1 SEND MESSAGE Function (MSG-SND).

A-13
Appendix A System Functions
A.2.2 Parameter Lists (PARAM)

A.2.2 Parameter Lists (PARAM)


PARAM is one of the inputs and has a parameter list structure consisting of 17 words. The
value in PARAM is the leading address of a MW, DW, or #W register.

The parameters are shown below. No setting is required for the parameters that are blank in
the “No-protocol” column.

PARAM IN/ Contents Remarks


No. OUT MEMOBUS No-protocol
00* OUT Processing result Processing result
01 OUT Status Status
02 OUT Remote station number Remote station num- Remote connection num-
*2 ber ber when DEV-TYPE is
set to CP-218.
03 SYS Reserved by system. Reserved by system.
04 OUT Function code
05 OUT Data address Data address
06 OUT Data size Data size
07 OUT Remote CPU number Remote CPU number
08 IN Coil offset
09 IN Input relay offset
10 IN Input register offset
11 IN Holding register offset Register offset
12 IN Write range LO Register offset
13 SYS Write range HI Register offset
14 SYS Reserved by system. Reserved by system.
15 SYS Reserved by system. Reserved by system.
16 SYS Reserved by system. Reserved by system.

* 1. PARAM00 is the leading address.


* 2. “IN” when DEV-TYP is set to CP-218.

A-14
A.2 RECEIVE MESSAGE Function (MSG-RCV)

A.2.3 Parameter Details

„ Processing Result (PARAM00)


The processing result is output to the higher-place byte of PARAM00. The lower-place byte
is for system analysis.

• 00††:Processing in progress (BUSY)


• 10††:Processing completed (COMPLETE)
• 8††: Error occurred (ERROR)
A
Error Error Details
Code
81†† Function code error An undefined function code was received.
82†† Address setting error The data address, coil offset, input relay offset,
input register offset, or holding register offset
setting is outside the allowable range.
83†† Data size error The size of the sent or received data is outside
the allowable range.
84†† Line number setting error The line number setting is outside the allowable
range.
85†† Channel number setting The channel number setting is outside the allow-
error able range.
86†† Station address error The station number setting is outside the allow-
able range.
88†† Communications unit error. An error response was returned from the com-
munications unit. See „ Status (PARAM01)
below.
89†† Device selection error An unavailable device was selected.

„ Status (PARAM01)
PARAM01 outputs the status of the communications unit.

1. Bit Assignments

F E D C B A 9 8 7 6 5 4 3 2 1 0

PARAMETER
COMMAND
RESULT
REQUEST

A-15
Appendix A System Functions
A.2.3 Parameter Details

2. COMMAND

Code Symbol Meaning


1 U_SEND General-purpose message sent.
2 U_REC General-purpose message received.
3 ABORT Aborted.
8 M_SEND MEMOBUS command sent: Processing completed upon
receiving response.
9 M_REC MEMOBUS command received: Followed by the sending
response.
C MR_SEND MEMOBUS response sent.

3. RESULT

Code Symbol Meaning


1 SEND_OK Sending has been completed normally.
2 REC_OK Receiving has been completed normally.
3 ABORT_OK Abort completed.
4 FMT_NG Parameter format error
5 SEQ_NG, or INIT_NG Command sequence error:
The token has not been received yet.
The communications system has not been connected.
6 RESET_NG, or Reset state:
O_RING_NG Out-of-ring. The token was not be received even after
the token monitor time had elapsed.
7 REC_NG Data receive error (error detected by a lower-level pro-
gram)

4. PARAMETER
PARAMETER indicates one of the error codes shown in Table A.2. when RESULT is
set to 4 (FMT_NG). Otherwise, it indicates the address of the remote station.

Table A.2 Error Codes

Code Error
00 No errors.
01 Station address outside the allowable range
02 MEMOBUS response receiving time error
03 Retry count setting error
04 Cyclic area setting error
05 Message signal CPU number error
06 Message signal register number error
07 Message signal word count error

5. REQUEST
1 = Request
0 = Acceptance completion report

A-16
A.2 RECEIVE MESSAGE Function (MSG-RCV)

„ Remote Station Number (PARAM02)


PARAM02 outputs the station number of the sender.

For 218IF, specify the connection number of the destination.

„ Function Code (PARAM04)


Set the MEMOBUS function code to be sent.
A
Function Meaning 215IF, 218IF, 217IF,
Code MECHA- Serial*
TROLINK*
00H Not used. No No
01H Coil status read Yes Yes
02H Input relay status read Yes Yes
03H Holding register read Yes Yes
04H Input register read Yes Yes
05H Single coil status change Yes Yes
06H Single holding register write Yes Yes
07H Not used. No No
08H Loopback test Yes Yes
09H Holding register read (extended) Yes No
0AH Input register read (extended) Yes No
0BH Holding register write (extended) Yes No
0CH Not used. No No
0DH Discontinuous holding register read Yes No
(extended)
0EH Discontinuous holding register write Yes No
(extended)
0FH Multiple coil status change Yes Yes
10H Multiple holding register write Yes Yes
11H to 20H Not used. No No
21H to 30H Reserved by system. No No
31H MELSEC fixed buffer communications 218IF only No
32H MELSEC random buffer read 218IF only No
33H MELSEC random buffer write 218IF only No
34H to 3FH Reserved by system. No No
40H to 4FH Reserved by system. No No
50H or later Not used. No No

* Yes: Can be output, No: Cannot be output

MB, MW, IB, and IW registers can be used as coils, holding registers, input relays, and input
registers during slave operation.

A-17
Appendix A System Functions
A.2.3 Parameter Details

„ Data Address (PARAM05)


PARAM05 outputs the data address requested by the sender.

„ Data Size (PARAM06)


PARAM06 outputs the data size (number of bits or words) specified in the read or write
request. For no-protocol 2, the number of bytes is output.

„ Remote CPU Number (PARAM07)


PARAM07 outputs the remote CPU number.

„ Coil Offset (PARAM08)


Set the offset word address of the coils.

This parameter is valid when the function code is 01H, 05H, or 0FH.

„ Input Relay Offset (PARAM09)


Set the offset word address of the input relays.

This parameter is valid when the function code is 02H.

„ Input Register Offset (PARAM10)


Set the offset word address of the input registers.

This parameter is valid when the function code is 04H or 0AH.

„ Holding Register Offset (PARAM11)


Set the offset word address of the holding registers.

This parameter is valid when the function code is 03H, 06H, 09H, 0BH, 0DH, 0EH, or 10H.

„ Write Range LO (PARAM12), Write Range HI (PARAM13)


Set the write-enable range for write requests. Any request outside this range will result in an
error.

This parameter is valid when the function code is 0BH, 0EH, 0FH, or 10H.

0 ≤ write range LO ≤ write range HI ≤ maximum value of MW address

„ For System Use (PARAM14)


This parameter retains the channel number currently being used. Make sure that this param-
eter is set to 0000H by the user program on the first scan after the power is turned ON. The
parameter value must not be changed by the user program at any other time because the
parameter is used by the system.

A-18
A.2 RECEIVE MESSAGE Function (MSG-RCV)

A.2.4 Inputs

„ EXECUTE (RECEIVE MESSAGE EXECUTION Command)


When EXECUTE turns ON, the message is received. This command must be remained ON
until COMPLETE (Processing Completed) or ERROR (Error Occurred) turns ON.

„ ABORT (RECEIVE MESSAGE ABORT Command)


The ABORT command aborts message reception. This takes precedence over EXECUTE
A
(RECEIVE MESSAGE EXECUTION command).

„ DEV-TYP (Communications Device Type)


DEV-TYP specifies the communications device type.

Device Type Code


215IF 1
217IF 5
218IF 6
Serial 8
SVB-01 11

„ PRO-TYP (Communications Protocol)


PRO-TYP specifies the communications protocol.

When transmitting messages with the MELSEC or OMRON protocol, specify MEMOBUS
protocol (=1). Protocol is converted by the communications device (217IF or 218IF).

• MEMOBUS: Setting = 1
• No-protocol 1: Setting = 2 (Data is sent or received in word units without using a proto-
col.)
• No-protocol 2: Setting = 3 (Data is sent or received in byte units without using a proto-
col.)
Note: For no-protocol transmissions, no response is received from the
sender.

„ CIR-NO (Line No.)

CIR-NO specifies the line number.

Device Line No.


215IF 1 to 8
217IF 1 to 24
218IF 1 to 8
Serial 1 or 2

A-19
Appendix A System Functions
A.2.5 Outputs

„ CH-NO (Channel No.)


CH-NO specifies the channel number of the communications unit. Only one channel number
can be set for the same line.

Device Channel No.


215IF 1 to 13
217IF 1
218IF 1 to 10
Serial 1

„ PARAM (Parameter List Leading Address)


PARAM specifies the leading address of the parameter list. For details on settings, refer to
A.2.3 Parameter Details.

Applicable Leading Address Examples


Registers
MW MA00000, MA00100, …
DW DA00000, DA00200, …
#W #A00000, #A00300, …

A.2.5 Outputs

„ BUSY (Processing in Progress)


BUSY indicates that the processing is being executed. Keep EXECUTE set to ON.

„ COMPLETE (Processing Completed)


COMPLETE is turned ON for only 1 scan upon normal termination.

„ ERROR (Error Occurred)


ERROR is turned ON for only 1 scan when an error occurs.

For error causes, refer to PARAM00 and PARAM01 described in A.2.3 Parameter Details.

A-20

You might also like