0% found this document useful (0 votes)
17 views142 pages

fp7 Users Scu E-14

This document provides safety precautions for using a Panasonic product, emphasizing the importance of reading the User's Manual thoroughly to prevent accidents and ensure proper use. It outlines critical warnings and cautions regarding mishandling that could lead to serious injury or property damage, along with copyright and trademark information. Additionally, it introduces various types of manuals available for the FP7 series and includes a detailed table of contents for further reference.

Uploaded by

lymanhlongutc88
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)
17 views142 pages

fp7 Users Scu E-14

This document provides safety precautions for using a Panasonic product, emphasizing the importance of reading the User's Manual thoroughly to prevent accidents and ensure proper use. It outlines critical warnings and cautions regarding mishandling that could lead to serious injury or property damage, along with copyright and trademark information. Additionally, it introduces various types of manuals available for the FP7 series and includes a detailed table of contents for further reference.

Uploaded by

lymanhlongutc88
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/ 142

Safety Precautions

Observe the following notices to ensure personal safety or to prevent accidents.


To ensure that you use this product correctly, read this User’s Manual thoroughly before use.
Make sure that you fully understand the product and information on safety.
This manual uses two safety flags to indicate different levels of danger.

WARNING
If critical situations that could lead to user’s death or serious injury is assumed by
mishandling of the product.
-Always take precautions to ensure the overall safety of your system, so that the whole
system remains safe in the event of failure of this product or other external factor.
-Do not use this product in areas with inflammable gas. It could lead to an explosion.
-Exposing this product to excessive heat or open flames could cause damage to the lithium
battery or other electronic parts.

CAUTION
If critical situations that could lead to user’s injury or only property damage is
assumed by mishandling of the product.
-To prevent excessive exothermic heat or smoke generation, use this product at the values
less than the maximum of the characteristics and performance that are assured in these
specifications.
-Do not dismantle or remodel the product. It could cause excessive exothermic heat or smoke
generation.
-Do not touch the terminal while turning on electricity. It could lead to an electric shock.
-Use the external devices to function the emergency stop and interlock circuit.
-Connect the wires or connectors securely.
The loose connection could cause excessive exothermic heat or smoke generation.
-Do not allow foreign matters such as liquid, flammable materials, metals to go into the inside
of the product. It could cause excessive exothermic heat or smoke generation.
-Do not undertake construction (such as connection and disconnection) while the power
supply is on. It could lead to an electric shock.

Copyright / Trademarks
-This manual and its contents are copyrighted.
-You may not copy this manual, in whole or part, without written consent of Panasonic
Industrial Devices SUNX Co., Ltd.
-Windows is a registered trademark of Microsoft Corporation in the United States and other
countries.
-All other company names and product names are trademarks or registered trademarks of
their respective owners.
PLC_ORG
Introduction
Thank you for buying a Panasonic product. Before you use the product, please carefully read
the installation instructions and the users manual, and understand their contents in detail to
use the product properly.

Types of Manual
 There are different types of user's manual for the FP7 series, as listed below. Please refer to
a relevant manual for the unit and purpose of your use.
 The manuals can be downloaded on our website:
http://industrial.panasonic.com/ac/e/dl_center/manual/ .
Unit name or purpose of
Manual name Manual code
use
FP7 Power Supply Unit
FP7 CPU Unit Users Manual (Hardware) WUME-FP7CPUH

FP7 CPU Unit Command Reference Manual WUME-FP7CPUPGR


FP7 CPU Unit FP7 CPU Unit Users Manual
WUME-FP7CPULOG
(Logging Trace Function)
FP7 CPU Unit Users Manual (Security Function) WUME-FP7CPUSEC
Instructions for Built-in FP7 CPU Unit Users Manual
WUME-FP7LAN
LAN Port (LAN Port Communication)
Instructions for Built-in
COM Port
FP7 Extension Cassette FP7 series Users Manual (SCU communication) WUME-FP7COM
(Communication)
(RS-232C/RS485 type)
FP7 Extension Cassette
FP7 series Users Manual (Communication
(Communication) WUME-FP7CCET
cassette Ethernet type)
(Ethernet type)
FP7 Extension (Function)
WUME-FP7FCA
Cassette FP7 Analog Cassette Users Manual
(Upcoming)
Analog Cassette
FP7 Digital Input/Output Unit FP7 Digital Input/Output Unit Users Manual WUME-FP7DIO
FP7 Analog Input Unit FP7 Analog Input Unit Users Manual WUME-FP7AIH
FP7 Analog Output Unit FP7 Analog Output Unit Users Manual WUME-FP7AOH
FP7 High-speed counter Unit FP7 High-speed counter Unit Users Manual WUME-FP7HSC
WUME-FP7PG
FP7 Pulse Output Unit FP7 Pulse Output Unit Users Manual
(Upcoming)
FP7 Positioning Unit FP7 Positioning Unit Users Manual WUME-FP7POSP
FP7 Serial Communication
FP7 series Users Manual (SCU communication) WUME-FP7COM
Unit
PHLS System PHLS System Users Manual WUME-PHLS
Programming Software
FPWIN GR7 Introduction Guidance WUME-FPWINGR7
FPWIN GR7
Table of Contents

Table of Contents

1. Functions of Units and Restrictions on Combination ..... 1-1


1.1 Features and Functions of Units ............................................................ 1-2
1.1.1 Functions of Units....................................................................................1-2
1.1.2 Types of Unit ...........................................................................................1-3
1.1.3 Types of Cassette ...................................................................................1-3
1.1.4 Applications that can be Used in Each Port ............................................1-3

1.2 Overview of Communication Functions.................................................. 1-4


1.2.1 PLC Link Functions (MEWNET-W0) .......................................................1-4
1.2.2 MEWTOCOL Master/Slave Communication ...........................................1-5
1.2.3 MODBUS RTU Master/Slave Communication ........................................1-6
1.2.4 General-Purpose Communication...........................................................1-7

1.3 Restrictions on Units Combination ......................................................... 1-8


1.3.1 Restrictions on the Number of Installed Units .........................................1-8
1.3.2 Restrictions on the Combination of Extension Cassettes (Communication
Cassettes) ...............................................................................................1-8
1.3.3 Restrictions on Communication Functions to be Used ...........................1-8
1.3.4 Unit to be Used and Applicable Versions of CPU Unit and FPWIN GR71-8
1.3.5 Restrictions on Consumption Current .....................................................1-9

2. Names and Functions of Parts .......................................... 2-1


2.1 Names and Functions of Parts ............................................................... 2-2
2.1.1 Communication Port of CPU Unit............................................................2-2
2.1.2 Parts Names and Functions of Serial Communication Unit ....................2-3

3. Wiring the COM. Port .......................................................... 3-1


3.1 Attaching a Communication Cassette .................................................... 3-2
3.1.1 Attachment Instructions...........................................................................3-2

ii
Table of Contents

3.2 Wiring of COM Port Terminal Block........................................................ 3-3


3.2.1 Suitable Wires and Tools ........................................................................3-3
3.2.2 Applicable Cable .....................................................................................3-4
3.2.3 Wiring Method .........................................................................................3-5

3.3 Wiring for CPU Unit (GT Power Supply and COM0 Port)....................... 3-6
3.3.1 Handling of GT Power Supply Terminals................................................3-6
3.3.2 Terminal Layouts and Examples of Wiring .............................................3-6

3.4 Wiring for Communication Cassettes COM.1 to COM.4 Ports ............... 3-8
3.4.1 Communication Cassette AFP7CCS1 (RS-232C, 1-Channel Insulated
Type) .......................................................................................................3-8
3.4.2 Communication Cassette AFP7CCS2 (RS-232C, 2-channel insulated
type) ........................................................................................................3-9
3.4.3 Communication Cassette AFP7CCM1 (RS-422 / RS-485, 1-Channel
Insulated Type) .....................................................................................3-12
3.4.4 Communication Cassette AFP7CCM2 (RS-422 / RS-485, 2-Channel
Insulated Type) .....................................................................................3-15
3.4.5 Communication Cassette AFP7CCS1M1 (RS-232C 1-Channel + RS-485
1-Channel Insulated Type)....................................................................3-19

4. I/O Allocation .......................................................................4-1


4.1 Input/Output Signals Used for Communication....................................... 4-2
4.1.1 I/O Allocation of CPU Unit.......................................................................4-2
4.1.2 I/O Allocation of Serial Communication Unit ...........................................4-4

4.2 Registration in I/O Map ........................................................................... 4-6


4.2.1 Settings Using FPWIN GR7 (For CPU with built-in SCU).......................4-6
4.2.2 Settings Using FPWIN GR7 (For Serial Communication Unit) ...............4-6

5. Setting and Confirming Communication Conditions .......5-1


5.1 Setting Applications and Communication Conditions ............................. 5-2
5.1.1 Applications to be Set for Each Port .......................................................5-2
5.1.2 Conditions to be Set for Each Port..........................................................5-2

iii
Table of Contents

5.2 Setting Communication Conditions ........................................................ 5-3


5.2.1 Settings Using FPWIN GR7 (For CPU with built-in SCU).......................5-3
5.2.2 Settings Using FPWIN GR7 (For Serial Communication Unit) ...............5-4

6. PLC Link............................................................................... 6-1


6.1 Operation of PLC link MEWNET-W0...................................................... 6-2
6.1.1 Overview of PLC Link Operation.............................................................6-2
6.1.2 Operation of Link Relays and Link Registers ..........................................6-3

6.2 Configuration Required for PLC Link...................................................... 6-4


6.2.1 Setup Procedure (For CPU with built-in SCU) ........................................6-4
6.2.2 Setup Procedure (For Serial Communication Unit).................................6-5
6.2.3 List of Setting Items.................................................................................6-6

6.3 Setting Items for PLC Link...................................................................... 6-7


6.3.1 Station No. Setting ..................................................................................6-7
6.3.2 Max. Station No. Setting..........................................................................6-7
6.3.3 Memory Block Numbers for Link Relays and Link Registers to be Used6-8
6.3.4 Range of Use of Link Relays and Range of Use of Link Registers ........6-8
6.3.5 Starting No. for Link Relay Send Area and Sending Size.......................6-9
6.3.6 Starting No. for Link Register Send Area and Sending Size.................6-10

6.4 PLC Link Response Time..................................................................... 6-12


6.4.1 Response Time of 1 Transmission Cycle..............................................6-12
6.4.2 Response Time When There is a Station Yet to be Added ..................6-14

7. MEWTOCOL Master/Slave Communication...................... 7-1


7.1 Configuration .......................................................................................... 7-2
7.1.1 Setting Communication Conditions .........................................................7-2

7.2 List of MEWTOCOL / MEWTOCOL7 Supporting Commands................ 7-3


7.2.1 List of MEWTOCOL Commands .............................................................7-3
7.2.2 List of MEWTOCOL7 Commands ...........................................................7-3

iv
Table of Contents

7.3 MEWTOCOL-COM Master Communication (RECV).............................. 7-4


7.3.1 Read Data from an External Device .......................................................7-4
7.3.2 RECV Instruction (When MEWTOCOL-COM is Used)...........................7-7

7.4 MEWTOCOL-COM Master Communication (SEND).............................. 7-8


7.4.1 Write Data into an External Device .........................................................7-8
7.4.2 SEND Instruction (When MEWTOCOL-COM is Used).........................7-11

8. MODBUS RTU Master/Slave Communication ..................8-1


8.1 Configuration .......................................................................................... 8-2
8.1.1 Setting Communication Conditions.........................................................8-2

8.2 List of MODBUS RTU Supported Commands ........................................ 8-3


8.2.1 List of MODBUS Function Codes............................................................8-3

8.3 MODBUS RTU Master Communication (RECV) .................................... 8-4


8.3.1 Read Data from an External Device .......................................................8-4
8.3.2 RECV Instruction (MODBUS Function Code Specified Type)................8-7
8.3.3 RECV Instruction (MODBUS Function Code Unspecified Type)............8-8

8.4 MODBUS RTU Master Communication (SEND) .................................... 8-9


8.4.1 Write Data into an External Device .........................................................8-9
8.4.2 SEND Instruction (MODBUS Function Code Specified Type)..............8-12
8.4.3 SEND Instruction (MODBUS Function Code Unspecified Type)..........8-13

9. General-Purpose Communication .....................................9-1


9.1 Operation of General-Purpose Communication...................................... 9-2
9.1.1 Read Data from an External Device .......................................................9-2
9.1.2 Write Data into an External Device .........................................................9-2

9.2 Configuration .......................................................................................... 9-3


9.2.1 Setting Communication Conditions.........................................................9-3

9.3 Sending Operation.................................................................................. 9-4


9.3.1 Overview of Sending Operation ..............................................................9-4

v
Table of Contents

9.3.2 Contents of Sent Data .............................................................................9-6


9.3.3 GPSEND (General-Purpose Communication Sending Instruction) ........9-7
9.3.4 Precautions on Sending Data .................................................................9-8

9.4 Receiving Operation............................................................................... 9-9


9.4.1 Overview of Receiving Operation............................................................9-9
9.4.2 Contents of Received Data ...................................................................9-12
9.4.3 Precautions on Receiving Data.............................................................9-12
9.4.4 Operations of the "Reception done copy" flag and multiplex reception 9-13
9.4.5 GPRECV (General-Purpose Communication Receiving Instruction) ...9-14

9.5 Sending/Receiving Flag Operation....................................................... 9-15


9.5.1 No Header (Start Code), Terminator (End Code) "CR": .......................9-15
9.5.2 Start Code "STX", End Code "ETX": .....................................................9-16

10. Troubleshooting ............................................................... 10-1


10.1 Self-diagnostic Function ....................................................................... 10-2
10.1.1 CPU Unit’s Operation Monitor LED.......................................................10-2
10.1.2 Operation at the Time of Error ..............................................................10-2
10.1.3 Serial Communication Unit's Operation Monitor LED ...........................10-3

10.2 What to DO If an Error Occurs (For Each Communication Mode) ...... 10-4
10.2.1 When Using PLC Link Function ............................................................10-4
10.2.2 When Using MEWTOCOL/ MEWTOCOL7/ MODBUS-RTU Function..10-4
10.2.3 When Using General-purpose Communication Function......................10-5

10.3 Checking Status with PMGET Instruction ............................................ 10-6


10.3.1 Specifications of PMGET Instruction.....................................................10-6
10.3.2 List of Communication Parameters .......................................................10-6

10.4 Clearing Errors Using User Programs.................................................. 10-9


10.4.1 Clearing Errors Using User Programs...................................................10-9

vi
Table of Contents

11. Specifications ...................................................................11-1


11.1 Communication Function Specifications............................................... 11-2
11.1.1 CPU Unit Communication Specifications..............................................11-2
11.1.2 Extension Cassette Communication Specifications..............................11-4

11.2 MEWTOCOL-COM Format................................................................... 11-5


11.2.1 MEWTOCOL-COM Command Format .................................................11-5
11.2.2 MEWTOCOL-COM Response Format..................................................11-7

11.3 MEWTOCOL7-COM Format................................................................. 11-9


11.3.1 MEWTOCOL7-COM Command Format ...............................................11-9
11.3.2 MEWTOCOL7 Response Format .......................................................11-11

11.4 MODBUS RTU Format ....................................................................... 11-13


11.4.1 MODBUS RTU Command Format......................................................11-13
11.4.2 MODBUS RTU Response Format ......................................................11-14

vii
Table of Contents

viii
1
Functions of Units and
Restrictions on Combination
Functions of Units and Restrictions on Combination

1.1 Features and Functions of Units

1.1.1 Functions of Units

CPU Unit Serial Communication Unit

One
communication
cassette can be Two
attached. communication
cassettes can be
attached.
COM.0 port is
equipped as standard.
(For 3-wire RS-232C)

 Removable serial communication cassettes are used.


 Selectable from five communication cassettes in conformity with communication standards
of RS-232C, RS-422 and RS-485. (Sold separately)
 One communication cassette can be attached to the CPU unit, and two communication
cassettes to the serial communication unit.

 The CPU unit includes a COM.0 port as standard equipment.


The CPU unit includes a RS-232C port (3-wire type) for the connection with a programmable
display and a power supply as standard equipment.
 Four communication modes are available.
The PC link, MEWTOCOL, MODBUS RTU and general-purpose communication modes are
provided, and many serial communication devices can be connected by the combination of
communication cassettes.

1-2
1.1 Features and Functions of Units

1.1.2 Types of Unit


 Types of unit that can perform serial communication
Communication ports that can be allocated
Name Model no.
COM.0 COM.1 COM.2 COM.3 COM.4
AFP7CPS4E
CPU Unit AFP7CPS3E ● ● ●
AFP7CPS3
Serial Communication Unit AFP7NSC ● ● ● ●
(Note 1) The COM.0 port equipped in the CPU unit is a terminal block especially for RS-232C (3-wire type).

1.1.3 Types of Cassette


 Types of communication cassette
Communication ports that can be allocated
Model no. Communication interface
COM.0 COM.1 COM.2 COM.3 COM.4
AFP7CCS1 1-channel RS-232C ● ●
3-wire 2-channel RS-232C ● ● ● ●
AFP7CCS2
5-wire 1-channel RS-232C ● ●
AFP7CCM1 1-channel RS-422 / RS-485 ● ●
AFP7CCM2 2-channel RS-422 / RS-485 ● ● ● ●
1-channel RS-485 ● ●
AFP7CCS1M1
3-wire 1-channel RS-232C ● ●
(Note 1) For AFP7CCS2, select and use either 3-wire 2-channel RS-232C or 5-wire 1-channel RS-232C. Switching
should be performed using a switch on the Communication Cassette.
(Note 2) For AFP7CCM1 and AFP7CCM2, select and use either RS-422 or RS-485. Switching should be performed
using a switch on the Communication Cassette.
(Note 3) For AFP7CCS1M1, both 1-channel RS-485 and 3-wire 1-channel RS-232C can be used.

1.1.4 Applications that can be Used in Each Port


 Available functions for each communication port
Communication ports that can be allocated
Communication function to be used
COM.0 COM.1 COM.2 COM.3 COM.4
PLC link ●
MEWTOCOL7-COM (Note 1) Master ● ● ● ● ●
MEWTOCOL-COM Slave ● ● ● ● ●
Master ● ● ● ● ●
MODBUS-RTU
Slave ● ● ● ● ●
General-purpose communication ● ● ● ● ●
(Note 1) In MEWTOCOL7-COM, there is no master communication function.

1-3
Functions of Units and Restrictions on Combination

1.2 Overview of Communication Functions

1.2.1 PLC Link Functions (MEWNET-W0)


 Overview of function
 A system can be configured for the PLC link (MEWNET-W0).
 Exclusive internal relays “link relays (L)” and data registers “link registers (LD)” are shared
between the connected PLCs.
 Among up to 16 PLCs, data can be exchanged with 1,008 link relay points and 128 link
register words.

 Applications of PLC Link Functions (MEWNET-W0)


Among our FP series PLC, it can be used for link functions with the following models. It is also
capable of 1:1 communication via RS-232C port.
 FP-X0 (L40MR / L60MR)
 FP0R (RS485 type)
 FPΣ (Using Communication cassette RS-485 type)
 FP-X (Using Communication cassette RS-485 type)
 FP2 Multi Communication Unit (Using Communication cassette RS-485 type)

1-4
1.2 Overview of Communication Functions

1.2.2 MEWTOCOL Master/Slave Communication


 Overview of function
 Execute communication using MEWTOCOL-COM, a communication protocol used by our PLC.
 In master communication, PLC executes communication by sending commands to devices that
support MEWTOCOL, and receiving responses. Messages in accordance with the protocol are
automatically generated by PLC. In the user program, reading and writing can be done simply by
specifying the station no. and memory address and executing SEND/RECV instructions.
 Slave communication is performed when the computer or display connected to PLC has the
sending right, and sends commands, and PLC returns responses. In slave communication, PLC
responds automatically, so no program concerning communication is necessary on the PLC side.
 The data size that can be sent or received in a single communication is up to 507 words for
register transmission (up to 1,014 words for MEWTOCOL7-COM) and 1 bit for bit transmission.

Master function

Slave function

 Examples of applications of MEWTOCOL master communication


This is used for connection with a device that supports our PLC's protocol MEWTOCOL.
 Programmable controller FP series
 Displacement sensor HL series
 Eco power meter KW series
 Examples of applications of MEWTOCOL slave communication
This is used for connection with a device that supports our PLC's protocol MEWTOCOL-COM
master communication.
 Programmable displays made by various manufacturers

1-5
Functions of Units and Restrictions on Combination

1.2.3 MODBUS RTU Master/Slave Communication


 Overview of function
 This is used for communicating with other devices that support the MODBUS RTU protocol.
 In master communication, communication is performed when the master unit sends
instructions (command messages) to slave units and the slave unit returns responses
(response messages) according to the instructions. Messages in accordance with the
protocol are automatically generated by PLC. In the user program, reading and writing can
be done simply by specifying the station no. and memory address and executing
SEND/RECV instructions.
 Slave communication is performed when the higher device connected to PLC has the
sending right, and sends commands, and PLC returns responses. In slave communication,
PLC responds automatically, so no program concerning communication is necessary on the
PLC side.
 The data size that can be sent or received in a single communication is up to 127 words for
register transmission and 2,040 bit for bit transmission.

Master function

Slave function

 Examples of applications of MODBUS-RTU master communication


This is used for connection with a device that supports the MODBUS-RTU protocol.
 Thermoregulator KT series
 Devices from other manufacturers that support MODBUS-RTU
 Examples of applications of MODBUS-RTU slave communication
This is used when access is made from the higher device using MODBUS-RTU commands.

1-6
1.2 Overview of Communication Functions

1.2.4 General-Purpose Communication


 Overview of function
 General-purpose communication is used when PLC executes communication in accordance
with the protocol of the partner device.
 Formulation and sending of command messages to the partner device, and reception
processing of responses from the partner device, are performed by the user program.
Sending/receiving of data with an external device is executed via given operation memory
(e.g. data register).
 Data are sent by converting commands in accordance with the partner device as strings into
ASCII text, setting them into a given data register, and executing GPSEND instruction.
 Response received from the partner device is temporarily saved in the buffer. Based on the
reception done flag, GPRECV instruction is executed. The ASCII strings can be converted
into numerical data, etc. as necessary, by the user program.
 The data size that can be sent or received in a single communication is up to 4,096 bytes.
(including control codes)

 Applications of general-purpose communication


This is used for connection with devices made by differing manufacturers that have dedicated
communication protocols.

1-7
Functions of Units and Restrictions on Combination

1.3 Restrictions on Units Combination

1.3.1 Restrictions on the Number of Installed Units


There are following restrictions depending on units to be used.
Unit type Number of installed units Remarks
Serial Communication Unit Max. 8 units

1.3.2 Restrictions on the Combination of Extension Cassettes


(Communication Cassettes)
 One communication cassette can be attached to the CPU unit, and two communication
cassettes to the serial communication unit.
 The FP7 communication cassette (Ethernet type) can be attached to the CPU only. It cannot
be attached to the serial communication unit (SCU).

1.3.3 Restrictions on Communication Functions to be Used


There are the following restrictions on functions to be used when using the SCU or ET-LAN
that is built in the CPU unit, or the serial communication unit (SCU).
Function to be used Restrictions
Up to two communication ports can be used. For using two ports, allocate
different link areas to them.
PLC link function
CPU with built-in SCU (COM.1 port)
Serial communication unit (COM.1 port)
A maximum of 16 communication ports and the number of connections in
combination can be used simultaneously.
MEWTOCOL-COM master
CPU with built-in SCU (COM.1 port to COM. 2 port)
MODBUS-RTU master
Serial communication unit (COM.1 port to COM.4 port)
CPU with built-in ET-LAN (User connections 1 to 16)
A maximum of 15 communication ports and the number of connections in
combination can be used simultaneously.
MEWTOCOL-COM slave
CPU with built-in SCU (COM.1 port to COM. 2 port)
MEWTOCOL7-COM slave
Serial communication unit (COM.1 port to COM.4 port)
MODBUS-RTU slave
CPU with built-in ET-LAN
(System connections 1 to 4 / User connections 1 to 16)
General-purpose
There is no restriction.
communication

1.3.4 Unit to be Used and Applicable Versions of CPU Unit and FPWIN GR7
For using the unit, the following versions of CPU unit and FPWINGR7 are required.
Applicable versions
Unit type Remarks
CPU unit FPWINGR7
FP7 Serial Communication Unit Ver.1.2 or later Ver.1.3 or later

1-8
1.3 Restrictions on Units Combination

1.3.5 Restrictions on Consumption Current


Including other units, the consumption current should be within the allowable capacity of a
power supply unit.
 Unit's consumption current table (24 V)
Consumption
Product name Model number
current (mA)
196k steps, Built-in Ethernet
AFP7CPS4E 200 mA or less
function
CPU Unit 120k steps, Built-in Ethernet
AFP7CPS3E 200 mA or less
function
120k steps, No Ethernet function AFP7CPS3 200 mA or less
RS-232C x 1ch AFP7CCS1 35 mA or less
When attaching RS-232C x 2ch AFP7CCS2 60 mA or less
Extension Cassette RS-422 / 485 x 1ch AFP7CCM1 60 mA or less
(Communication
Cassette) to CPU RS-422 / 485 x 2h AFP7CCM2 90 mA or less
Unit RS-232C x 1ch
(Note 1) (Note 2) AFP7CCS1M1 70 mA or less
RS-422 / 485 x 1ch
Ethernet AFP7CCET 35 mA or less
Serial Communication Unit AFP7NSC 50 mA or less
RS-232C x 1ch AFP7CCS1 20 mA or less
When attaching
RS-232C x 2ch AFP7CCS2 40 mA or less
Extension Cassette
(Communication RS-422 / 485 x 1ch AFP7CCM1 30 mA or less
Cassette) to Serial
RS-422 / 485 x 2h AFP7CCM2 60 mA or less
Communication Unit
(Note 1) (Note 2) RS-232C x 1ch
AFP7CCS1M1 50 mA or less
RS-422 / 485 x 1ch
(Note 1) The consumption currents listed in the Extension Cassette column indicate the increased amount of the
CPU's consumption current which increases when each extension cassette is added.
(Note 2) The consumption current of extension cassette (communication cassette) varies according to the unit to
which the cassette is attached (CPU or serial communication unit).

REFERENCE

For information on the restrictions on the combination of units, also refer to FP7 CPU
Unit User's Manual (Hardware).

1-9
Functions of Units and Restrictions on Combination

1-10
2
Names and Functions of
Parts
Names and Functions of Parts

2.1 Names and Functions of Parts

2.1.1 Communication Port of CPU Unit

(In the above figure, a communication cassette is attached to the COM.1 and COM.2 ports.)
 Names and Functions of Parts
(1) COM.1 and COM.2 ports
Attach a separately sold communication cassette to use these ports. A blank cover is fitted
when the unit is shipped.
(2) COM.0 port, GT power supply terminals
This is an RS-232C port that is equipped to a standard model of CPU unit. It is equipped with
power supply terminals (5 VDC and 24 VDC) to which a GT series programmable display can
be connected.
(3) LAN port
This is equipped to a standard model of CPU unit. This is used for connection to Ethernet.
(4) USB port
This is equipped to a standard model of CPU unit. This is used for connecting tool software.

REFERENCE

 For details of the communication method using LAN port, refer to FP7 CPU
Unit User's Manual (LAN port communication).
 For details of the communication using Communication cassette (Ethernet
type) AFP7CCET, refer to FP7 series User's Manual (Communication
cassette Ethernet type).

2-2
2.1 Names and Functions of Parts

2.1.2 Parts Names and Functions of Serial Communication Unit

(In the above figure, two communication cassettes are attached.)


 Names and Functions of Parts
(1) Operation monitor LEDs
LED
Display Description
color
- Blue Lights when the power supply of the CPU unit is on.
Lights when the configuration setting is incorrect, or a communication error occurs.
Flashes when the factory acceptance test switch is on. (Flashing cycle: 100 ms)
ERROR Red
Flashes when an extension cassette that cannot be used is installed. (Flashing
cycle: 500 ms)
ALARM Red Lights when an error occurs in hardware.
(2) COM.1 and COM.2 ports
Attach a separately sold communication cassette to use these ports. No blank cover is fitted
when the unit is shipped.
(3) COM.3 and COM.4 ports
Attach a separately sold communication cassette to use these ports. A blank cover is fitted
when the unit is shipped.
(4) DIN hook
This is used to fix the unit to a DIN rail.
(5) Unit connector
This is used to connect the internal circuit of an I/O unit or advanced unit.
(6) Factory acceptance test switch
This is used for factory acceptance test. Do not turn it on.

2-3
Names and Functions of Parts

2-4
3
Wiring the COM. Port
Wiring the COM. Port

3.1 Attaching a Communication Cassette

3.1.1 Attachment Instructions


When an optional Communication Cassette is to be used, attach it in the following procedures.

PROCEDURE

1. Using a flathead screwdriver, remove the cover on the side of the CPU unit.
You will find four toggles.

2. Attach a desired Communication Cassette.

The illustration is the CPU unit. As for the Serial Communication Unit, the
attachment procedure is the same.

3-2
3.2 Wiring of COM Port Terminal Block

3.2 Wiring of COM Port Terminal Block

3.2.1 Suitable Wires and Tools


A screw-down connection type for terminal block is used for the communication port. Use the
following items for wiring.

 Suitable wires (strand wire)


Size Nominal cross-sectional area
2 2
AWG #28 to 16 0.08 mm to 1.25 mm

 Pole terminal with a compatible insulation sleeve


If a pole terminal is being used, the following models should be used.
Cross- Part no.
Manufacturer sectional Size With insulating Without insulating
area sleeve sleeve
2
0.25 mm AWG #24 AI 0.25-6 BU A 0.25-7
2
0.34 mm AWG #22 AI 0.34-6 TQ A 0.34-7
2
Phoenix Contact 0.50 mm AWG #20 AI 0.5-6 WH A 0.5-6
2
0.75 mm AWG #18 AI 0.75-6 GY A 0.75-6
2
1.00 mm AWG #18 - A 1-6

 Pressure welding tool for pole terminals


Model no.
Manufacturer
Part no. Product no.
Phoenix Contact CRIMPFOX 6 1212034

Screwdriver for terminal block


To tighten the terminals, use a screwdriver by Phoenix Contact (model No. SZS 0.4 x 2.5,
product No. 1205037, blade size 0.4 x 2.5) or our screwdriver (part No. AFP0806). The
tightening torque should be 0.22 to 0.25 N·m.

3-3
Wiring the COM. Port

3.2.2 Applicable Cable


Use a cable as prescribed below.
 Suitable wires (strand wire): For RS-232C / RS-422 communication
Conductor Insulator
Sample
Classifi- Cross-sectional Resistance Cable
Thick- appropriate
cation view Size value Material diam.
ness cable
(at 20°C)

Shield Cover 2
Shielded 0.3 mm
Max. Vinyl Max. Approx. Onamba Co. Ltd.
multi-core Con- (AWG22) 2
Insu- 58.8 Ω/km chloride 0.3 mm 6.6 mm ONB-D6 × 0.3 mm
cable ductor lator or larger

 Suitable wires (strand wire): For RS-485 communication


Conductor Insulator
Sample
Classifi0c Cross-sectional Size Resistance Material Thick- Cable
appropriate
ation view value ness diam.
cable
(at 20°C)
2 Hitachi Cable, Ltd.
1.25 mm 2
Max. Poly- Max. Approx. KPEV-S1.25 mm ×
(AWG16)
Cover 16.8 Ω/km ethylene 0.5 mm 8.5 mm 1P
Shielded Shield or larger
Belden Inc., 9860
twisted Con- Insu-
pair 2 Hitachi Cable, Ltd.
ductor lator 0.5 mm 2
Max. Poly- Max. Approx. KPEV-S0.5 mm ×
(AWG20)
33.4 Ω/km ethylene 0.5 mm 7.8 mm 1P
or larger
Belden Inc., 9207
Cover 2
0.75 mm Poly- 2
Max. Max. Approx. VCTF0.75 mm × 2C
VCTF Con- Insu- (AWG18) chlorinated
lator or larger
25.1 Ω/km 0.6 mm 6.6 mm (JIS)
ductor biphenyl

NOTES

 Use shielded twisted pair cables.


 Use only one type of transmission cable. Do not mix more than 1 type.
 Twisted pair cables are recommended in noisy environments.
 When using shielded cable with crossover wiring for the RS-485
transmission line, grounded one end.

3-4
3.2 Wiring of COM Port Terminal Block

3.2.3 Wiring Method


 Wiring method
(1) Remove a portion of the wire’s insulation.

(2) Insert wire into terminal hole until it stops. Tighten screw clockwise to fix wire in place.
(The tightening torque: 0.22 to 0.25 N·m (2.3 to 2.5 kgf·cm))

 Precautions on wiring
The following precautions should be observed, to avoid broken or disconnected wires.
 When removing the wire’s insulation, be careful not to scratch the core wire.
 Do not twist the wires to connect them.
 Do not solder the wires to connect them. The solder may break due to vibration.
 After wiring, make sure stress is not applied to the wire.
 In the terminal block socket construction, if the wire is fastened upon counter-clockwise
rotation of the screw, the connection is faulty. Disconnect the wire, check the terminal hole,
and then re-connect the wire.

3-5
Wiring the COM. Port

3.3 Wiring for CPU Unit (GT Power Supply and COM0 Port)

3.3.1 Handling of GT Power Supply Terminals


 GT power supply terminals can be used as power supply terminals for the GT series of our
programmable displays.
 In accordance with the model to be used, use either 5V DC or 24V DC.

NOTES

 GT power supply terminals (5V DC / 24V DC) are design exclusively for the
GT series of our programmable displays. Do not use the terminals for other
devices.
 GT power supply terminals and COM0 port (RS-232C) are insulated inside.

3.3.2 Terminal Layouts and Examples of Wiring


 Layout for GT power supply terminals and COM0 port terminals

Terminal Terminal part Functions Signal direction Ports that can be


no. Symbol that can be allocated
allocated in the software
PLC →
1 COM.0 SD Sent data
External device
PLC ← COM.0
2 RD Received data
External device
3 SG Signal Ground -
4 OUTPUT 24V 24V -
5 5V 5V - -
6 0V 0V -

3-6
3.3 Wiring for CPU Unit (GT Power Supply and COM0 Port)

 Example of wiring (in the case of GT02 5V DC type)

FP7 CPU unit GT02 / GT02L series


COM.0 port terminal / GT power supply terminal 5V DC type

Terminal Terminal
Signal name Terminal part symbol Signal name
No. From 5 V part symbol
1 Sent Data COM.0 SD terminal + 5V
2 Received Data RD From 0 V - 0V
terminal
3 Signal Ground SG Functional Ground

4 24V SD Sent Data


GT power to GT + RD Received Data
5 5V
supply terminal RS NC
6 OUTPUT 0V to GT - CS NC
terminal
SG Signal Ground

 Example of wiring (in the case of GT series 24V DC type)


FP7 CPU unit GT series
COM.0 port terminal / GT power supply terminal 24V DC type

Terminal Terminal
Signal name Terminal part symbol Signal name
No. From 24V part symbol
1 Sent Data COM.0 SD terminal + 24V
2 Received Data RD From 0V - 0V
terminal Functional Ground
3 Signal Ground SG
4 24V to GT + SD Sent Data
terminal RD Received Data
5 GT power 5V
supply RS NC
6 OUTPUT 0V to GT -
terminal CS NC
SG Signal Ground

NOTE

 The terminal layout on the display side differs for the existing models GT01
series.

3-7
Wiring the COM. Port

3.4 Wiring for Communication Cassettes COM.1 to COM.4 Ports

3.4.1 Communication Cassette AFP7CCS1


(RS-232C, 1-Channel Insulated Type)
 Terminal layout

Terminal LED part Terminal Functions Signal Ports that can be


no. Symbol part that can be direction allocated
Symbol allocated in the software
PLC →
1 CH1 SD SD SD: Sent Data
External device
RD: Received PLC ←
2 RD RD COM.1
Data External device
SG: Signal
3 - SG -
Ground
4-9 - - - - -
(Note) Do not connect anything to Terminals No.4 through No.9.

 Example of wiring
AFP7CCS1 Partner
Terminal Terminal
Signal name Functions Symbol Signal name
No. part symbol
1 SD Sent Data 1 SD RD Received Data
2 RD Received Data 1 RD SD Sent Data
3 SG Signal Ground SG SG Signal Ground

3-8
3.4 Wiring for Communication Cassettes COM.1 to COM.4 Ports

3.4.2 Communication Cassette AFP7CCS2


(RS-232C, 2-channel insulated type)
 Setting of Application Switch
Applications for use can be switched using a switch on the backplane for Communication
Cassette AFP7CCS2. Settings can be confirmed with LED lamps at the front of the cassette.
3-wire 2-channel RS-232C
5-wire 1-channel RS-232C (RS/CS controlled)

3-9
Wiring the COM. Port

 Terminal layout (in the setting of 3-wire 2-channel RS-232C)

Terminal LED part Terminal Functions Signal Ports that can be


no. Symbol part that can be direction allocated
Symbol allocated in the software
PLC →
1 CH1 SD SD SD: Sent Data
External device
RD: Received PLC ←
2 RD RD COM.1
Data External device
SG: Signal
3 - SG -
Ground
PLC →
4 CH2 SD / R SD SD: Sent Data
External device
RD: Received PLC ←
5 RD / C RD COM.2
Data External device
SG: Signal
6 - SG -
Ground
7 MODE - - - -
8 3-Wire - - - -
9 5-Wire - - - -
(Note 1) Route between CH1 and CH2 are insulated inside.
(Note 2) Do not connect anything to Terminals No.7 through No.9.

 Example of wiring (in the setting of 3-wire 2-channel RS-232C)


AFP7CCS2 Partner 1
Terminal Terminal Symbol Signal name
Signal name Functions
No. part symbol
1 SD Sent Data 1 SD RD Received Data
2 RD Received Data 1 RD SD Sent Data
3 SG Signal Ground SG SG Signal Ground
4 SD Sent Data 2 SD Partner 2
5 RD Received Data 2 RD
Symbol Signal name
6 SG Signal Ground SG
RD Received Data
SD Sent Data
SG Signal Ground

3-10
3.4 Wiring for Communication Cassettes COM.1 to COM.4 Ports

 Terminal layout (in the setting of 5-wire 1-channel RS-232C RS/CS controlled)

Terminal LED part Terminal Functions Signal Ports that can be


no. Symbol part that can be direction allocated
Symbol allocated in the software
PLC →
1 CH1 SD SD SD: Sent Data
External device
RD: Received PLC ←
2 RD RD
Data External device
SG: Signal
3 - SG - COM.1
Ground
RS: Request to PLC →
4 CH2 SD / R SD
Send External device
CS: Clear to PLC ←
5 RD / C RD
Send External device
6 - SG - - -
7 MODE - - - -
8 3-Wire - - - -
9 5-Wire - - - -
(Note) Do not connect anything to Terminals No.6 through No.9.

 Example of wiring (in the setting of 5-wire 1-channel RS-232C RS/CS controlled)
AFP7CCS2 Partner
Terminal Terminal
Signal name Functions Symbol Signal name
No. part symbol
1 SD Sent Data SD RD Received Data
2 RD Received Data RD SD Sent Data
3 SG Signal Ground SG SG Signal Ground
4 SD Request to Send RS RS Request to Send
5 RD Clear to Send CS CS Clear to Send

3-11
Wiring the COM. Port

3.4.3 Communication Cassette AFP7CCM1


(RS-422 / RS-485, 1-Channel Insulated Type)
 Setting of application switch
Applications for use can be switched using a switch on the backplane for Communication
Cassette AFP7CCM1. Settings can be confirmed with LED lamps at the front of the cassette.

 Settings for termination resistance selector switch


On the surface of Communication Cassette AFP7CCM2 is located a termination resistance
selector switch.
 When RS-422 is used: Turn ON the switch.
 When RS-485 is used: Turn ON the switch only when it is the end unit.

3-12
3.4 Wiring for Communication Cassettes COM.1 to COM.4 Ports

 Terminal layout (in the setting of RS-485)

Terminal LED part Terminal Functions that can Signal Ports that can be
no. Symbol part be allocated direction allocated
Symbol in the software
1 CH1 SD +/S Transmission line (+) -
2 RD -/S Transmission line (-) -
COM.1
3 485 +/R Transmission line (+) -
4 422 -/R Transmission line (-) -
5-9 - - - - -
(Note 1) In the setting of RS-485, Terminal No.1 and Terminal No.3, and Terminal No.2 and Terminal No.4 are
respectively connected inside. They can be used as terminals for crossover wiring for the transmission cable.
(Note 2) Do not connect anything to Terminals No.5 through No.9.

 Example of wiring (in the setting of RS-485)


AFP7CCM1 Partner 1
Terminal Terminal part Terminal Signal name
Signal name Functions
No. symbol
+ Transmission line (+)
1 +/S Transmission line (+) +
- Transmission line (-)
2 -/S Transmission line (-) -
3 +/R Transmission line (+) +
Partner 2
4 -/R Transmission line (-) -
Terminal Signal name
+ Transmission line (+)
- Transmission line (-)

3-13
Wiring the COM. Port

 Terminal layout (in the setting of RS-422)

Terminal LED part Terminal Functions that Signal Ports that can be
no. Symbol part can be direction allocated
Symbol allocated in the software
PLC →
1 CH1 SD +/S Sent Data (+)
External device
PLC →
2 RD -/S Sent Data (-)
External device
COM.1
PLC ←
3 485 +/R Received Data (+)
External device
PLC ←
4 422 -/R Received Data (-)
External device
5-9 - - - - -
(Note) Do not connect anything to Terminals No.5 through No.9.

 Example of wiring (in the setting of RS-422)


AFP7CCM1 Partner
Terminal Terminal part Terminal Signal name
Signal name Functions
No. symbol
1 +/S Sent Data (+) SD (+) RD (+) Received Data (+)
2 -/S Sent Data (-) SD (-) RD (-) Received Data (-)
3 +/R Received Data (+) RD (+) SD (+) Sent Data (+)
4 -/R Received Data (-) RD (-) SD (-) Sent Data (-)

3-14
3.4 Wiring for Communication Cassettes COM.1 to COM.4 Ports

3.4.4 Communication Cassette AFP7CCM2


(RS-422 / RS-485, 2-Channel Insulated Type)
 Setting of application switch
Applications for use can be switched using a switch on the backplane for Communication
Cassette AFP7CCM2. Settings can be confirmed with LED lamps at the front of the cassette.

 Settings for termination resistance selector switch


On the surface of Communication Cassette AFP7CCM2 is located a termination resistance
selector switch.
 When RS-422 is used: Turn ON the switch.
 When RS-485 is used: Turn ON the switch only when it is the end unit.

3-15
Wiring the COM. Port

 Terminal layout (in the setting of RS-485)

Terminal LED part Terminal Functions that can Signal Ports that can
no. Symbol part be allocated direction be allocated
Symbol in the software
1 CH1 SD +/S Transmission line (+) -
2 RD -/S Transmission line (-) -
COM.1
3 485 +/R Transmission line (+) -
4 422 -/R Transmission line (-) -
5 - - - - -
6 CH2 SD +/S Transmission line (+) -
7 RD -/S Transmission line (-) -
COM.2
8 485 +/R Transmission line (+) -
9 422 -/R Transmission line (-) -
(Note 1) In the setting of RS-485, Terminal No.1 and Terminal No.3, and Terminal No.2 and Terminal No.4 are
respectively connected inside. They can be used as terminals for crossover wiring for the transmission cable.
(Note 2) In the setting of RS-485, Terminal No.6 and Terminal No.8, and Terminal No.7 and Terminal No.9 are
respectively connected inside. They can be used as terminals for crossover wiring for the transmission cable.
(Note 3) Do not connect anything to Terminal No.5.
(Note 4) Route between CH1 and CH2 are insulated inside.

3-16
3.4 Wiring for Communication Cassettes COM.1 to COM.4 Ports

 Example of wiring (in the setting of RS-485)


AFP7CCM2 Transmission line 1 Partner 1
Terminal Terminal
Signal name Functions Terminal Signal name
No. part symbol
1 +/S Transmission line 1 (+) + + Transmission line (+)
2 -/S Transmission line 1 (-) - - Transmission line (-)
3 +/R Transmission line 1 (+) +
Transmission line 1 Partner 2
4 -/R Transmission line 1 (-) -
Terminal Signal name
5 - NC NC
+ Transmission line (+)
6 +/S Transmission line 2 (+) +
7 -/S Transmission line 2 (-) - - Transmission line (-)
8 +/R Transmission line 2 (+) + Transmission line 2 Partner 1
9 -/R Transmission line 2 (-) -
Terminal Signal name
+ Transmission line (+)
- Transmission line (-)

Transmission line 2 Partner 2


Terminal Signal name
+ Transmission line (+)
- Transmission line (-)

3-17
Wiring the COM. Port

 Terminal layout (in the setting of RS-422)

Terminal LED part Terminal Functions that Signal direction Ports that can be
no. Symbol part can be allocated allocated
Symbol in the software
1 CH1 SD +/S Sent Data (+) PLC → External device
2 RD -/S Sent Data (-) PLC → External device
COM.1
3 485 +/R Received Data (+) PLC ← External device
4 422 -/R Received Data (-) PLC ← External device
5 - - - - -
6 CH2 SD +/S Sent Data (+) PLC → External device
7 RD -/S Sent Data (-) PLC → External device
COM.2
8 485 +/R Received Data (+) PLC ← External device
9 422 -/R Received Data (-) PLC ← External device
(Note 1) Do not connect anything to Terminal No.5.
(Note 2) Route between CH1 and CH2 are insulated inside.

 Example of wiring (in the setting of RS-422)


AFP7CCM2 Partner 1
Terminal Terminal
Signal name Functions Terminal Signal name
No. part symbol
1 +/S Sent Data 1 (+) SD (+) RD (+) Received Data (+)
2 -/S Sent Data 1 (-) SD (-) RD (-) Received Data (-)
3 +/R Received Data 1 (+) RD (+) SD (+) Sent Data (+)
4 -/R Received Data 1 (-) RD (-) SD (-) Sent Data (-)

5 - Partner 2
6 +/S Sent Data 2 (+) SD (+)
Terminal Signal name
7 -/S Sent Data 2 (-) SD (-)
8 +/R Received Data 2 (+) RD (+) RD (+) Received Data (+)

9 -/R Received Data 2 (-) RD (-) RD (-) Received Data (-)


SD (+) Sent Data (+)
SD (-) Sent Data (-)

3-18
3.4 Wiring for Communication Cassettes COM.1 to COM.4 Ports

3.4.5 Communication Cassette AFP7CCS1M1 (RS-232C 1-Channel + RS-485


1-Channel Insulated Type)
 Settings for termination resistance selector switch
A termination resistance selector switch is located on the RS-485 side of the surface of
Communication Cassette AFP7CCS1M1. Turn ON the switch only when it is the end unit.

Terminal LED part Terminal Functions that Signal Ports that can be
no. Symbol part can be allocated direction allocated
Symbol in the software
1 CH1 SD + Transmission line (+) -
2 RD - Transmission line (-) -
COM.1
3 + Transmission line (+) -
4 - Transmission line (-) -
5-6 - - - - -
7 CH2 SD SD Sent data -
8 RD RD Received data - COM.2
9 SG SG Signal ground -
(Note 1) Terminal No.1 and Terminal No.3, and Terminal No.2 and Terminal No.4 are respectively connected inside.
(Note 2) Do not connect anything to Terminals No.5 and No.6.

3-19
Wiring the COM. Port

 Example of wiring
AFP7CCS1M1 RS-485 Partner 1
Terminal Terminal
Signal name Functions Terminal Signal name
No. part symbol
1 +/S Transmission line (+) + + Transmission line (+)
2 -/S Transmission line (-) - - Transmission line (-)
3 +/R Transmission line (+) +
RS-485 Partner 2
4 -/R Transmission line (-) -
Terminal Signal name
5 - NC NC
+ Transmission line (+)
6 - NC NC
- Transmission line (-)
7 SD Sent Data SD
8 RD Received Data RD
RS-232C partner
9 SG Signal Ground SG
Terminal Signal name
RD Received Data
SD Sent Data

SG Signal Ground

3-20
3
I/O Allocation
I/O Allocation

4.1 Input/Output Signals Used for Communication

4.1.1 I/O Allocation of CPU Unit


 Input signal
Effective
Input Communication
Name Description operation
signal port
mode
X0 For COM.1 Port General- When the unit completes the data reception,
purpose it turns on (1). General-
X1 For COM.2 Port
communication purpose
Reception Waiting for data reception: 0, Reception communication
X2 For COM.0 Port completed: 1
done flag
X3 - Not used Do not use this.

X4 For COM.1 Port General- It turns on (1) if there are copied data when
purpose GPRECV instruction is executed. It turns off
General-
X5 For COM.2 Port communication (0) when END instruction is executed.
purpose
Reception (Note 1)
communication
done (copy) Reading completed: 1
X6 For COM.0 Port flag No data to be read: 0

X7 - Not used Do not use this.


X8 For COM.1 Port General-
purpose It turns on (1) when the unit is set to the General-
X9 For COM.2 Port
communication general-purpose communication mode. It purpose
Clear to send turns off (0) in other modes. communication
XA For COM.0 Port
flag
XB - Not used Do not use this.
XC For COM.1 Port Master It turns on (1) when the unit is set to modes
communication other than the PLC link mode or general- MEWTOCOL
XD For COM.2 Port Clear to send purpose communication mode. It turns off (0) MODBUS-RTU
XE For COM.0 Port flag in other modes.
XF - Not used Do not use this.

X10 For COM.1 Port When the communication channel is reset


under the output Y10 - Y12, the flag is
General-
turned on (1) once the resetting operation is
X11 For COM.2 Port Reset done purpose
completed.
communication
Resetting done: 1
X12 For COM.0 Port Y10 - Y12 is off: 0
X13 - Not used Do not use this.
Status of the CTS signal sent from the
device communicating with. When RS/CS is
CTS signal set to valid in
X14 For COM.1 Port Clear to send from COM.1 port = 0
monitor Communication
Cannot send from COM.1 port = 1
Block COM.1.
The RTS signal can be controlled with Y14.
X15
- Not used Do not use this.
- X1F
(Note 1) The general-purpose communication reception done (copy) flag is effective after the execution of the RECV
instruction until one of the following instructions is executed. This flag does not remain ON across several scans.
Execute 1: END instruction (scan header), and 2: RECV instruction

4-2
4.1 Input/Output Signals Used for Communication

 Output signal
Effective
Output Communication
Name Description operation
signal port
mode
Y0 For COM.1 Port Reports the results of sending in master MEWTOCOL
Y1 For COM.2 Port communication or general-purpose MODBUS-RTU
Sending done
communication. General-
result
Y2 For COM.0 Port Normal completion: 0, Abnormal completion: purpose
1 communication
Y3 Do not turn on "undefined". (Default setting is
- Undefined
- Y7 0.)
Y8 For COM.1 Port General- It turns on (1) during sending in the general-
purpose purpose communication mode. General-
Y9 For COM.2 Port communication purpose
(Note 1)
Sending active communication
YA For COM.0 Port flag Sending done: 0, Sending: 1
Do not turn on "undefined". (Default setting is
YB - Undefined
0.)
YC For COM.1 Port Master It turns on (1) during sending in the master
communication MEWTOCOL
YD For COM.2 Port communication mode.
Sending active MODBUS-RTU
YE For COM.0 Port Sending done: 0, Sending: 1
flag
Do not turn on "undefined". (Default setting is
YF - Undefined
0.)
By turning on (1) Y10 - Y12, the
communication channel can be reset.
Y10 For COM.1 Port Without a request to reset = 0, With a
request to reset = 1
After ON (1) is output and the completion of
the reset is confirmed by X10 - X12, return to
OFF (0). The reset is performed only once
General-
Request to when this signal rises.
purpose
Y11 For COM.2 Port reset CH This function can be used to delete communication
unnecessary received data or to clear errors
before starting normal reception.
1:Sending canceled
2:Reception canceled
Y12 For COM.0 Port 3:Re-set communication parameters
4:Clear error information (only for errors that
can be cleared)
Do not turn on "undefined". (Default setting is
Y13 - Undefined
0.)
By turning on (1) this output, RTS is
controlled.
When RS/CS is
Transmission from the device communicating
set to valid in
Output RTS with is permitted = 0
Y14 For COM.1 Port Communication
signal Transmission from the device communicating
Cassette
with is prohibited = 1
COM.1
Monitor the CTS signal from the device
communicating with using X14.
Y15 - Do not turn on "undefined". (Default setting is
- Undefined -
Y1F 0.)
(Note 1) When transmission is completed within one scan, it turns off when the GPSEND instruction is executed in
the subsequent scan.

NOTE

 Each contact in the table above is used for reading the operation status. Do
not write over it with a user program. (excluding Y10 - Y12 and Y14)

4-3
I/O Allocation

4.1.2 I/O Allocation of Serial Communication Unit


 Input signal
Effective
Input Communication
Name Description operation
signal port
mode
X0 For COM.1 Port General- When the unit completes the data reception,
X1 For COM.2 Port purpose it turns on (1). General-
communication purpose
X2 For COM.3 Port Reception Waiting for data reception: 0, Reception communication
done flag completed: 1
X3 For COM.4 Port

X4 For COM.1 Port General- It turns on (1) if there are copied data when
purpose GPRECV instruction is executed. It turns off
X5 For COM.2 Port General-
communication (0) when END instruction is executed.
purpose
Reception (Note 1)
X6 For COM.3 Port communication
done (copy) Reading completed: 1
flag No data to be read: 0
X7 For COM.4 Port
X8 For COM.1 Port General-
X9 For COM.2 Port purpose It turns on (1) when the unit is set to the General-
communication general-purpose communication mode. It purpose
XA For COM.3 Port Clear to send turns off (0) in other modes. communication
XB For COM.4 Port flag

XC For COM.1 Port


Master It turns on (1) when the unit is set to modes
XD For COM.2 Port communication other than the PLC link mode or general- MEWTOCOL
Clear to send purpose communication mode. It turns off (0) MODBUS-RTU
XE For COM.3 Port
flag in other modes.
XF For COM.4 Port
X10 For COM.1 Port When the communication channel is reset
under the output Y10 - Y13, the flag is General-
X11 For COM.2 Port turned on (1) once the resetting operation is
Reset done purpose
X12 For COM.3 Port completed. communication
Resetting done: 1
X13 For COM.4 Port Y10 - Y12 is off: 0
Status of the CTS signal sent from the
X14 For COM.1 Port device communicating with. When RS/CS is
set to valid in
CTS signal Clear to send from COM.1/COM.3 port = 0 Communication
monitor Cannot send from COM.1/COM.3 port = 1 Cassette
X16 For COM.3 Port The RTS signal can be controlled with COM.1/COM.3
Y14/Y16.
X15,
X17 - Not used Do not use this.
- X1F
(Note 1) The general-purpose communication reception done (copy) flag is effective after the execution of the RECV
instruction until one of the following instructions is executed. This flag does not remain ON across several scans.
Execute 1: END instruction (scan header), and 2: RECV instruction
(Note 2): The I/O numbers actually allocated are the numbers based on the starting word number allocated to the unit.
Example) When the starting word number for the unit is "10", the general-purpose communication reception
done flag for COM.1 port is X100.

4-4
4.1 Input/Output Signals Used for Communication

 Output signal
Effective
Output Communication
Name Description operation
signal port
mode
Y0 For COM.1 Port Reports the results of sending in master MEWTOCOL
Y1 For COM.2 Port communication or general-purpose MODBUS-RTU
Sending done
communication. General-
Y2 For COM.3 Port result
Normal completion: 0, Abnormal completion: purpose
Y3 For COM.4 Port 1 communication
Y4 Do not turn on "undefined". (Default setting is
- Undefined
- Y7 0.)
Y8 For COM.1 Port General-
It turns on (1) during sending in the general-
Y9 For COM.2 Port purpose General-
purpose communication mode.
communication purpose
(Note 1)
YA For COM.3 Port Sending active communication
Sending done: 0, Sending: 1
YB For COM.4 Port flag

YC For COM.1 Port Master


It turns on (1) during sending in the master
YD For COM.2 Port communication MEWTOCOL
communication mode.
YE For COM.3 Port Sending active MODBUS-RTU
Sending done: 0, Sending: 1
flag
YF For COM.4 Port
By turning on (1) Y10 - Y13, the
communication channel can be reset.
Y10 For COM.1 Port
Without a request to reset = 0, With a request
to reset = 1
After ON (1) is output and the completion of
Y11 For COM.2 Port the reset is confirmed by X10 - X13, return to
OFF (0). The reset is performed only once General-
Request to when this signal rises. This function can be purpose
reset CH used to delete unnecessary received data or communication
Y12 For COM.3 Port to clear errors before starting normal
reception.
1:Sending canceled
2:Reception canceled
Y13 For COM.4 Port 3:Re-set communication parameters
4:Clear error information (only for errors that
can be cleared)
By turning on (1) this output, RTS is
Y14 For COM.1 Port controlled.
When RS/CS is
Transmission from the device communicating
set to valid in
Output RTS with is permitted = 0
Communication
signal Transmission from the device communicating
Y16 For COM.3 Port Cassette
with is prohibited = 1
COM.1/COM.3
Monitors the CTS signal from the device
communicating with using X14/X16.
Y15
Do not turn on "undefined". (Default setting is
Y17 - Undefined -
0.)
- Y1F
(Note 1) When transmission is completed within one scan, it turns off when the GPSEND instruction is executed in
the subsequent scan.
(Note 2): The I/O numbers actually allocated are the numbers based on the starting word number allocated to the unit.
Example) When the starting word number for the unit is "10", the sending done result flag for COM.1 port is
Y100.

NOTE

 Each contact in the table above is used for reading the operation status. Do
not write over it with a user program. (excluding Y10 - Y14 and Y16)

4-5
I/O Allocation

4.2 Registration in I/O Map

4.2.1 Settings Using FPWIN GR7 (For CPU with built-in SCU)
 For the CPU with built-in SCU, there is no need to set with FPWIN GR7 because the
following fixed areas are allocated.
No. of occupied words
Unit type Model number (No. of occupied points)
Input Output
2 words (32 points) 2 words (32 points)
CPU Unit CPU with built-in SCU Common
WX0 - WX1 Fixed WY0 - WY1 Fixed

4.2.2 Settings Using FPWIN GR7 (For Serial Communication Unit)


The explanation below shows the case that the serial communication unit is registered in the
slot number 1.

PROCEDURE

1. Select "Options" > "FP7 Configuration" in the menu bar.


The "FP7 Configuration" dialog box appears.
2. Select "I/O map" in the left pane.
The "I/O map" dialog box is displayed.
3. Double-click Slot No. 0.
The "Unit selection [Slot No. 0]" dialog box is displayed.
4. Select "CPU unit" for Unit type, and select a CPU unit used for Unit name,
and press [OK] button.
The CPU unit is registered. Only CPU unit can be registered in Slot No. 0. Slot
No.1 and subsequent numbers cannot be set unless Slot No. 0 is set.

4-6
4.2 Registration in I/O Map

5. Double-click Slot No. 1 in the "I/O map" dialog box.


The "Unit selection [Slot No. 1]" dialog box is displayed.
6. Select "Communications" for Unit type, and select "SCU unit" for Unit name,
and press [OK] button.
"SCU unit" is registered in the I/O map.

The set conditions are reflected in the project being edited.

4-7
I/O Allocation

4-8
5
Setting and Confirming
Communication Conditions
Setting and Confirming Communication Conditions

5.1 Setting Applications and Communication Conditions

5.1.1 Applications to be Set for Each Port


 Available functions for each communication port
Allocated communication port
Communication function to be used
COM.0 COM.1 COM.2 COM.3 COM.4
PLC link ●
MEWTOCOL7-COM (Note 1) Master ● ● ● ● ●
MEWTOCOL-COM Slave ● ● ● ● ●
Master ● ● ● ● ●
MODBUS-RTU
Slave ● ● ● ● ●
General-purpose communication ● ● ● ● ●
(Note 1) In MEWTOCOL7-COM, there is no master communication function.

5.1.2 Conditions to be Set for Each Port


 Communication condition
Communication port Setting range Default
1 - 99 (MEWTOCOL-COM)
Station no. 1 - 999 (MEWTOCOL7-COM) 1
1 - 247 (MODBUS-RTU)
Baud rate 300,600,1200,2400,4800,9600,19200,38400,57600,115200,230400 9600
Data length 7 bits, 8 bits 8 bits
Parity None, Odd, Even Odd
Communica Stop bit 1 bit, 2 bits 1 bit
tion format
End code CR, CR+LF, ETX , or time (0.01 ms – 100 ms, by the unit of 0.01 ms) CR
Without
Start code With STX, Without STX
STX
RS/CS controlled No/Yes Invalid
Send Waiting 0 to 100 ms 0 ms
Modem initialization Invalid, Valid, Re-initialization Invalid
(Note) Communication conditions that can be set vary by the mode to be used (PLC link, MEWTOCOL
communication, MODBUS-RTU, general-purpose communication).

5-2
5.2 Setting Communication Conditions

5.2 Setting Communication Conditions

5.2.1 Settings Using FPWIN GR7 (For CPU with built-in SCU)
Applications and communication conditions for each communication port should be set using
the tool software FPWIN GR7.

PROCEDURE

1. From the menu bar, select "Option" > "FP7 Configuration".


The "FP7 Configuration" dialog box opens.
2. Select "Built-in SCU".
Setting items for "Built-in SCU" appear.

3. Specify communication conditions and press [OK] button.


Set conditions are incorporated into the project that is being edited.

5-3
Setting and Confirming Communication Conditions

5.2.2 Settings Using FPWIN GR7 (For Serial Communication Unit)


 Applications and communication conditions for each communication port should be set using
the tool software FPWIN GR7.
 The explanation below shows the case that the serial communication unit is registered in the
slot number 1.

PROCEDURE

1. Select "Options" > "FP7 Configuration" in the menu bar.


The "FP7 Configuration" dialog box appears.
2. Select "I/O map" in the left pane.
The "I/O map" dialog box is displayed.
3. Select the Slot No. in which SCU unit is registered in the "I/O map" dialog box,
and press the "Advanced" button.
The "SCU Unit Settings" dialog box is displayed.
4. Select COM No. in the left pane.
Setting items available for each COM. number are displayed.
5. Set communication conditions, and press [OK] button.
The set conditions are reflected in the project being edited.

5-4
6
PLC Link
PLC Link

6.1 Operation of PLC link MEWNET-W0

6.1.1 Overview of PLC Link Operation


 “Link relays (L)” and data registers “link registers (LD)” are shared between the connected
PLCs.
 If the link relay contact for one PLC goes on, the same link relay also goes on in each of the
other PLCs connected to the network.
 Likewise, if the contents of a link register are rewritten in one PLC, the change is made in the
same link register of each of the other PLCs connected to the network.
(Station no.1) (Station no.2) (Station no.3) (Station no.4)
No.1 No.1 No.1
Send area Receive area
No.2 No.2 Receive area No.2
Send area Receive area
Receive area
No.3 No.3 No.3
Receive area Send area

PLC PLC PLC PLC

RS485

6-2
6.1 Operation of PLC link MEWNET-W0

6.1.2 Operation of Link Relays and Link Registers


 Link relay
If the link relay L0 in unit No.1 is turned on, the status change is fed back to the link relay L0
with the same number in other units, and R0 in the other units is output.

R0 L0 L0 Y0 L0 Y0 L0 Y0

PLC PLC PLC PLC

RS485

R0 No.2 Link register No.3 Link register No.4 Link register


F0, MV, K100, LD0 LD 0 100 LD 0 100 LD 0 100

No.1 Link register


LD 0 100

 Link register
If the constant 100 is written into LD0 of the source station no.1, LD0 of the other station no.2
is also changed to the constant 100.

6-3
PLC Link

6.2 Configuration Required for PLC Link

6.2.1 Setup Procedure (For CPU with built-in SCU)


 In order to use the PLC link function, setting of communication conditions and allocation of
memories are required.
 Settings should be performed by the programming tool FPWIN GR7.

PROCEDURE

1. From the menu bar, select "Option" > "FP7 Configuration".


The "FP7 Configuration" dialog box appears.
2. From the left pane of the dialog box, select "Built-in SCU".
Setting items for each COM port are displayed.
3. Select "PLC link" from "Communication mode" in setting items under "COM1
settings".
Setting items for PLC link become valid.

4. Specify conditions to be allocated to each setting item for "Station no." and
"PLC link settings" under "COM1 settings", and press [OK] button.
The settings are registered in the project.

6-4
6.2 Configuration Required for PLC Link

6.2.2 Setup Procedure (For Serial Communication Unit)


 In order to use the PLC link function, setting of communication conditions and allocation of
memories are required.
 Settings should be performed by the programming tool FPWIN GR7.
 The following procedure describes the case that the serial communication unit has been
already registered in the I/O map.

PROCEDURE

1. Select "Options" > "FP7 Configuration" in the menu bar.


The "FP7 Configuration" dialog box appears.
2. From the left pane of the dialog box, select “I/O map”.
The "I/O map" dialog box is displayed.
3. Select a unit used for PLC link, and press [Advanced] button.
The "SCU Unit Settings" dialog box is displayed.
4. Select "COM.1 settings" from the left pane, and select "PLC link" in
"Communication mode".

差し替え
5. Set conditions assigned to each item in "PLC link settings", and press [OK]
button.
The settings are registered in the project.

REFERENCE

For details of PLC link settings, please see explanation on the next page onward.

6-5
PLC Link

6.2.3 List of Setting Items


 List of setting items (COM1 settings)
Settings when the PLC link
Setting items Remark
function is used
Communication mode PLC link
Set a specific station no. for PLC to be
Station no. 1 - 16
connected to the PLC link.
Baud rate 115200 bps
Data length 8 bit
Parity Odd
Stop bit 1 bit
RS/CS Invalid Regardless of settings in FPWIN GR7,
Send waiting time 0 the FP7 CPU unit itself performs automatic
Start code STX Invalid settings.

Terminator setting CR
Terminator judgment time 0
Modem initialization Do not initialize

 List of setting items (PLC link settings)


Setting items Setting range Setting method
Memory block numbers for link relays and Specify the device No. range for link relays
0 or 1
link registers to be used and link registers to be used in a block.
Maximum station no. to be used for PLC Set the Max. station no. for PLC to be
0 to 16
link connected to the PLC link.
Range of link relays used 0 to 64 words
Range of link registers used 0 to 128 words
Starting no. for link relay send area 0 to 63 Specify the device No. range for link relays
Size of link relay send area 0 to 64 words and link registers to be used.

Starting No. for link register send area 0 to 127


Size of link register send area 0 to 127 words

NOTE

 When you want to change the communication mode set in the PLC link to
another mode, download the changed project to the CPU unit in FPWIN GR7,
and turn on power to the FP7 CPU unit again.

6-6
6.3 Setting Items for PLC Link

6.3 Setting Items for PLC Link

6.3.1 Station No. Setting


 In the PLC link where multiple PLCs are connected to the transmission line, station no.
should be set to identify each PLC.
 Station nos. are the numbers to identify the different PLCs on the same network. The same
number must not be used for more than one PLC on the same network.

6.3.2 Max. Station No. Setting


 Set the Max. station no. for PLC to be connected to the PLC link.
 The smaller the Max. station no. is, the shorter the relative transmission time becomes.

NOTES

 Station nos. should be set sequentially and consecutively, starting from 1,


with no breaks between them. If there is a missing station no., the
transmission time will be longer.
 Set the same value for the Max. station no. for all PLCs connected to the
same PLC link.

6-7
PLC Link

6.3.3 Memory Block Numbers for Link Relays and Link Registers to be Used
 The memory area of link relays and link registers are divided into the area for PLC link 0 and
the area for PLC link 1, which can respectively use up to 1024 link relay points (64 words)
and up to 128 link register words.
 Specify "0" when the former memory block is used, and specify "1" when the latter memory
block is used.

Configuration of link area

6.3.4 Range of Use of Link Relays and Range of Use of Link Registers
 Specify the memory area range for link relays and link registers to be used.
 Link relays and link registers that do not use the link function can be used in place of internal
relays and data registers.

E.g. Examples of setting the range of use (in the case of PLC link 0)
 The figure below indicates a case where the link relay range of use is set to "50" (50 words,
WL0 - WL49) and the link register range of use is set to "100" (100 words, LD0 - LD99).

 If all the link relays are used in the PLC link 0 area, set the link relay range of use to "64" (64
words), and all the link register range of use to "128" (128 words).

6-8
6.3 Setting Items for PLC Link

6.3.5 Starting No. for Link Relay Send Area and Sending Size
 The memory areas for link relays are divided into send areas and receive areas.
 The link relays are transmitted from the send area to the receive area of a different PLC.
Link relays with the same numbers as those on the sending side must exist in the receive
area on the receiving side.

E.g. Example of setting the starting No. for link relay send area and the sending size (in
the case of memory block No.0)

 List of setting items (PLC link settings)


Setting Station no. and setting method
Setting items
range No.1 No.2 No.3 No.4
Memory block numbers for link
relays and link registers to be 0 or 1 0 0 0 0
used
Maximum station no. to be used
0 to 16 4 4 4 4
for PLC link
0 to 64
Range of link relays used 64 64 64 64
words
Starting no. for link relay send 0 to 63
0 20 40 0
area
0 to 64
Size of link relay send area 20 20 24 0
words

6-9
PLC Link

6.3.6 Starting No. for Link Register Send Area and Sending Size
 The memory areas for link registers are divided into send areas and receive areas.
 The link registers are sent from the send area to the receive area of a different PLC. Link
registers with the same numbers as those on the sending side must exist in the receive area
on the receiving side.

E.g. Example of setting the starting No. for link register send area and the sending size
(in the case of memory block No.0)

 List of setting items (PLC link settings)


Setting Station no. and setting method
Setting items
range No.1 No.2 No.3 No.4
Memory block numbers for link
0 or 1 0 0 0 0
relays and link registers to be used
Maximum station no. to be used for
0 to 16 4 4 4 4
PLC link
Range of link registers used for 0 to 128
128 128 128 128
PLC link words
Starting No. for link register send 0 to 127
0 40 80 0
area
0 to 127
Size of link register send area 40 40 48 0
words

NOTES

 If a mistake is made when allocating a link area, be aware that an error will
result, and communication will be disabled.
 Avoid overlapping send areas.

6-10
6.3 Setting Items for PLC Link

In the example shown below, there is an area between No. 2 and No. 3 link relays
which is overlapped, and this will cause an error, so that communication cannot be
carried out.

 The allocations shown below are not possible, neither for link relays nor for
link registers.
Send area is split on a single PLC

Send and receive areas are split into multiple segments

6-11
PLC Link

6.4 PLC Link Response Time

6.4.1 Response Time of 1 Transmission Cycle


The maximum value for the transmission time (T) of one cycle can be calculated using the
following formula.
 Calculation formula

(1) Ts (transmission time per station)


Calculation
Ts = Scan time + Tpc (PLC link sending time)
formula
Tpc = Ttx (sending time per byte) x Pcm (PLC link sending byte size)
Ttx = 1 / (transmission speed kbps × 1000) × 11ms … Approx. 0.096 ms at 115.2 kbps
Pcm = 23 + (number of relay words + number of register words) x 4 (4 times based on ASCII
code)

(2) Tlt (link table sending time)


Calculation
Tlt = Ttx (sending time per byte) x Ltm (link table sending size)
formula
Ttx = 1 / (transmission speed kbps × 1000) × 11 ms … Approx. 0.096 ms at 115.2 kbps
Ltm = 13 + 2 × n (n = No. of added stations)

(3) Tso (Master station scan time)


This should be confirmed using the programming tool.

(4) Tlk (link addition processing time)


When there is no station that is yet to be added to the link, Tlk = 0
Calculation Tlk = Tlc (link addition command sending time) + Twt (addition waiting time)
formula + Tls (sending time for command to stop transmission if link error occurs) + Tso (master station
scan time)

Tlc = 10 x Ttx (sending time per byte)


Ttx = 1 / (transmission speed kbps × 1000) × 11ms … Approx. 0.096 ms at 115.2 kbps
Twt = Default value: 400 ms
Tls = 7 x Ttx (sending time per byte)
Ttx = 1 / (transmission speed kbps × 1000) × 11ms … Approx. 0.096 ms at 115.2 kbps
Tso = Master station scan time

6-12
6.4 PLC Link Response Time

 Example of calculation
Response time of 1
Condition Calculation process transmission cycle
(T)
16 units connected to the link; no
station yet to be added Ttx = 0.096
Where Max. station no. = 16, Each Pcm = 23 + (4 + 8) × 4 = 71 bytes T Max. = Ts + Tlt + Tso
1 Relays/registers are equally Tpc = Ttx × Pcm = 0.096 × 71 ≈ 6.82 ms 7.82 × 16 + 4.32 + 1
allocated, and Each Ts = 1 + 6.82 = 7.82 ms = 130.44 ms
Scan time for each PLC is set at 1 Tlt = 0.096 × (13 + 2 × 16) = 4.32 ms
ms:

16 units connected to the link; no


station yet to be added Ttx = 0.096
Where Max. station no. = 16, Each Pcm = 23 + (4 + 8) × 4 = 71 bytes T Max. =Ts+Tlt+Tso
2 Relays/registers are equally Tpc = Ttx × Pcm = 0.096 × 71 ≈ 6.82 ms 11.82×16+4.32+5
allocated, and Each Ts = 5 + 6.82 = 11.82 ms =198.44ms
Scan time for each PLC is set at 5 Tlt = 0.096 × (13 + 2 × 16) = 4.32 ms
ms:

16 units connected to the link; 1 Ttx = 0.096


station yet to be added T Max. = Ts + Tlt + Tso
Each Ts = 5 + 6.82 = 11.82 ms
Where Max. station no. = 16, + Tlk
Tlt = 0.096 × (13 + 2 × 15) ≈ 4.13 ms
3 Relays/registers are equally 11.82 × 15 + 4.13 + 5 +
allocated, and Tlk = 0.96 + 400 + 0.67 + 5 ≈ 407 ms 407
Scan time for each PLC is set at 5 Note: Default value for the addition = 593.43 ms
ms: waiting time: 400 ms

8 units connected to the link; no Ttx = 0.096


station yet to be added Each Pcm = 23 + (8 + +16) × 4 = 119
Where Max. station no. = 8, bytes T Max. = Ts + Tlt + Tso
4 Relays/registers are equally Tpc = Ttx × Pcm = 0.096 × 119 ≈ 11.43 16.438 + 2.79 + 5
allocated, and ms = 139.23 ms
Scan time for each PLC is set at 5 Each Ts = 5 +11.43 = 16.43 ms
ms: Tlt = 0.096 × (13 + 2 × 8) ≈ 2.79 ms

2 units connected to the link; no Ttx = 0.096


station yet to be added Each Pcm = 23 + (32 + +64) × 4 = 407
Where Max. station no. = 2, bytes T Max. = Ts + Tlt + Tso
5 Relays/registers are equally Tpc = Ttx × Pcm = 0.096 × 407 ≈ 39.072 44.072 × 2 + 1.632 + 5
allocated, and ms = 94.776 ms
Scan time for each PLC is set at 5 Each Ts = 5 + +39.072 = 44.072 ms
ms: Tlt = 0.096 × (13 + 2 × 2) ≈ 1.632 ms

2 units connected to the link; no


station yet to be added Ttx = 0.096
Where Max. station no. = 2, Each Pcm = 23 + (1 + +1) × 4 = 31 bytes T Max. = Ts + Tlt + Tso
6 Where 32 relay points and 2W Tpc = Ttx × Pcm = 0.096 × 31 ≈ 2.976 ms 3.976 × 2 + 1.632 + 1
registers are equally allocated, Each Ts = 1 + +2.976 = 3.976 ms = 10.584 ms
and scan time for each PLC is set Tlt = 0.096 × (13 + 2 × 2) ≈ 1.632 ms
at 1 ms:

6-13
PLC Link

6.4.2 Response Time When There is a Station Yet to be Added


 If there are stations that have not been added to the link, the Tlk time (link addition
processing time) increases, and with this the transmission cycle time will be longer.

NOTE

 “Stations that have not been added (stations yet to be added)” refers to
stations between No.1 and the Max. station no. that are not connected, or
those that are connected but whose power supply has yet to be turned on.

6-14
7
MEWTOCOL
Master/Slave Communication
MEWTOCOL
Master/Slave Communication

7.1 Configuration

7.1.1 Setting Communication Conditions


 Configuration
Setting items Default Specification range Remark
Communication MEWTOCOL- MEWTOCOL-COM Master communication is not
mode COM MEWTOCOL7-COM possible using MEWTOCOL7.
Set a specific station no. for PLC to
MEWTOCOL-COM: 0 - 99 be connected to the PLC link. Set a
Station no. 1
MEWTOCOL7-COM: 0 - 999 value that does not overlap with
other devices.
300 / 600 / 1200 / 2400 / 4800 /
Set the baud rate to match that of
Baud rate 9600 bps 9600 / 19200 / 38400 / 57600 /
devices to be connected.
115200 / 230400
Data length 8 bits 8 bits The setting must be done according
Parity Odd Odd to the devices connected.
In general, the default values (8-bit
Stop bit 1 bit 1 bit length, odd parity, and 1-stop bit)
RS/CS Invalid Invalid / Valid should be used.

Send waiting time 0 - 10000 Set this when it is necessary to


(set value × 0.01 0 delay response to the partner
ms) (0 - 100 ms) device in slave communication.
Start code STX Invalid -
Terminator setting CR -
Terminator No need to specify.
judgment time
0 -
(set value × 0.01
ms)
Do not initialize / Initialize while Perform settings only when a
Do not performing settings / Re- modem is to be connected. Perform
Modem initialization
initialize initialize while performing settings for start-up modem
settings initialization.
(Note 1) In MEWTOCOL communication, the following setting items need not to be specified.
Start code, terminator setting, terminator judgment time, PLC link setting

7-2
7.2 List of MEWTOCOL / MEWTOCOL7 Supporting Commands

7.2 List of MEWTOCOL / MEWTOCOL7 Supporting Commands

7.2.1 List of MEWTOCOL Commands


 Commands to be used
Type of instruction Code Description
RC Reads ON/OFF status of contact.
(RCS) - Specifies only one point.
Read contact area
(RCP) - Specifies multiple contacts.
(RCC) - Specifies a range in word units.
WC Turns ON or OFF the contact.
(WCS) - Specifies only one point.
Write contact area
(WCP) - Specifies multiple contacts.
(WCC) - Specifies a range in word units.
Read data area RD Reads the contents of a data area.
Write data area WD Writes data to a data area.
Register or Reset
MC Registers the contact to be monitored.
contacts monitored
Register or Reset
MD Registers the data to be monitored.
data monitored
Monitoring start MG Monitors a registered contact or data using MC and MD.
Preset contact area
SC Embeds the area of a specified range in a 16-point on/off pattern.
(fill command)
Preset data area
SD Writes the same contents to the data area of a specified range.
(fill command)
Reads the specifications of the programmable controller and error
Read the status of PLC RT
codes if an error occurs.
Abort AB Aborts reception of multiple frame responses before completion.
(Note) Some devices are not accessible due to format restrictions of MEWTOCOL-COM communication commands.

7.2.2 List of MEWTOCOL7 Commands


 Commands to be used
Type of instruction Code Description
Read data area MMRD Reads the contents of a data area.
Write data area MMWT Writes data to a data area.

REFERENCE

 For details of MEWTOCOL commands, please see 11.2 MEWTOCOL-COM


Format and 11.3 MEWTOCOL7-COM Format.

7-3
MEWTOCOL
Master/Slave Communication

7.3 MEWTOCOL-COM Master Communication (RECV)

7.3.1 Read Data from an External Device


 Instructions
In master communication, PLC has the sending right, and executes communication by
sending commands to devices that support MEWTOCOL, and receiving responses.
Messages in accordance with the protocol are automatically generated by PLC. In the user
program, reading and writing can be done simply by specifying the station no. and memory
address and executing SEND/RECV instructions.
External device supporting
PLC
MEWTOCOL-COM
Command message

DT100 100 %01#RD0040000401 (BCC) CR DT00400 100


DT101 0 DT00401 0
・・・・・・ ・・・・・・・・ ・・・・・・ ・・・・・・・・
・・・・・・ ・・・・・・・・
%01$RD64000000 (BCC) CR ・・・・・・ ・・・・・・・・

Response message

Specify and read station no. and address based on RECV instruction

 Sample program
 Send commands from the COM1 port of the CPU unit, read data from the data area of an
external device (station no. 1) DT400 - DT401, and write the content into PLC's data register
DT100 - DT101.
 Confirm that the unit is in the master mode (XC), and that the sending process is not in
progress for the same port (YC), and start up the SEND instruction.
 In the UNITSEL instruction, specify the slot No. (U0) and the COM. port No. (U1).
 In the RECV instruction, specify and execute the partner station no. (U1), initial address
(DT400), No. of data (U2), and initial address on the PLC side to save data (DT100).
R0 XC YC R100 Starting conditions for RECV
execution
( DF ) Clear to send flag: ON
Master Master Execute Sending active flag: OFF
communication communication RECV
R100 Clear to send flag Sending active flag Settings for communication port
UNITSEL U0 U1 S1: Slot 0
S2: COM1
S1 S2

RECV processing
RECV.US U1 DT400 U2 DT100 DT0 S1: Partner station no. (U1)
S2: Data address (DT400)
S1 S2 n D1 D2 n: No. of data (U2)
D1: Data saving area (DT100)
D2: Execution result code (DT0)

(Note) The unit number and COM port number in the above program is applied when the COM.1 port of the CPU unit
is used.

7-4
7.3 MEWTOCOL-COM Master Communication (RECV)

 Timing chart

Master communication Conditions to enable execution of RECV


Clear to send flag instruction
(XC, XD, XE, XF) Confirm ON Clear to send flag (XC, XD, XE, XF): ON
Sending active flag (YC, YD, YE, YF): OFF
Master communication Confirm OFF
Sending active flag
(YC, YD, YE, YF) Sending active flag (YC, YD, YE, YF):
Sending data: ON, Sending done: OFF

Execute RECV

Master communication
Sending done result flag Sending done result flag (Y0, Y1, Y2, Y3):
(Y0, Y1, Y2, Y3) Normal completion: OFF
Abnormal completion: ON

Sending data

Response reception
processing

 I/O allocation (For CPU Unit)


COM port no.
Name Explanation
1 2 0
Master Turns ON when MEWTOCOL-COM, MEWTOCOL7, or
XC XD XE communication Clear MODBUS-RTU is set for the communication mode, and the unit
to send flag is in the RUN mode.
Master Turns ON during sending data based on SEND/RECV
YC YD YE communication instruction.
Sending active flag Turns OFF when the sending process is completed.
Reports completion result of sending data in general-purpose
Sending done result
Y0 Y1 Y2 communication or master communication.
flag
(Normal completion: 0, Abnormal completion: 1)

 I/O allocation (For Serial Communication Unit)


COM port no.
Name Explanation
1 2 3 4
Master Turns ON when MEWTOCOL-COM, MEWTOCOL7, or
XC XD XE XF communication MODBUS-RTU is set for the communication mode, and the
Clear to send flag unit is in the RUN mode.
Master Turns ON during sending data based on SEND/RECV
YC YD YE YF communication instruction.
Sending active flag Turns OFF when the sending process is completed.
Reports completion result of sending data in genera-purpose
Sending done result
Y0 Y1 Y2 Y3 communication or master communication.
flag
(Normal completion: 0, Abnormal completion: 1)
(Note 1) Each contact is used for reading the operation status. Do not write over it with a user program.

7-5
MEWTOCOL
Master/Slave Communication

KEY POINTS

 Specify the port targeted for communication, using UNITSEL instruction


immediately before SEND/RECV instruction.
 Master communication is only valid when MEWTOCOL or MODBUS is
selected. Confirm that the "Master communication Clear to send flag" (XC -
XF) for the targeted channel is ON, and execute SEND/RECV instruction.
 You cannot execute other SEND/RECV instruction for a communication port
in master communication. Confirm that the "Master communication Sending
active flag" (YC - YF) is OFF, and execute instruction.
 You cannot execute SEND/RECV instruction for a port in slave
communication.
 If no response is received, the "Master communication Sending active flag"
(YC - YF) remains ON throughout the timeout setting time specified in CPU
configuration.
 Up to 16 SEND/RECV instructions can be executed simultaneously for
different COM. ports.

7-6
7.3 MEWTOCOL-COM Master Communication (RECV)

7.3.2 RECV Instruction (When MEWTOCOL-COM is Used)


 Instruction format

Items Settings Setting range


i Specify the operation unit. US / SS
S1 Specify the partner station no. 1 - 99
Specify the device initial address of the source node data area in the partner
S2 0 - 99999
node. (Note 1)( Note 2)
1 - 509 words
n Specify the No. of sent data. (Note 3)
or 1 bit
Specify the device initial address of the receiver node data area in the source
D1 (Note1)
node. (Note1)
Specify the device area in the source node to save the execution result code
D2 -
(one word). (Note 4)
(Note 1) Transmission methods vary by the type of device to be specified for the operands [S2] and [D1].
Device to be specified for [S2] and [D1] Transmission
method
Register
16 bit device: WX, WY, WR, WL, DT, LD
transmission
1 bit device: X; Y; R; L; DT,n; LD, Bit transmission
(Note 2) Bit device DT, n and LD, n cannot be specified for the header of the sender data in the partner node.
(Note 3) The No. of sent data is on a word basis for register transmission, and on a bit basis for bit transmission.
(Note 4): Device that can be specified for [D2] are: WX, WY, WR, WL, DT, LD. Saved as one word in the specified area.
0: Normal completion
1: Communication port is being used for master communication
2: Communication port is being used for slave communication
3: No. of master communication instructions that can be used simultaneously has been exceeded
4: Sending timeout
5: Response reception timeout
6: Received data error

7-7
MEWTOCOL
Master/Slave Communication

7.4 MEWTOCOL-COM Master Communication (SEND)

7.4.1 Write Data into an External Device


 Instructions
In master communication, PLC has the sending right, and executes communication by
sending commands to devices that support MEWTOCOL, and receiving responses.
Messages in accordance with the protocol are automatically generated by PLC. In the user
program, reading and writing can be done simply by specifying the station no. and memory
address and executing SEND/RECV instructions.
External device supporting
PLC
MEWTOCOL-COM
Command message
%01#WDD004000040164000000 (BCC) CR
DT100 100 DT00400 100
DT101 0 DT00401 0
・・・・・・ ・・・・・・・・ ・・・・・・ ・・・・・・・・
%01$WD (BCC) CR
・・・・・・ ・・・・・・・・ ・・・・・・ ・・・・・・・・

Response message

Specify and write station no. and address based on SEND instruction

 Sample program
 Send commands from the COM1 port of the CPU unit, and write the content of PLC's data
register DT100 - DT101 into the data area of an external device (station no. 1) DT400 -
DT401.
 Confirm that the unit is in the master mode (XC), and that the sending process is not in
progress for the same port (YC), and start up the SEND instruction.
 In the UNITSEL instruction, specify the slot No. (U0) and the COM. port No. (U1).
 In the SEND instruction, specify and execute the sender initial address (DT100), No. of data
(U2), "Transmit to" station no. (U1), and initial address (DT400).

R0 XC YC R100 SEND execution condition


( DF ) Clear to send flag: ON
Master Master Execute Sending active flag: OFF
communication communication SEND
R100 Clear to send flag Sending active flag
Settings for communication port
UNITSEL U0 U1 S1: Slot 0 (U0)
S2: COM1 (U1)
S1 S2

SEND process
SEND.US DT100 U2 U1 DT400 DT0 S: Data saving area (DT100)
n: No. of sent data (U2)
S1 n D1 D2 D3 D1: Area code of the receiver (U1)
D2: "Forward to" address (DT400)
D3: Execution result code (DT0)

(Note) The unit number and COM port number in the above program is applied when the COM.1 port of the CPU unit
is used.

7-8
7.4 MEWTOCOL-COM Master Communication (SEND)

 Timing chart

Master communication Conditions to enable execution of SEND


Clear to send flag instruction
(XC, XD, XE, XF) Confirm ON Clear to send flag (XC, XD, XE, XF): ON
Sending active flag (YC, YD, YE, YF): OFF
Master communication Confirm OFF
Sending active flag
(YC, YD, YE, YF) Sending active flag (YC, YD, YE, YF):
Sending data: ON, Sending done: OFF

Execute SEND

Master communication
Sending done result flag Sending done result flag (Y0, Y1, Y2, Y3):
(Y0, Y1, Y2, Y3) Normal completion: OFF
Abnormal completion: ON

Sending data

Response reception
processing

 I/O allocation (For CPU Unit)


COM port no.
Name Explanation
1 2 0
Master Turns ON when MEWTOCOL-COM, MEWTOCOL7, or
XC XD XE communication MODBUS-RTU is set for the communication mode, and the unit is
Clear to send flag in the RUN mode.
Master
Turns ON during sending data based on SEND/RECV instruction.
YC YD YE communication
Turns OFF when the sending process is completed.
Sending active flag
Reports completion result of sending data in general-purpose
Sending done
Y0 Y1 Y2 communication or master communication. (Normal completion: 0,
result flag
Abnormal completion: 1)

 I/O allocation (For Serial Communication Unit)


COM port no.
Name Explanation
1 2 3 4
Master Turns ON when MEWTOCOL-COM, MEWTOCOL7, or
XC XD XE XF communication MODBUS-RTU is set for the communication mode, and the
Clear to send flag unit is in the RUN mode.
Master Turns ON during sending data based on SEND/RECV
YC YD YE YF communication instruction.
Sending active flag Turns OFF when the sending process is completed.
Reports completion result of sending data in genera-purpose
Sending done result
Y0 Y1 Y2 Y3 communication or master communication.
flag
(Normal completion: 0, Abnormal completion: 1)
(Note 1) Each contact is used for reading the operation status. Do not write over it with a user program.

7-9
MEWTOCOL
Master/Slave Communication

KEY POINTS

 Specify the port targeted for communication, using UNITSEL instruction


immediately before SEND/RECV instruction.
 Master communication is only valid when MEWTOCOL or MODBUS is
selected. Confirm that the "Master communication Clear to send flag" (XC -
XF) for the targeted channel is ON, and execute SEND/RECV instruction.
 You cannot execute other SEND/RECV instruction for a communication port
in master communication. Confirm that the "Master communication Sending
active flag" (YC - YF) is OFF, and execute instruction.
 You cannot execute SEND/RECV instruction for a port in slave
communication.
 If no response is received, the "Master communication Sending active flag"
(YC - YF) remains ON throughout the timeout setting time specified in CPU
configuration.
 Up to 16 SEND/RECV instructions can be executed simultaneously for
different COM. ports.

7-10
7.4 MEWTOCOL-COM Master Communication (SEND)

7.4.2 SEND Instruction (When MEWTOCOL-COM is Used)


 Instruction format

Setting
Settings Setting range
items
i Specify the operation unit. US / SS
S Specify the header of the source node data area. (Note 1) -
1 - 507 words
n Specify the No. of sent data.
or 1 bit
D1 Specify the partner station no. (Note 2) (Note 3) 0 - 99
Specify the initial address of the receiver node data area in the partner
D2 0 - 99999
node. (Note 4)
Specify the device area in the source node to save the execution result
D3 (Note 5)
code (one word).
(Note 1) Transmission methods vary by the type of device to be specified for the operands [S] and [D2].
Device to be specified for [S2] and [D1] Transmission
method
Register
16 bit device: WX, WY, WR, WL, DT, LD
transmission
1 bit device: X, Y, R, L, DT, n, LD, n Bit transmission
(Note 2) The No. of sent data is on a word basis for register transmission, and on a bit basis for bit transmission.
(Note 3) When "0" is specified for partner station no., global transmission is applied. In this case, no response
message is received from the partner side.
(Note 4) Bit device DT, n and LD, n cannot be specified for the header of the receiver data in the partner node.
(Note 5): Device that can be specified for [D3] are: WX, WY, WR, WL, DT, LD. Saved as one word in the specified area.
0: Normal completion
1: Communication port is being used for master communication
2: Communication port is being used for slave communication
3: No. of master communication instructions that can be used simultaneously has been exceeded
4: Sending timeout
5: Response reception timeout
6: Received data error

7-11
MEWTOCOL
Master/Slave Communication

7-12
8
MODBUS RTU
Master/Slave Communication
MODBUS RTU
Master/Slave Communication

8.1 Configuration

8.1.1 Setting Communication Conditions


 Configuration
Setting items Default Specification range Remark
MEWTOCOL-
Communication mode MODBUS-RTU Specify "MODBUS-RTU".
COM
Set a specific station no. for PLC to
be connected to the PLC link. Set a
Station no. 1 0 - 247
value that does not overlap with
other devices.
300 / 600 / 1200 / 2400 / The setting must be done
Baud rate 9600 4800 / 9600 / 19200 / according to the devices
38400 / 57600 / 115200 connected.
Data length 8 bits 8 bits
The setting must be done
Parity Odd Even according to the devices
Stop bit 1 bit 1 bit connected. In general, 8-bit length,
even parity, and 1-stop bit is used.
RS/CS Invalid Invalid / Valid
Set this when it is necessary to
Send waiting time
0 0 - 10000 delay response to the partner
(set value × 0.01 ms)
device in slave communication.
Start code STX Invalid -
Terminator setting CR -
Terminator judgment Use the unit in the default setting
time 0 - as indicated on the left.
(set value × 0.01 ms)
Modem initialization Do not initialize -
(Note 1) In MODBUS communication, the following setting items need not to be specified.
Start code, terminator setting, terminator judgment time, modem initialization, PLC link setting

8-2
8.2 List of MODBUS RTU Supported Commands

8.2 List of MODBUS RTU Supported Commands

8.2.1 List of MODBUS Function Codes


 Table of supported commands
Remarks FP7 supported
Code Name (MODBUS) Name
(Reference No.) functions
01 Read Coil Status Read Y and R Coils 0X ●
02 Read Input Status Read X Contact 1X ●
03 Read Holding Registers Read DT 4X ●
04 Read Input Registers Read WL and LD 3X ●
05 Force Single Coil Write Single Y and R 0X ●
06 Preset Single Register Write DT 1 Word 4X ●
08 Diagnostics Loopback Test - -
15 Force Multiple Coils Write Multiple Y's and R's 0X ●
16 Preset Multiple Registers Write DT Multiple Words 4X ●
22 Mask Write 4X Register Write DT Mask 4X -
23 Read/Write 4X Registers Read/Write DT 4X -
(Note 1) Types of MODBUS function codes vary by instructions to be used.

 Correspondence table for MODBUS reference No. and device No.


MODBUS reference No. Data on BUS PLC device number
(hexadecimal)
Coil 000001-002048 0000-07FF Y0-Y127F
002049-034816 0800-87FF R0-R2047F
Input 100001-108192 0000-1FFF X0-X511F
Holding register 400001-465536 0000-FFFF DT0-DT65535
Input register 300001-301024 0000-03FF WL0-WL1023
302001-318384 07D0-47CF LD0-LD16383
(Note 1) The table above indicates correspondence between the MODBUS reference numbers for accessing from a
higher device to FP7 using the MODBUS protocol, and the operation device numbers of FP7.

8-3
MODBUS RTU
Master/Slave Communication

8.3 MODBUS RTU Master Communication (RECV)

8.3.1 Read Data from an External Device


 Instructions
In master communication, PLC has the sending right, and executes communication by
sending commands to devices that support MODBUS-RTU, and receiving responses.
Messages in accordance with the protocol are automatically generated by PLC. In the user
program, reading and writing can be done simply by specifying the station no. and memory
address and executing SEND/RECV instructions.
External device
PLC
supporting Modbus-RTU
Command message

DT100 100 (Hex) 01 03 00 00 00 02 (CRC) 40001 100


DT101 0 40002 0
・・・・・・ ・・・・・・・・ ・・・・・・ ・・・・・・・・
・・・・・・ ・・・・・・・・
(Hex) 01 03 04 00 64 00 00 (CRC) ・・・・・・ ・・・・・・・・

Response message

Specify and read station no. and address based on RECV instruction

 Sample program
 Send commands from the COM1 port of the CPU unit, read data from the data area of an external
device (station no. 1) 40001 - 40002, and write the content into PLC's data register DT100 - DT101.
 Confirm that the unit is in the master mode (XC), and that the sending process is not in
progress for the same port (YC), and start up the SEND instruction.
 In the UNITSEL instruction, specify the slot No. (U0) and the COM. port No. (U1).
 In the RECV instruction, specify and execute the partner device station no. (U1), MODBUS
command and partner device station no. to be used (H0301), initial address (40001), No. of
data (U2), and initial address on the PLC side to save data (DT100). For the address of the
partner device, please check operating instructions, etc. of the relevant device.
R0 XC YC R100 Starting conditions for RECV
execution
( DF ) Clear to send flag: ON
Master Master Execute Sending active flag: OFF
communication communication RECV
R100 Clear to send flag Sending active flag Settings for communication port
UNITSEL U0 U1 S1: Slot 0 (U0)
S2: COM1 (U1)
S1 S2
RECV processing
S1: MODBUS code (H03) and
RECV.US H0301 H0 U2 DT100 DT0 partner device station no. (H01)
S2: Partner device address (H0)
S1 S2 n D1 D2 (corresponds to H0: 40001)
n: No. of data (U2)
D1: Data saving area (DT100)
D2: Execution result code (DT0)

(Note 1) Operand [S1] of RECV instruction is specified by combining two hexadecimal digits of MODBUS function
code with two hexadecimal digits of partner device station no.
(Note 2) When the partner device is FP series PLC, Operand [S2] of RECV instruction can be specified using the
Device No.
(Note 3) The unit number and COM port number in the above program is applied when the COM.1 port of the CPU
unit is used.

8-4
8.3 MODBUS RTU Master Communication (RECV)

 Timing chart
Master communication Conditions to enable execution of RECV
Clear to send flag instruction
(XC, XD, XE, XF) Confirm ON Clear to send flag (XC, XD, XE, XF): ON
Sending active flag (YC, YD, YE, YF): OFF
Master communication Confirm OFF
Sending active flag
(YC, YD, YE, YF) Sending active flag (YC, YD, YE, YF):
Sending data: ON, Sending done: OFF

Execute RECV

Master communication
Sending done result flag Sending done result flag (Y0, Y1, Y2, Y3):
(Y0, Y1, Y2, Y3) Normal completion: OFF
Abnormal completion: ON

Sending data

Response reception
processing

 I/O allocation (For CPU Unit)


COM port no.
Name Explanation
1 2 0
Master Turns ON when MEWTOCOL-COM, MEWTOCOL7, or
XC XD XE communication MODBUS-RTU is set for the communication mode, and the unit is
Clear to send flag in the RUN mode.
Master
Turns ON during sending data based on SEND/RECV instruction.
YC YD YE communication
Turns OFF when the sending process is completed.
Sending active flag
Reports completion result of sending data in general-purpose
Sending done
Y0 Y1 Y2 communication or master communication. (Normal completion: 0,
result flag
Abnormal completion: 1)

 I/O allocation (For Serial Communication Unit)


COM port no.
Name Explanation
1 2 3 4
Master Turns ON when MEWTOCOL-COM, MEWTOCOL7, or
XC XD XE XF communication MODBUS-RTU is set for the communication mode, and the
Clear to send flag unit is in the RUN mode.
Master Turns ON during sending data based on SEND/RECV
YC YD YE YF communication instruction.
Sending active flag Turns OFF when the sending process is completed.
Reports completion result of sending data in genera-purpose
Sending done result
Y0 Y1 Y2 Y3 communication or master communication.
flag
(Normal completion: 0, Abnormal completion: 1)
(Note 1) Each contact is used for reading the operation status. Do not write over it with a user program.

8-5
MODBUS RTU
Master/Slave Communication

KEY POINTS

 Specify the port targeted for communication, using UNITSEL instruction


immediately before SEND/RECV instruction.
 Master communication is only valid when MEWTOCOL or MODBUS is
selected. Confirm that the "Master communication Clear to send flag" (XC -
XF) for the targeted channel is ON, and execute SEND/RECV instruction.
 You cannot execute other SEND/RECV instruction for a communication port
in master communication. Confirm that the "Master communication Sending
active flag" (YC - YF) is OFF, and execute instruction.
 You cannot execute SEND/RECV instruction for a port in slave
communication.
 If no response is received, the "Master communication Sending active flag"
(YC - YF) remains ON throughout the timeout setting time specified in CPU
configuration.
 Up to 16 SEND/RECV instructions can be executed simultaneously for
different COM. ports.

8-6
8.3 MODBUS RTU Master Communication (RECV)

8.3.2 RECV Instruction (MODBUS Function Code Specified Type)


 Instruction format

 Operand
Items Settings Setting range
i Specify the operation unit. US / SS
Specify the MODBUS function codes and partner station no. to be used. (Note 1) (Note 2)
Higher Two hexadecimal digits that indicate the MODBUS
H1 - H4 (1 - 4)
S1 byte function code
Lower
Two hexadecimal digits that indicate the station no. H1 - HF7 (1 - 247)
byte
S2 Specify the source MODBUS address in the partner node. H0 - HFFFF (0 - 65535)
1 - 127 words
n Specify the No. of sent data. (Note 3)
1 - 2040 bits
Specify the device initial address of the receiver node data area in the
D1 -
source node. (Note 2)
Specify the device area in the source node to save the execution result
D2 (Note 3)
code (one word).
(Note 1) Operand [S1] is specified by combining two hexadecimal digits of MODBUS function code with two
hexadecimal digits of partner station no.
E.g. Specify "H030F" when MODBUS function code is 03 (Read Holding Registers) and station no. is 15.
(Note 2) Based on the types of device specified in operand [D1], the transmission methods and MODBUS function
codes that can be used vary.
Device to be specified Transmission Values that can be specified in higher
for [D1] method bytes of [S1]
H1: Read Coil Status (01)
16 bit device Register H2: Read Input Status (02)
WX, WY, WR, WL, DT, LD transmission H3: Read Holding Registers (03)
H4: Read Input Registers (04)
1 bit device H1: Read Coil Status (01)
Bit transmission
X, Y, R, L, DT, n, LD, n H2: Read Input Status (02)
(Note 3) The No. of sent data is on a word basis for register transmission, and on a bit basis for bit transmission.
(Note 4): Device that can be specified for [D2] are: WX, WY, WR, WL, DT, LD. Saved as one word in the specified
area.
0: Normal completion
1: Communication port is being used for master communication
2: Communication port is being used for slave communication
3: No. of master communication instructions that can be used simultaneously has been exceeded
4: Sending timeout
5: Response reception timeout
6: Received data error

8-7
MODBUS RTU
Master/Slave Communication

8.3.3 RECV Instruction (MODBUS Function Code Unspecified Type)


 Instruction format

 Operand
Items Settings Setting range
i Specify the operation unit. US / SS
S1 Specify the partner station no. H1 - HF7 (1 - 247)
Specify the device initial address of the source node data area in the H0 - HFFFF (0 - 65535)
S2
partner node. (Note 1) (Note 2)
1 - 127 words
n Specify the No. of sent data. 1 - 2040 bits
(Note 3)
Specify the device initial address of the receiver node data area in the
D1 (Note 1) (Note 4)
source node.
Specify the device area in the source node to save the execution result
D2 (Note 5)
code (one word).
(Note 1) Types of devices and transmission methods to be specified for operands [S2] and [D1], and MODBUS
function codes to be used for instruction execution vary.
Device to be specified Transmission MODBUS function codes
for [S2] and [D1] method to be used for instruction execution
Read Coil Status (01)
16 bit device Register Read Input Status (02)
WX, WY, WR, WL, DT, LD transmission Read Holding Registers (03)
Read Input Registers (04)
1 bit device Read Coil Status (01)
Bit transmission
X, Y, R, L, DT, n, LD, n Read Input Status (02)
(Note 2) Bit device L; DT, n; and LD, n cannot be specified for the header of the sender data in the partner node.
(Note 3) The No. of sent data is on a word basis for register transmission, and on a bit basis for bit transmission.
(Note 4): Device that can be specified for D1 are: WX, WY, WR, WL, DT, LD.
(Note 5): Device that can be specified for D2 are: WX, WY, WR, WL, DT, LD. Saved as one word in the specified area.
0: Normal completion
1: Communication port is being used for master communication
2: Communication port is being used for slave communication
3: No. of master communication instructions that can be used simultaneously has been exceeded
4: Sending timeout
5: Response reception timeout
6: Received data error

8-8
8.4 MODBUS RTU Master Communication (SEND)

8.4 MODBUS RTU Master Communication (SEND)

8.4.1 Write Data into an External Device


 Instructions
In master communication, PLC has the sending right, and executes communication by
sending commands to devices that support MODBUS-RTU, and receiving responses.
Messages in accordance with the protocol are automatically generated by PLC. In the user
program, reading and writing can be done simply by specifying the station no. and memory
address and executing SEND/RECV instructions.
External device
PLC
supporting Modbus-RTU
Command message

DT100 100 (Hex) 01 10 00 00 00 02 04 00 64 00 00 (CRC) 40001 100


DT101 0 40002 0
・・・・・・ ・・・・・・・・ ・・・・・・ ・・・・・・・・
・・・・・・ ・・・・・・・・
(Hex) 01 10 00 00 00 02 (CRC) ・・・・・・ ・・・・・・・・

Response message

Specify and write station no. and address based on SEND instruction

 Sample program
 Send commands from the COM1 port of the CPU unit, and write the content of PLC's data
register DT100 - DT101 into the data area of an external device (station no. 1) 40001 - 40002.
 Confirm that the unit is in the master mode (XC), and that the sending process is not in
progress for the same port (YC), and start up the SEND instruction.
 In the UNITSEL instruction, specify the slot No. (U0) and the COM. port No. (U1).
 In the SEND instruction, specify and execute the PLC initial address (DT100), No. of data
(U2), MODBUS function code to be used (16: H10), partner device station no. (H01), and
initial address (H0). For the address of the partner device, please check operating
instructions, etc. of the relevant device.
R0 XC YC R100 SEND execution conditions
( DF ) Clear to send flag: ON
Master Master Execute Sending active flag: OFF
communication communication SEND
R100 Clear to send flag Sending active flag Settings for communication port
UNITSEL U0 U1 S1: Slot 0 (U0)
S2: COM1 (U1)
S1 S2
SEND process
S: Data saving area (DT100)
SEND.US DT100 U2 H1001 H0 DT0 n: No. of sent data (U2)
S n D1 D2 D3 D1: MODBUS code (H10) and
partner device station no. (H01)
D2: "Transmit to" address (H0)
D3: Execution result code (DT0)

(Note 1) Operand [S1] of SEND instruction is specified by combining two hexadecimal digits of MODBUS function
code with two hexadecimal digits of partner device station no. When the MODBUS function code is 16, specify
H10 for [D1].
(Note 2) When the partner device is FP series PLC, Operand [S2] of SEND instruction can be specified using the
Device No.
(Note 3) The unit number and COM port number in the above program is applied when the COM.1 port of the CPU
unit is used.

8-9
MODBUS RTU
Master/Slave Communication

 Timing chart

Master communication Conditions to enable execution of SEND


Clear to send flag instruction
(XC, XD, XE, XF) Confirm ON Clear to send flag (XC, XD, XE, XF): ON
Sending active flag (YC, YD, YE, YF): OFF
Master communication Confirm OFF
Sending active flag
(YC, YD, YE, YF) Sending active flag (YC, YD, YE, YF):
Sending data: ON, Sending done: OFF

Execute SEND

Master communication
Sending done result flag Sending done result flag (Y0, Y1, Y2, Y3):
(Y0, Y1, Y2, Y3) Normal completion: OFF
Abnormal completion: ON

Sending data

Response reception
processing

 I/O allocation (For CPU Unit)


COM port no.
Name Explanation
1 2 0
Master Turns ON when MEWTOCOL-COM, MEWTOCOL7, or
XC XD XE communication Clear MODBUS-RTU is set for the communication mode, and the unit
to send flag is in the RUN mode.
Master Turns ON during sending data based on SEND/RECV
YC YD YE communication instruction.
Sending active flag Turns OFF when the sending process is completed.
Reports completion result of sending data in general-purpose
Sending done result
Y0 Y1 Y2 communication or master communication. (Normal completion:
flag
0, Abnormal completion: 1)

 I/O allocation (For Serial Communication Unit)


COM port no.
Name Explanation
1 2 3 4
Master Turns ON when MEWTOCOL-COM, MEWTOCOL7, or
XC XD XE XF communication MODBUS-RTU is set for the communication mode, and the unit
Clear to send flag is in the RUN mode.
Master
Turns ON during sending data based on SEND/RECV
communication
YC YD YE YF instruction.
Sending active
Turns OFF when the sending process is completed.
flag
Reports completion result of sending data in genera-purpose
Sending done
Y0 Y1 Y2 Y3 communication or master communication.
result flag
(Normal completion: 0, Abnormal completion: 1)
(Note 1) Each contact is used for reading the operation status. Do not write over it with a user program.

8-10
8.4 MODBUS RTU Master Communication (SEND)

KEY POINTS

 Specify the port targeted for communication, using UNITSEL instruction


immediately before SEND/RECV instruction.
 Master communication is only valid when MEWTOCOL or MODBUS is
selected. Confirm that the "Master communication Clear to send flag" (XC -
XF) for the targeted channel is ON, and execute SEND/RECV instruction.
 You cannot execute other SEND/RECV instruction for a communication port
in master communication. Confirm that the "Master communication Sending
active flag" (YC - YF) is OFF, and execute instruction.
 If no response is received, the "Master communication Sending active flag"
(YC - YF) remains ON throughout the timeout setting time specified in CPU
configuration.
 You cannot execute SEND/RECV instruction for a port in slave
communication.
 Up to 16 SEND/RECV instructions can be executed simultaneously for
different COM. ports.

8-11
MODBUS RTU
Master/Slave Communication

8.4.2 SEND Instruction (MODBUS Function Code Specified Type)


 Instruction format

 Operand
Items Settings Setting range
i Specify the operation unit. US / SS
S Specify the header of the source node data area. (Note 1) -
1 - 127 words
n Specify the No. of sent data. (Note 1) (Note 2)
1 - 2040 bits
Specify the MODBUS command and partner station no. to be used. (Note 3) (Note 4)
Higher Two hexadecimal digits that indicate the
H5, H6, HF, H10
D1 byte MODBUS function code
Lower Two hexadecimal digits that indicate the station
H0 - HF7 (0 - 247)
byte no.
Specify the header of the MODBUS address in the receiver data area in
D2 H0~HFFFF (0 - 65535)
the partner node.
Specify the device area in the source node to save the execution result
D3 (Note 5)
code (one word).
(Note 1) Based on the types of device specified in operand [S] and the No. of sent data specified in [n], the
transmission methods and MODBUS function codes that can be used vary.
Types of device Transmission No. of sent
Values that can be specified in
to be specified in [S] method data
higher bytes of [D1]
[n]
H6: Preset Single Register (06)
16 bit device 1 HF: Force Multiple Coils (15)
Register H10: Preset Multiple Registers (16)
WX, WY, WR, WL, DT,
transmission
LD HF: Force Multiple Coils (15)
2 - 127
H10: Preset Multiple Registers (16)
H5: Force Single Coil (05)
1 bit device Bit 1
HF: Force Multiple Coils (15)
X, Y, R, L, DT, n, LD,n transmission
2 - 2040 HF: Force Multiple Coils (15)
(Note 2) The No. of sent data [n] is on a word basis for register transmission, and on a bit basis for bit transmission.
(Note 3) Operand [D1] is specified by combining two hexadecimal digits of MODBUS function code with two
hexadecimal digits of partner station no.
E.g. Specify "H100A" when MODBUS function code is 16 (Preset Multiple Registers) and station no. is 10.
(Note 4) When "0" is specified for partner station no., global transmission is applied. In this case, no response
message is received from the partner side.
(Note 5): Device that can be specified for [D3] are: WX, WY, WR, WL, DT, LD. Saved as one word in the specified area.
0: Normal completion
1: Communication port is being used for master communication
2: Communication port is being used for slave communication
3: No. of master communication instructions that can be used simultaneously has been exceeded
4: Sending timeout
5: Response reception timeout
6: Received data error

8-12
8.4 MODBUS RTU Master Communication (SEND)

8.4.3 SEND Instruction (MODBUS Function Code Unspecified Type)


 Instruction format

 Operand
Items Settings Setting range
i Specify the operation unit. US / SS
S Specify the header of the source node data area. (Note 1)
n Specify the No. of sent data. 1 - 127 words, 1 - 2040 bits (Note 2)
D1 Specify the partner station no. H0 - HF7 (0 - 247) (Note 3)
Specify the initial address of the receiver node data area
D2 H0 - HFFFF (0 - 65535) (Note 4)
in the partner node.
Specify the device area in the source node to save the
D3 (Note 5)
execution result code (one word).
(Note 1) Types of devices and transmission methods to be specified for operands [S] and [D2], and MODBUS
function codes to be used for instruction execution vary.
Types of device Transmission MODBUS function codes
to be specified in [S] method to be used for instruction execution

16 bit device Force Multiple Coils (15)


Register transmission
WX, WY, WR, WL, DT, LD Preset Multiple Registers (16)

1 bit device
Bit transmission Force Multiple Coils (15)
X, Y, R, L, DT, n, LD, n

(Note 2) The No. of sent data [n] is on a word basis for register transmission, and on a bit basis for bit transmission.
(Note 3) When "0" is specified for partner station no., global transmission is applied. In this case, no response
message is received from the partner side.
(Note 4) 16 bit device WX, WL, and LD; and 1 bit device X; L; DT, n; and LD, n cannot be specified for the header of
the receiver data in the partner node.
(Note 5): Device that can be specified for [D3] are: WX, WY, WR, WL, DT, LD. Saved as one word in the specified area.
0: Normal completion
1: Communication port is being used for master communication
2: Communication port is being used for slave communication
3: No. of master communication instructions that can be used simultaneously has been exceeded
4: Sending timeout
5: Response reception timeout
6: Received data error

8-13
MODBUS RTU
Master/Slave Communication

8-14
9
General-Purpose
Communication
General-Purpose Communication

9.1 Operation of General-Purpose Communication

9.1.1 Read Data from an External Device


 Read data from a partner device
In general-purpose communication, communication is executed by sending commands that
suit the partner device, and receiving responses. Command messages are sent by
formulating a data table for message in accordance with the protocol, on the given data
register, and subsequently executing GPSEND instruction.

PLC External device


Send command message

DT100 U4
ABCD (CR) 40001 21
DT101 H 42 41 40002 43
DT102 H 44 43 ・・・・・・ ・・・・・・・・
・・・・・・ ・・・・・・・・ 1 2 3 4 (CR) ・・・・・・ ・・・・・・・・

Receive response message

Send command based on GPSEND instruction


Receive response based on GPRECV instruction

9.1.2 Write Data into an External Device


 Write data into a partner device
In general-purpose communication, communication is executed by sending commands that
suit the partner device, and receiving responses. Command messages are sent by
formulating a data table for message in accordance with the protocol, on the given data
register, and subsequently executing GPSEND instruction.

PLC External device


Send command message

ABCD 1 2 (CR)
DT100 U6 40001 21
DT101 H 42 41 ・・・・・・ ・・・・・・・・
DT102 H 44 43 ・・・・・・ ・・・・・・・・
DT103 H 32 31 XYZ (CR) ・・・・・・ ・・・・・・・・

Receive response message

Send command based on GPSEND instruction


Receive response based on GPRECV instruction

KEY POINTS

 There is no relevance between the operation of transmission by GPSEND


instruction and the operation of reception by GPRECV instruction. The CPU
with built-in SCU unit is always clear to receive data.

9-2
9.2 Configuration

9.2 Configuration

9.2.1 Setting Communication Conditions


 Configuration
Setting items Default Specification range Remark
Communication General-purpose Specify "general-purpose
MEWTOCOL-COM
mode communication communication".
Station no. 1 1 - 999 Settings are not necessary.
300 / 600 / 1200 / 2400
/ 4800 / 9600 / 19200 /
Baud rate 9600
38400 / 57600 / 115200
/ 230400 The setting must be done according to
Data length 8 bits 7 bit / 8 bits the devices connected.

Parity Odd None / Odd / Even


Stop bit 1 bit 1 bit / 2 bits
Set to "Valid" only when Communication
RS/CS Invalid Invalid / Valid Cassette AFP7CCS2 is used in a 5-wire
mode.
Send waiting
Set this when it is necessary to delay
time 0 0 - 10000
response to the partner device.
(unit: 0.01 ms)
Start code STX Invalid Invalid / Valid
The setting must be done according to
Terminator CR / CR+LF / Time / the devices connected.
CR
setting ETX
Terminator 0 - 10000 In cases where "Time" is specified in the
judgment time 0 terminator setting, set the time for judging
(unit: 0.01 ms) (0 - 100 ms) the terminator.
Do not initialize /
Initialize while Perform settings only when a modem is
Modem
Do not initialize performing settings / to be connected. Perform settings for
initialization
Re-initialize while start-up modem initialization.
performing settings
(Note 1) In general-purpose communication, the following setting items need not to be specified.
Station no., PLC link

9-3
General-Purpose Communication

9.3 Sending Operation

9.3.1 Overview of Sending Operation


 Instructions
Sending in the general-purpose communication is performed by formulating a data table for
sending on the given operation memory, and subsequently executing GPSEND instruction.

PLC External device


Send message/data

DT100 U5
ABCDE (CR) 00001 ・・・・・・・・
DT101 BA 00002 ・・・・・・・・
DT102 DC Send data based on GPSEND ・・・・・・ ・・・・・・・・
DT103 ・・E instruction ・・・・・・ ・・・・・・・・

 Sample program
 Confirm that the unit is in the general-purpose communication mode (X8), and that the
general-purpose sending process is not in progress for the same port (Y8), and start up the
sending program.
 In the SSET instruction, convert a given message into an ASCII text string, and specify the
number of strings to be sent in the data register DT100, and the message to be sent from
the data register DT101.
 In the UNITSEL instruction, specify the slot No. (U0) and the COM. port No. (U1).
 In the GPSEND instruction, specify and execute the header of the table where the message
to be sent is saved (DT101) and the No. of characters (DT100).
R0 X8 Y8 R101 R100 GPSEND execution conditions
( DF ) Clear to send flag: ON
Sending active flag: OFF
General purpose General-purpose
communication communication
R100 Clear to send flag Sending active flag
Data conversion
S1: Sent Data
R100 S2: Save Sent Data
DT100: No. of Sent Characters
( DF ) SSET “ABCDE” DT100 DT101 onward: Sent Data
S1 S2
R100 Settings for communication port
UNITSEL U0 U1 S1: Slot 0 (U0)
S2: COM1 (U1)
S1 S2
SEND processing
GPSEND . US DT101 DT100 DT0 S: Header of Sent Data (DT101)
n: No. of Sent Characters (DT100)
S n D D: Execution Result Code (DT0)

Y8 R101 Confirm sending completion


( DF / ) Reset GPSEND execution
conditions

(Note) The unit number and COM port number in the above program is applied when the COM.1 port of the CPU unit
is used.

9-4
9.3 Sending Operation

 Timing chart
 Data in the table [S] specified by GPSEND instruction are sent, in ascending order from
lower bytes.
 During the sending process, the "General-purpose communication Sending active flag" (Y8,
Y9, YA, YB) turns ON. The flag is turned OFF when sending is completed. (The flag does
not turn off right after the execution of the instruction. It turns off at the beginning of the
second scan.)
 The sending result (0: normal completion, 1: abnormal completion) is saved in the general-
purpose communication sending result flag (Y0, Y1, Y2, Y3).

General purpose Conditions to enable execution of


communication Clear to GPSEND instruction
send flag (X8, X9, XA, XB) Clear to send flag (X8, X9, XA, XB): ON
Confirm ON
Sending active flag (Y8, Y9, YA, YB): OFF
General-purpose Confirm OFF
communication Sending Sending active flag (Y8, Y9, YA, YB):
active flag (Y8, Y9, YA, YB) Sending data: ON, Sending done: OFF

Execute GPSEND

Sending done result


Sending done result flag (Y0, Y1, Y2, Y3):
flag (Y0, Y1, Y2, Y3)
Normal completion: OFF
Abnormal completion: ON

Sending data

 I/O allocation (CPU Unit)


COM port no.
Name Explanation
1 2 0
General-purpose
Turns ON when the unit is set to the general-purpose
X8 X9 XA communication Clear to
communication mode.
send flag
General-purpose Turns ON during sending data based on general-purpose
Y8 Y9 YA communication communication GPSEND.
Sending active flag Turns OFF when the sending process is completed.
Reports completion result of sending data in general-purpose
Sending done result
Y0 Y1 Y2 communication or master communication. (Normal
flag
completion: 0, Abnormal completion: 1)

 I/O allocation (For Serial Communication Unit)


COM port no.
Name Explanation
1 2 3 4
General-purpose
Turns ON when the unit is set to the general-purpose
X8 X9 XA XB communication
communication mode.
Clear to send flag
General-purpose Turns ON during sending data based on general-purpose
Y8 Y9 YA YB communication communication GPSEND.
Sending active flag Turns OFF when the sending process is completed.
Reports completion result of sending data in genera-purpose
Sending done result
Y0 Y1 Y2 Y3 communication or master communication.
flag
(Normal completion: 0, Abnormal completion: 1)
(Note 1) Each contact is used for reading the operation status. Do not write over it with a user program.
(Note 2) When the sending time is shorter than the scan time, the "General-purpose communication Sending active
flag" (Y8, Y9, YA) turns OFF when the GPSEND instruction is executed in the subsequent scan following data
sending completion. In all cases, it is turned ON for at least one scan time.

9-5
General-Purpose Communication

KEY POINTS

 Specify the port targeted for communication, using UNITSEL instruction


immediately before GPSEND instruction.
 Maintain the ON conditions for GPSEND instruction until sending is
completed and the general-purpose communication sending active flag (Y8,
Y9, YA, YB) turns OFF.

9.3.2 Contents of Sent Data


Strings data sent by the GPSEND instruction are converted into ASCII text and saved in a
given data register.
 Sent data table
 Once the sent data are converted into strings data using the SSET instruction, the No. of
characters is saved in the header area. The sent data are saved starting with lower bytes of
the subsequent address.

DT100 U5 After executing SSET instruction, the No. of characters is set.

DT101 H42(B) H41(A)


Strings of the No. of bytes specified by GPSEND instruction
DT102 H44(D) H43(C)
are sent, in ascending order from lower bytes.
DT103 ----- H45(E)

DT104 ----- -----

KEY POINTS

 The start code and the end code specified in the configuration menu are
automatically added to the sent data. Do not include the start code or the
end code into sent data.
 The maximum volume of data that can be sent is 4,096 bytes. If the start
code is set to valid, the maximum size is 4,096 bytes including the start
code and the end code.
 It is also possible to send binary data.

9-6
9.3 Sending Operation

9.3.3 GPSEND (General-Purpose Communication Sending Instruction)


 Instruction format

Items Settings Setting range


i Specify the operation unit. US / SS (Note 1)
S Specify the header of the source node data area. (Note 2)
1 to 4094, -1 to -4096
n Specify the No. of sent bytes.
(Note 1) (Note 3)
Specify the device area in the source node to save the execution
D (Note 4)
result (one word).
(Note 1) When a K constant (integer with a symbol) is specified for the No. of sent bytes [n], select SS for operation
unit [i]. When a U constant (integer without a symbol) or an H constant (hexadecimal integer), select US for
operation unit [i].
(Note 2): Device that can be specified for S are: WX, WY, WR, WL, DT, LD.
(Note 3) If a negative value is specified, the end code is not automatically added to the sent data. (Where SCU is
targeted)
(Note 4): Device that can be specified for D are: WX, WY, WR, WL, DT, LD.
Once the sending process is completed, the sent bytes are saved. When an error occurs, "FFFFH" is saved.

KEY POINTS

 Specify the port targeted for communication, using UNITSEL instruction


immediately before GPSEND instruction.
 Maintain the ON conditions for GPSEND instruction until sending is
completed and the general-purpose communication sending active flag (Y8,
Y9, YA, YB) turns OFF.
 Confirm that the "General-purpose communication Clear to send flag" for
the targeted COM port has turned ON, and execute GPSEND instruction.
 When GPSEND instruction is executed for a communication port in the
sending process, the sending active flag and the sending result are updated.
 GPSEND instruction cannot be used in an interrupt program.

9-7
General-Purpose Communication

9.3.4 Precautions on Sending Data


 Procedures when the end code is not added in the sending process
When you do not wish to add the terminator (end code) in the sending process, use a
negative value for specifying the No. of sent bytes.
R0 X8 Y8 R101 R100 GPSEND execution conditions
( DF ) Clear to send flag: ON
Sending active flag: OFF
General-purpose General-purpose
communication communication
R100 Clear to send flag Sending active flag
Data conversion
S1: Sent Data
S2: Save Sent Data
R100 DT100: No. of Sent Characters
( DF ) SSET “ABCDE” DT100 DT101 onward: Sent Data
S1 S2
R100 Because no end code is added,
( DF ) NEG.SS DT100 DT100 use a negative value for
specifying the No. of sent bytes.
S1 D
R100 Settings for communication port
UNITSEL U0 U1 S1: Slot 0 (U0)
S2: COM1 (U1)
S1 S2
SEND processing
GPSEND . SS DT101 DT100 DT0 S: Header of Sent Data (DT101)
n: No. of Sent Characters (DT100)
S n D D: Execution Result Code (DT0)

Y8 R101 Confirm sending completion


( DF / ) Reset GPSEND execution
conditions

KEY POINTS

 When you do not wish to add the terminator (end code), use a negative
value for specifying the No. of sent data in GPSEND instruction. Select "SS"
for operation unit.

9-8
9.4 Receiving Operation

9.4 Receiving Operation

9.4.1 Overview of Receiving Operation


 Instructions
In the general-purpose communication mode, data received from the partner device are saved
in eight reception buffers for each COM port. When the GPRECV instruction is executed in a
user program, data in the reception buffer can be copied into a given operation memory.

PLC External device

Reception buffer (eight for each COM port)


Receive message/data 00001 21
・・・・・・ H 31 32 33 34 35 00002 43
・・・・・・ ・・・・・・・・ 00003 ・・5
Operation ・・・・・・ ・・・・・・・・ 1 2 3 4 5(CR)
memory ・・・・・・ ・・・・・・・・
・・・・・・ ・・・・・・・・
DT200 U5
DT201 H 32 31
Transfer the strings received based on
DT202 H 34 33
GPRECV instruction to a given data register
DT203 H ・・・35

 Sample program
 When the reception done flag (X0) turns ON, the reception program is started up by the
GPRECV instruction.
 In the UNITSEL instruction, specify the slot No. (U0) and the COM. port No. (U1).
 In the GPRECV instruction, specify and execute the header of the data table where the
received message is saved (DT200) and the final address (DT209).
X0 R100 GPRECV execution conditions
( DF ) Reception done flag: ON

R100 Settings for communication port


S1: Slot 0 Built in CPU (U0)
UNITSEL U0 U1 S2: COM1 (U1)
S1 S2
GPRECV processing
S1: Header of
GPRECV . US DT200 DT209 Received Data (DT200)
S2: Terminator of
S1 S2 Received Data (DT209)

(Note) The unit number and COM port number in the above program is applied when the COM.1 port of the CPU unit
is used.

9-9
General-Purpose Communication

 I/O allocation (CPU Unit)


COM port no.
Name Explanation
1 2 0
General-purpose
Turns ON when the receiving process is completed in
X0 X1 X2 communication Reception
the general-purpose communication mode.
done flag
Turns ON when the GPRECV instruction is executed
General-purpose
and the received data have been copied into the
X4 X5 X6 communication Reception
specified operation memory. Turns OFF when there are
copy done flag
no applicable data.

 I/O allocation (For Serial Communication Unit)


COM port no.
Name Explanation
1 2 3 4
General-purpose
Turns ON when the receiving process is completed in
X0 X1 X2 X3 communication Reception
the general-purpose communication mode.
done flag
Turns ON when the GPRECV instruction is executed
General-purpose
and the received data have been copied into the
X4 X5 X6 X7 communication Reception
specified operation memory. Turns OFF when there are
copy done flag
no applicable data.


 Timing chart
 Data received from an external device are saved in the same reception buffer.
 When the terminator (end code) is received, the “reception done” flag (X0, X1, X2, X3) turns
on. Subsequently, the following data are saved in the buffer upon reception. 8 data can be
received consecutively.
Start receiving

Received data 1 2 ・・・ 5 ( CR) A B ・・・

Reception ON
done flag OFF
X0
ON
GPRECV
execution OFF
condition R100 Execute GPRECV instruction

 When the GPRECV instruction is executed, data are copied into the specified area, and the
reception done flag (X0, X1, X2, X3) turns OFF. The reception done flag (X0, X1, X2, X3)
turns OFF when the I/O refresh is executed at the beginning of the subsequent scans.
Reception buffer Cr Cr
Received data Reception done flag (X0, X1, X2, X3):
When reception has been done: ON,
When copying of received data has
Reception done flag been done based on GPRECV
(X0, X1, X2, X3) instruction: OFF

Execute GPRECV

9-10
9.4 Receiving Operation

 Saving method for received data


When data are saved in a given data register from the reception buffer, based on GPRECV
instruction, the data are saved in the following manner.

DT200 U5 Saves the received No. of bytes.

DT201 H32(2) H31(1)


The received data are saved in ascending order from
DT202 H34(5) H33(3) lower bytes.

DT203 ----- H35(4)

DT204 ----- ----- If the received No. of bytes is smaller than the area specified
by the GPRECV command, the data are not overwritten.
----- ----- -----

9-11
General-Purpose Communication

9.4.2 Contents of Received Data


When data are copied into a given data register, based on GPRECV instruction, the data are
saved in the following manner.

Example: The data “12345 CR” is transmitted from a device with RS-232C device.
 At the beginning of the data register, the No. of received bytes is saved.
 The received data are saved in ascending order from lower bytes to higher bytes, starting
with DT201.
DT203 DT202 DT201 DT200
Higher Lower Higher Lower Higher Lower Higher Lower
byte byte byte byte byte byte byte byte
H0D H35 H34 H33 H32 H31 H0 H5
(CR) (5) (4) (3) (2) (1)

Received No. of bytes

KEY POINTS

 The received data that are copied based on the GPRECV instruction do not
include a start code or end code.
 It is also possible to receive binary data based on the GPRECV instruction.
In this case, the terminator should be specified using "Time".

9.4.3 Precautions on Receiving Data


 Reset communication ports
 If a communication abnormality has occurred, communication ports can be reset by turning
on the "Request to reset" signal (Y10, Y11, Y12, Y13) by the user program.
 Once reset is completed, (X10, X11, X12, X13) turns ON. Subsequently, turn OFF the
"Request to reset" (Y10, Y11, Y12, Y13).
R100 X10 Y10
Reset CH1
( DF )
of COM port
Request to CH1 error Request to
reset an error reset done reset CH1
Y10

Request to
reset CH1

 Procedure for repeated reception of data


For repeated reception of data, perform the following steps 1 to 4:
(1) Receive data.
(2) Turn on the "General-purpose communication reception done" flag (X0, X1, X2, X3).
(3) Specify a port to receive data based on the UNITSEL instruction.
(4) Execute the GPRECV instruction and read the received data from the reception buffer.

9-12
9.4 Receiving Operation

9.4.4 Operations of the "Reception done copy" flag and multiplex reception
 Operation and function of the "reception done copy" flag (X4, X5, X6, X7)
 The "reception done copy" flag (X4, X5, X6, X7) turns ON when the GPRECV instruction is
executed and data are copied from the reception buffer to the specified operation memory,
and turns OFF when the END instruction is executed.
 Processing in the case of multiplex reception
 If the time from the reception of data in the reception buffer to the subsequent data reception
is shorter than the PLC scan time, and the receiving frequency is high, it is possible that the
reception done flag (X0, X1, X2, X3) remains ON and cannot detect sequential receptions.
 In cases where it is necessary to process sequentially received data, constantly execute the
GPRECV instruction, in combination with the "reception done copy" flag (X4, X5, X6, X7).
 Referring to the "reception done copy" flag (X4, X5, X6, X7), you can confirm whether there
are lately received data.

Reception CR CR
buffer data
In the case of sequential receptions, the
reception done flag (X0, X1, X2, X3) remains ON.
Reception
done flag
(X0, X1, X2, X3)
Execute
GPRECV
instruction
Reception done
copy flag
(X4, X5, X6, X7)

1 scan time
After always executing GPRECV instruction, confirm
whether there are lately received data referring to the
reception done copy flag (X4, X5, X6, X7).

9-13
General-Purpose Communication

9.4.5 GPRECV (General-Purpose Communication Receiving Instruction)


 Instruction format

Setting
Settings Setting range
items
i Specify the operation unit. US / SS
D1 Specify the initial address of the data area to save the received data. (Note 1)
D2 Specify the final address of the data area to save the received data. (Note 2)
(Note 1): Device that can be specified for D1 are: WX, WY, WR, WL, DT, LD.
(Note 2): Device that can be specified for D2 are: WX, WY, WR, WL, DT, LD.

KEY POINTS

 Specify the port targeted for communication, using UNITSEL instruction


immediately before GPRECV instruction.
 When the general-purpose communication reception done flag is ON for the
targeted COM port, execute GPRECV.
 When multiplex reception is carried out, the reception done flag (X0, X1, X2,
X3) remains ON after the received data are copied based on GPRECV
instruction. Therefore, the received data cannot be copied by when the
“reception done” signal rises.

9-14
9.5 Sending/Receiving Flag Operation

9.5 Sending/Receiving Flag Operation

9.5.1 No Header (Start Code), Terminator (End Code) "CR":

The “reception done” flag, the “sending active” flag, the GPSEND instruction, and the
GPRECV instruction are related as follows:
Data received
from external A B C CR D E F G
device
Stored

A A A D D D D
SCU
receive bu ffer B B E E E
C Data can be received until eight F F
Write pointer

receive bu ffers are all filled up even G


if the reception done flag is turned on.

No. of bytes <1> <2> <3> <1> <2> <3> <4>


received
After GPRECV instruction is ON
executed, reception done
Reception flag turns off at the beginning
done flag of next scan or later.
OFF
X0, X1, X2, X3
ON

GPRECV
instruction OFF
execution ON

GPSEND
instruction OFF
execution
ON
General-purpose
communication
Sending active flag OFF
Y8, Y9, YA, YB

Transmitted 1 2 3 CR
data

Receive bu ffer 3 No. of bytes received


specified using A
GPRECV instruction B
C

 The COM port has eight reception buffers. The reception process is continued after the
reception done flag (X0, X1, X2, X3) turns ON. The reception done flag (X0, X1, X2) does
not turn OFF immediately following the execution of GPRECV instruction. It will be turned off
at the beginning of the next scan or later.
 After GPSEND instruction is executed, data transmission is started in several μs to several
tens of ms. For time before transmission is started, please refer to the communication cycle
time (SM208-SM210) using the system monitor function.

9-15
General-Purpose Communication

 After GPSEND instruction is executed, dual sending to the same port is not possible until the
"sending General-purpose communication Sending active flag" (Y8, Y9, YA, YB) turns OFF.
The "General-purpose communication Sending active flag" (Y8, Y9, YA, YB) turns OFF in
instruction execution in the next scan or later following completion of data sending.

9.5.2 Start Code "STX", End Code "ETX":

Receiving process: Reception done flag and GPRECV instruction are related as
follows:
Data received
from external A B C STX D E ETX F G STX H ETX
device
Stored

SCU A A A A D D D F F F H H
receive bu ffer
B B B B E E G G G G
Even in a
Write pointer

C C C C C "reception done"
status, received
data is continued
into another
buffer, because
there are 4,096 x
No. of bytes <1> <2> <3> <0> <1> <2> <2> <1> 8 reception <2> <0> <1> <1>
received buffers.
Upon reception of the Upon reception of the
start code, the reception start code, the reception
pointer is initialized. pointer is initialized.

ON
Reception
done flag
X0, X1, X2, X3 OFF

ON

GPSEND
instruction OFF
execution

Receive bu ffer 2 No. of bytes received


specified using
GPRECV instruction D
E


When the start code is set to "STX", the data are saved in the reception buffer. When the
start code is received, the receive pointer is initialized. If there are two headers, data
following the second header overwrites the data in the reception buffer.
 The COM port has eight reception buffers. The reception process is continued after the
reception done flag (X0, X1, X2, X3) turns ON. The reception done flag (X0, X1, X2, X3)
does not turn OFF immediately following the execution of GPRECV instruction. It will be
turned off at the beginning of the next scan or later.
 If there are no received data following execution of GPRECV instruction, the reception done
copy flag (X4, X5, X6, X7) turns OFF.

KEY POINTS

 The data without the Code STX at the reception is saved in the reception
buffer, and the “reception done” flag turns on when the end code is received.

9-16
9.5 Sending/Receiving Flag Operation

 However, if the code STX is added in the middle of the data, the data are
saved from the beginning of the reception buffer.

Sending process: Sending done flag and GPSEND instruction are related as follows:
Transmitted a ETX STX c d e ETX
STX b
data

SCU STX STX STX STX STX STX STX STX STX
send buffer a a a a c c c c c
b Transmission pointer b b b d d d d d
ETX ETX ETX ETX e e e e e
ETX ETX ETX ETX ETX

ON

GPSEND
instruction OFF
execution
ON
General-purpose
communication
Sending active flag OFF
Y8, Y9, YA, YB

 Header (STX) and terminator (ETX) are automatically added to the data to be sent. The
data are transmitted to an external device.
 After GPSEND instruction is executed, data transmission is started in several μs to several
tens of ms. For time before transmission is started, please refer to the communication cycle
time (SM208-SM210) using the system monitor function.
 After GPSEND instruction is executed, dual sending to the same port is not possible until the
"sending general-purpose communication flag" (Y8, Y9, YA, YB) turns OFF.
 The "General-purpose communication Sending active flag" (Y8, Y9, YA, YB) turns OFF in
GPSEND instruction execution in the next scan or later following completion of data sending
to an external device. The "General-purpose communication Sending active flag" (Y8, Y9,
YA, YB) always remains on for at least 1 scan time.

9-17
General-Purpose Communication

9-18
4
Troubleshooting
Troubleshooting

10.1 Self-diagnostic Function

10.1.1 CPU Unit’s Operation Monitor LED


The CPU unit has a self-diagnostic function which identifies errors and stops operation if
necessary. Indications concerning self-diagnosis are as follows.
 LED indications concerning self-diagnostic errors
LED indications on the CPU unit
Operation
RUN PROG ERROR ALARM Description
status
Green Green Red Red
● ○ ○ ○ Normal operation Operation
Normal ○ ● ○ ○ PROG. mode Stop
operation
Forcing input/output in RUN
▲ ○ ○ ○ Operation
mode
When a self-diagnostic error
● ○ ▲ ○ Operation
occurs (Operation)
When a self-diagnostic error
○ ● ▲ ○ Stop
occurs (Stop)
Error
System watchdog timer has
○ ●  ● Stop
been activated
Waiting for connection of the
○ ▲  ○ Stop
PHLS slave
(Note) ●: ON, ▲: Flashing, ○: OFF, -: Varies (ON or OFF)

10.1.2 Operation at the Time of Error


Normally, when an error occurs, the operation stops.
 Configuration menu of FPWIN GR7
Operation mode of the CPU unit at the time of error can be set (Continue or Stop) in the "FP7
Configuration" menu of the tool software FPWIN GR7.

REFERENCE

For information on the troubleshooting for the CPU unit, also refer to FP7 CPU Unit
User's Manual (Hardware).

10-2
10.1 Self-diagnostic Function

10.1.3 Serial Communication Unit's Operation Monitor LED


The serial communication unit has a self-diagnostic function which indentifies errors.
Indications concerning self-diagnosis are as follows.
 LED indications concerning self-diagnostic errors
LED Status Status Countermeasures
indication
Parameter setting error or Refer to10.2 What to DO If an Error
ON transmission/reception error Occurs
occurs. (For Each Communication Mode).
Flashing
The factory acceptance test Turn OFF the factory acceptance test
ERROR (Flashing cycle:
switch is ON. switch on the side of the unit.
100 ms)
Flashing
A cassette that cannot be Confirm the type of the cassette, and
(Flashing cycle:
combined is attached. replace it.
500 ms)
ALARM ON Hardware error occurs. Please contact your dealer.

 CPU operation when an error occurs in Serial Communication Unit


 If an alarm or error occurs in the serial communication unit, the CPU unit will stop the
operation. The operation can be changed to "Continue" using the CPU configuration.
 In the programming tool, a message of "Unit alarm (80)" or "Unit error (81)" can be confirmed
on the status display dialog box.

KEY POINTS

 Even if a communication error occurs, the ERROR LED of the serial


communication unit will turn off once communication is completed
normally with other COM ports. For confirming error contents, execute
PMGET instruction and confirm communication parameters or monitor
information.

10-3
Troubleshooting

10.2 What to DO If an Error Occurs


(For Each Communication Mode)

10.2.1 When Using PLC Link Function


 What to do If an error occurs
Situation Contents to check Confirmation method
Check if the communication cassette
Is a communication cassette attached?
is attached firmly.
Are wirings correct? Check the wirings again.
Isn't there any problem in environments such as
Check the shielding.
noise?
Is the unit number of each unit set correctly?
- Are the unit numbers set sequentially and
Communication is not consecutively from 1?
possible. - Isn't there any overlapping unit number?
(For the serial - Isn't any number over 17 used for unit number
communication unit, the - Check the configuration (COM.1
with PMSET instruction? settings) of the CPU with built-in SCU
ERROR LED turns on.)
Isn't there any overlapping transmission area for unit or the serial communication unit.
each unit. - Check the communication
parameters with PMGET instruction.
Is the transmission/reception area of PLC link
(Note)
correct?
Is the maximum unit number used for the PLC
link correct?
Is the communication mode set correctly?
(Note) For checking communication parameters with PMGET instruction, the CPU should be set in the RUN mode.
Set "Mode selection when self-diagnostic error occurs - A unit error occurred." to "Continue operation" in the
CPU configuration.

10.2.2 When Using MEWTOCOL/ MEWTOCOL7/ MODBUS-RTU Function


 What to do if an error occurs
Situation Contents to check Confirmation method
Check if the communication cassette
Is a communication cassette attached?
Communication is not is attached firmly.
possible. Are wirings correct? Check the wirings again.
(For the serial
communication unit, the Isn't there any problem in environments such as
Check the shielding.
ERROR LED turns on.) noise?
Is the communication mode set correctly?
- Check the configuration (COM.1
Are communication condition settings correct? settings) of the CPU with built-in SCU
Are unit numbers set correctly? or the serial communication unit.
Communication is not - Check the communication
possible when SD/RDLED Is the communication mode set correctly? parameters with PMGET instruction.
of communication cassette Is the communication mode set to the same (Note)
is flashing. mode as that of a destination device?
Is the command length for MEWTOCOL or Check the programs of destination
MEWTOCOL-7 within the prescribed length? devices.
(Note) For checking communication parameters with PMGET instruction, the CPU should be set in the RUN mode.
Set "Mode selection when self-diagnostic error occurs - A unit error occurred." to "Continue operation" in the
CPU configuration.

10-4
10.2 What to DO If an Error Occurs
(For Each Communication Mode)

10.2.3 When Using General-purpose Communication Function


 What to do if an error occurs
Situation Contents to check Confirmation method
Check if the communication block is
Is a communication cassette attached?
installed firmly.
Are wirings correct? Check the wirings again.
Communication is not Isn't there any problem in environments such as
Check the shielding.
possible. noise?
(For the serial
communication unit, the ・Check the configuration (COM
ERROR LED turns on.) settings) of the CPU with built-in SCU
or the serial communication unit.
Is the communication mode set correctly?
・Check the communication
parameters with PMGET instruction.
(Note)
Transmission is not
possible.
Does an operation error occur when GPSEND
(For the serial
instruction is executed?
communication unit, the
ERROR LED turns on.) Review the program.

Isn't transmission prohibited by CTS signal (Y14


or Y16) when using a communication cassette
with RS-232C (5-wire type)?
Is the setting for the communication conditions ・Check the configuration (COM
Transmission is not
the same as the one for the device settings) of the CPU with built-in SCU
possible.
communicated? or the serial communication unit.
Is the setting of the method for detecting ・Check the communication
“reception done” the same as the one for the parameters with PMGET instruction.
device communicated? (Note)
Isn't reception error occurring?
Isn't the reception buffer FULL error occurring?
Reception is not possible. ・Check the communication
If the error occurs, the operation cannot be
(For the serial parameters and operation status
restarted without performing channel reset.
communication unit, the monitor information with PMGET
ERROR LED turns on.) Isn't the operation mode set to a mode other instruction. (Note)
than general-purpose communication with
PMSET instruction?
(Note) For checking communication parameters with PMGET instruction, the CPU should be set in the RUN mode.
Set "Mode selection when self-diagnostic error occurs - A unit error occurred." to "Continue operation" in the
CPU configuration.

10-5
Troubleshooting

10.3 Checking Status with PMGET Instruction

10.3.1 Specifications of PMGET Instruction


 Confirmation of error information
 Describe UNITSEL instruction immediately before PMGET instruction, and specify the slot
and port numbers of the unit to be read.
 Specify the type of data to be read (parameter or monitor information) for operand S1 of
PMGET instruction.
 Store 26 words for communication parameters or 7 words for monitor information in the area
starting with the area specified by operand S2 of PMGET instruction.
R100 Communication port settings
UNITSEL U0 U1 S1: Slot number
S2: Port number
S1 S2
SCU parameter acquisition
PMGET U0 DT100 S1: Communication parameter (U0)
S1 S2 or Monitor information (U1)
S2: Storage location

10.3.2 List of Communication Parameters


 Acquisition of SCU communication parameters
Operand Parameter Range Settings
U0 U0: MEWTOCOL-COM
U1 U1: MEWTOCOL7-COM
Communication
[D] U2 U2: MODBUS-RTU
mode
U8 U8: General-purpose communication
U9 U9: PLC link
Unit number: U1 to U999
MEWTOCOL-COM :U1 to U99
[D+1] Unit number setting U1 to 999 MEWTOCOL7-COM:U1 to U999
MODBUS-RTU :U1 to U247
PLC link :U1 to U16 (Default: 0)
U0:300, U1:600, U2:1200, U3:2400, U4:4800,
[D+2] Baud rate setting U0 to 10 U5:9600, U6:19200, U7:38400, U8:57600.,
U9:115200, U10:230400 bps
[D+3] Data length setting U0, U1 U0: 7-bit length, U1: 8-bit length
[D+4] Parity setting U0 to U2 U0: No parity, U1: Odd parity, U2: Even parity
Stop bit length
[D+5] U0 to U1 U0: 1 bit, U1: 2 bits
setting
[D+6] RS/CS (Note 1) U0, U1 U0: Disable, U1: Enable
U0: Immediate
[D+7] Send waiting time U0 to 10000
Effective time = Un x 0.01 ms (0 to 100 ms)
(Continued on the next page)

10-6
10.3 Checking Status with PMGET Instruction

Operand Parameter Range Settings


[D+8] Header STX U0, U1 U0: Disable, U1: Enable
[D+9] Terminator setting U0 to U3 U0: cR, U1: cR+Lf, U2: Time, U3: ETX
U0: For 32 bits
Terminator
[D+10] U0 to 10000 Effective time = Un x 0.01 ms (Effective only when the
judgement time
terminator setting is Time)
U0: Not initialize
[D+11] Modem initialization U0 to U2 U1: Execute the first initialization only. (Note 2)
U2: Re-execute initialization at the time of setting.
[D+12] Reserved area U0 Reserved area
[D+13] Reserved area U0 Reserved area
[D+14] Link area block No. U0, U1 Block number of link relay/link register area
PLC link MEWNET-
[D+15] U2 to 16 Values outside the range are treated as 16.
W0 Max. unit No.
Specification of range of link relays used for
[D+16] Link relay range U0 to 64
communication (Relative values in a specified block)
Specification of range of link registers used for
[D+17] Link register range U0 to 128
communication (Relative values in a specified block)
Starting number for
Starting number for link relay transmission (Specified
[D+18] link relay U0 to 63
number of words, Relative values in a specified block)
transmission
Link relay Link relay transmission size (Specified number of
[D+19] U0 to 64
transmission size words)
Starting number for Starting number for link register transmission
[D+20] link register U0 to 127 (Specified number of words, Relative values in a
transmission specified block)
Link register Link register transmission size (Specified number of
[D+21] U0 to 127
transmission size words)
[D+22] Reserved area U0 Reserved area
[D+23] Reserved area U0 Reserved area
[D+24] Reserved area U0 Reserved area
[D+25] Reserved area U0 Reserved area
(Note 1) RS/CS is selectable only when using a RS-232C cassette (1-ch, 5-wire type).
(Note 2) The modem is initialized at the time of setting (when the power turns on, PMGET instruction is executed, or
switching to the RUN mode). However, only the first initialization is executed. (except the time of repower-on)
(Note 3) The settings of [D+14] to [D+21] are available only when the communication mode for the COM.1 port is PLC
link.

10-7
Troubleshooting

 SCU COM port operation status monitor information


Operand Monitor Range Settings
information
U0 U0: MEWTOCOL-COM
U1 U1: MEWTOCOL7-COM
[D] Operation mode U2 U2: MODBUS-RTU
U8 U8: General-purpose communication
U9 U9: PLC link
U0 U 0:No communication cassette
Communication U232 U 232:RS-232C
[D+1]
cassette detection U422 U 422:RS-422
U485 U 485:RS-485
bit9: Receive buffer FULL
bit8: Receive buffer overflow
Reception error
[D+2] bit2: Parity mismatch
code
bit1: Stop bit undetected (Frame error)
bit0: Receive buffer overrun
No. of occurrences Number of detection of reception errors stored in the low byte of
[D+3]
of reception error reception error code (Unsigned 16-bit cycle)
bit9: Number of transmission data error
bit8: Communication parameter setting error
[D+4] Setting error code
bit0: Mode setting/change error (A mode number that cannot be set or
changed is specified.)
Parameter number which data outside the range is
specified
[D+5] Error parameter No. U 1 to 12
(Effective only when the communication parameter
setting error occurs.)
U 0000 No operation
Modem initialization U 0100 During initialization
[D+6]
status U 0200 Initialization completed
U 02FF Initialization failed

10-8
10.4 Clearing Errors Using User Programs

10.4 Clearing Errors Using User Programs

10.4.1 Clearing Errors Using User Programs


 Each error can be cleared by user programs.
 Refer to error codes, correct error factors, and clears the errors.
 Clearing unit by UCLR instruction
 Executing the dedicated instruction UCLR clears errors occurred in a unit.
Example) Program to clear errors of a unit installed in the slot No.1

R100
( DF ) UCLR U1
Unit clear Slot No.
request

 Resetting communication ports by I/O signals


 Communication ports can be reset by turning on the reset request signals (Y10 to Y13) with
user programs when a communication error occurs.
 The signals (X0 to X13) turns on when the reset is completed. Then, turn off the reset
request signals (Y10 to Y13).
R100 X10 Y10
Reset CH1
( DF )
of COM port
Request to CH1 error Request to
reset an error reset done reset CH1
Y10

Request to
reset CH1

 Allocation of I/O signals


Signal name COM.0 COM.1 COM.2 COM.3 COM.4
Request to reset CH Y12 Y10 Y11 Y12 Y13
Reset done X12 X10 X11 X12 X13
(Note 1): The above I/O numbers are those for the slot number 0 (CPU with built-in SCU) and the COM. 1 port. The
I/O numbers actually used vary according to the slot number where the unit is installed and the starting word
number.

10-9
Troubleshooting

10-10
11
Specifications
Specifications

11.1 Communication Function Specifications

11.1.1 CPU Unit Communication Specifications


 USB port (for tool software)
Items Description
Standard USB2.0 FULL SPEED
Communication function MEWTOCOL-COM (slave), MEWTOCOL7-COM (slave)

 COM0 Port
Items Description
Interface 3-wire 1-channel RS-232C
Transmission distance 15 m (Note 1)
Baud rate 300, 600,1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400 bit / s
Communication method Half-duplex transmission
Synchronous method Start stop synchronous system
Data length: 7 bits / 8 bits, stop bit: 1 bit / 2 bits, parity: Yes / No (Odd / Even)
Communication format
Start code: Without STX / With STX, end code: CR / CR + LF / None / ETX
Data transmission order Transmits from bit 0 character by character.
MEWTOCOL-COM (master/slave), MEWTOCOL7-COM (slave)
MODBUS RTU (master/slave)
Communication function
general-purpose communication
modem initialization
(Note 1) When communication is performed at a baud rate of 38400 bps or higher, use the cable not longer than 3 m.
For wiring the RS-232C, a shielded wire must be used to increase noise suppression.

11-2
11.1 Communication Function Specifications

 LAN port
Items Description
Interface 100BASE-TX / 10BASE-T
Baud rate 100 Mbps, 10 Mbps auto-negotiation (Note 1)
Transmission system Baseband
Max. segment length 100 m (Note 2)
Communication cable UTP (Category 5)
Max. distance between 100BASE-TX: 2 segments
nodes 10BASE-T: 5 segments
No. of nodes 254 units

Number of simultaneous User connections: 16


connections System connections: 4 (Note 3)
Communication protocol TCP/IP, UDP/IP
DNS Supports name server
DHCP Automatic getting of IP address
FTP server File transmission, server function, No. of users: 3
SNTP Time synch function
MEWTOCOL-DAT (master/slave)
MEWTOCOL-COM (master/slave)
Communication function MEWTOCOL7-COM (slave)
MODBUS TCP (master/slave)
General-purpose communication (16 kB / 1 connection)
(Note 1) Switching between different speeds is done automatically by auto negotiation function.
(Note 2) The standards cite 100 m as the maximum, but noise resistance measures such as attaching a ferrite core
may be necessary in some cases, depending on the usage environment. Also, it is recommended to position a
hub near the control board, and limit the length within 10 m
(Note 3) Used when connecting tool software via LAN.

11-3
Specifications

11.1.2 Extension Cassette Communication Specifications


 COM1 Port / COM2 Port
Description
Items
AFP7CCS1 AFP7CCS2 AFP7CCM1 AFP7CCM2 AFP7CCS1M1
3-wire 3-wire 1-channel
3-wire 2-channel RS-232C
1-channel 2-channel
Interface 1-channel RS-232C RS-422/RS485 RS-422/RS485 1-channel
RS-232C
(Note 1) (Note 2) (Note 3) (Note 2) (Note 3) RS485 (Note 3)
RS-232C:
When RS-422 is used: Max. 400 m Max. 15 m
Transmission distance Max. 15 m (Note 4) When RS-485 is used: Max. 1200 m RS-485:
(Note 5) (Note 6) Max. 1200 m
(Note 5) (Note 6)
Baud rate 300, 600,1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400 bit/s
Communication method Half-duplex transmission (Note 7)
Synchronous method Start stop synchronous system
Data length: 7 bits / 8 bits, stop bit: 1 bit / 2 bits, parity: Yes / No (Odd / Even)
Communication format
Start code: Without STX / With STX, end code: CR / CR + LF / None / ETX
Data transmission order Transmits from bit 0 character by character.
PLC link: Max. 16 units
Communication MEWTOCOL-COM (master/slave), MEWTOCOL7-COM (slave): Max. 99 units
functions and
MODBUS RTU (master/slave): Max. 99 units
No. of units that can be
connected General-purpose communication: Max. 99 units
Modem initialization
(Note 1) By switching on the dip switch on the cassette, you can use the unit as 5-wire 1-channel RS-232C.
(Note 2) By switching on the dip switch on the cassette, you can switch between RS-422 and RS-485.
(Note 3) When connecting a commercially available device that has an RS485/RS-422 interface, please confirm
operation using the actual device. In some cases, the number of units, transmission distance, and baud rate
vary depending on the connected device.
(Note 4) When communication is performed at a baud rate of 38400 bps or higher, use the cable not longer than 3 m.
For wiring the RS-232C, a shielded wire must be used to increase noise suppression.
(Note 5) The transmission distance is limited by the specified baud rate and No. of connected units in the RS-485
setting. When using a baud rate of 38400 bps or less, the allowable settings are a maximum of 1200 m and 99
units. When a C-NET adapter is mixed, the maximum number of connected units is 32, and the baud rate is
limited to 19200 bps or less.

(Note 6) The converter SI-35 manufactured by Lineeye Co., Ltd is recommendable for the RS485 at the computer side.
(Note 7) In general-purpose communication, RS-232C and RS-422 use full-duplex transmission.

11-4
11.2 MEWTOCOL-COM Format

11.2 MEWTOCOL-COM Format

11.2.1 MEWTOCOL-COM Command Format


 Command message

(1) Header (start code)


Commands must always have a “%” (ASCII code: H25) or a “<” (ASCII code: H3C) at the
beginning of a message.
(2) Station no.
 The station no. of the PLC to which you want to send the command must be specified. The
station no. of the PLC is specified by the system register. In the case of the FP7 CPU unit,
the station no. is specified in the FPWIN GR7 configuration menu.
 In 1:1 communication, specify "01" (ASCII code: H3031) or "EE" (ASCII code: H4545).
(3) Text
The content of this varies depending on the type of command. The content should be noted in
all upper-case characters, following the fixed formula.
(4) Check code
 This is a BCC (block check code) for error detection using horizontal parity. The BCC should
be created so that it targets all of the text data from the header to the last text character.
 The BCC starts from the header and checks each character in sequence, using the
exclusive OR operation, and replaces the final result with ASCII code. It is normally part of
the calculation program and is created automatically.
 By entering "**" (ASCII code: H2A2A) instead of BCC, you can omit BCC.
(5) Terminator (end code)
Messages must always end with a “CR” (ASCII code: H0D).

11-5
Specifications

NOTES

 The method for writing text segments in the message varies depending on
the type of command.
 When the message to be sent contains a large number of characters, send
the command divided in several times.
 When the message contains a large number of characters, the response is
sent divided in several times.

KEY POINTS

 An expansion header “<” is supported to send and receive single frames of


up to 2048 characters as well as general “%”.
Type of No. of characters that can be
header sent in 1 frame
% Max. 118 characters
< Max. 2048 characters

11-6
11.2 MEWTOCOL-COM Format

11.2.2 MEWTOCOL-COM Response Format


 Response message
After PLC receives a command, it returns the processing result.

(1) Header (start code)


 A “%” (ASCII code: H25) or “<” (ASCII code: H3C) must be at the beginning of a message.
 The response must start with the same header that was at the beginning of the command.
(2) Station no.
This is the station no. of the PLC that processed the command.
(3) Text
The content of this varies depending on the type of command. If the processing is not
completed successfully, an error code will be stored here, so that the content of the error can
be checked.
(4) Check code
 This is a BCC (block check code) for error detection using horizontal parity.
 The BCC starts from the header and checks each character in sequence, using the
exclusive OR operation, and converts the final result.
(5) Terminator (end code)
The message should end with "CR" (ASCII code: H0D).

11-7
Specifications

NOTES

 If no response is returned, the communication format may not be correct, or


the command may not have arrived at the PLC, or the PLC may not be
functioning. Check to make sure all of the communication specifications
(e.g. baud rate, data length, and parity) match.
 If the response contains an “!” instead of a “$”, the command was not
processed successfully. The response will contain a communication error
code. Check the meaning of the error code.
 Station no. and command name are always identical in a command and its
corresponding response (see below). This makes the correspondence
between a command and a response clear.

11-8
11.3 MEWTOCOL7-COM Format

11.3 MEWTOCOL7-COM Format

11.3.1 MEWTOCOL7-COM Command Format


 Command message
(1) Header (start code)
(3) Frame No.
(2) Station no. of the receiver
(4) Text (to be specified in accordance with the type of command)

> @ E E E 0 0 # 0 0 M M R D

Command name
Command code value
Command ID code

* * * * CR

(5) Check code (16bit CRC (CCITT) ) (6) Terminator (end code)

(1) Header (start code)


A “>” (ASCII code: H3E) must be at the beginning of a message.
(2) Station no.
 The station no. of the receiving PLC to which you want to send the command must be
specified with "@ and three digits". The station no. of the PLC is specified by the system
register. In the case of the FP7 CPU unit, the station no. is specified in the FPWIN GR7
configuration menu.
 In 1:1 communication, specify "001" (ASCII code: H303031) or "EEE" (ASCII code:
H45H4545).
(3) Frame No.
This indicates the sending frame No. Make sure to use consecutive frame numbers.
E.g. Commands for multiple frames
>@EEE00#00MMRDD001G0DT0000000001000****CR
>@EEE01****& CR
* Make sure to use consecutive values for frame numbers. The usable number range is
from 00 to FF. After FF, return to 00.
(4) Text
The content of this varies depending on the type of command. The content should be noted in
all upper-case characters, following the fixed formula for the particular command.

11-9
Specifications

(5) Check code


 This is a CRC (Cyclic Redundancy Check) to detect errors using a generating polynomial of
hamming codes.
 This should be created so that it targets all of the text data from the header to the last text
character.
 CRC is a value given by replacing the result of calculation by CRC-16-CCITT with ASCII
code. It is normally part of the calculation program and is created automatically.
(6) Terminator (end code)
Messages must always end with a “CR” (ASCII code: H0D).

KEY POINTS

 The method for writing text segments in the message varies depending on
the type of command.
 When the message to be sent contains a large number of characters, send
the command divided in several times.
 When the message contains a large number of characters, the response is
sent divided in several times.
 In MEWTOCOL7 command, up to 4096 characters can be sent/received in a
single frame.
Type of header No. of characters that can be sent
in 1 frame
> Max. 4096 characters

11-10
11.3 MEWTOCOL7-COM Format

11.3.2 MEWTOCOL7 Response Format


 Response message
(1) Header (start code)
(2) Station no. of the receiver
(3) Frame No. (4) Text (to be specified in accordance
with the type of command)

> @ E E E 0 0 $ 0 0 M M R D

Command name (data area read)


Command code value
Response code (normal status: $, abnormal status: !)

CR

Data (normal status: read data, abnormal (6)


status: error code) (5) Check code Terminator
(16bit CRC (CCITT) ) (end code)

(1) Header (start code)


 A “>” (ASCII code: H3E) must be at the beginning of a message.
 The response must start with the same header (start code).
(2) Station no.
This is the station no. of the PLC that processed the command.
(3) Frame No.
This is the frame number where the command was processed.
(4) Text
The content of this varies depending on the type of command. If the processing is not
completed successfully, an error code will be stored here, so that the content of the error can
be checked.

11-11
Specifications

(5) Check code


 This is a CRC (Cyclic Redundancy Check) to detect errors using a generating polynomial of
hamming codes.
 This should be created so that it targets all of the text data from the header to the last text
character.
 CRC is a value given by replacing the result of calculation by CRC-16-CCITT with ASCII
code. It is normally part of the calculation program and is created automatically.
(6) Terminator (end code)
The message should end with "CR" (ASCII code: H0D).

NOTES

 If no response is returned, the communication format may not be correct, or


the command may not have arrived at the PLC, or the PLC may not be
functioning. Check to make sure all of the communication specifications
(e.g. baud rate, data length, and parity) match between the computer and
the PLC.
 If the response contains an “!” instead of a “$”, the command was not
processed successfully. The response will contain a communication error
code. Check the meaning of the error code.
 Station no. and command name are always identical in a command and its
corresponding response (see below). This makes the correspondence
between a command and a response clear.

Command > @ E E E 0 0 # 0 0 M M R D CR

Same Same Same

Response > @ E E E 0 0 $ 0 0 M M R D CR

11-12
11.4 MODBUS RTU Format

11.4 MODBUS RTU Format

11.4.1 MODBUS RTU Command Format


 MODBUS RTU command format
START ADDRESS FUNCTION DATA CRC CHECK END
3.5-character 8 bits 8 bits n*8 bits 16 bits 3.5-character
time time

ADDRESS 8 bits, 0 to 247 (decimal)


(station no.) (Note) 0 = Broadcast address
FUNCTION 8 bits
DATA Varies depending on commands.
CRC 16 bits
END 3.5-character time
(Differs depending on baud rate. Refer to the "reception judgment time" section.)

 Reception judgment time


The process for receiving a message completes when the time that is exceeding the time mentioned below has
passed after the final data was received. Reception done judgment time is set at approx. 32 bits of time.
Baud rate Reception done
judgment time
300 Approx. 106.7 ms
600 Approx. 53.3 ms
1200 Approx. 26.7 ms
2400 Approx. 13.3 ms
4800 Approx. 6.7 ms
9600 Approx. 3.3 ms
19200 Approx. 1.7 ms
38400 Approx. 0.8 ms
57600 Approx. 0.6 ms
115200 Approx. 0.3 ms
230400 Approx. 0.14 ms

11-13
Specifications

11.4.2 MODBUS RTU Response Format


 Response in normal status
 The same message as a command is returned and for a loop back test.
 A part of a command message (6 bytes from the beginning) is returned for multiple write
command.
 Response in abnormal status
In case a parameter disabled to be processed is found in a command (except transmission
error)
Slave address (station no.) Either 1, 2 or 3
Function code + 80H
Error code
CRC

 Error code contents


1. Function code abnormality
2. Device No. abnormality (out of range)
3. No. of devices abnormality (out of range)

11-14
Record of changes
Manual No. Date Record of Changes

WUME-FP7COM-01 Mar.2013 1st Edition

WUME-FP7COM-02 Dec.2013 2nd Edition

- Added new model


Serial Communication Unit AFP7NSC
- Change of Manual name

You might also like