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 generat ion.
-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
Industrial Devices SUNX Co., Ltd.
-Windows is a registered trademark of Microsoft Corporation in th e United States and other
countries.
-All other company names and product names are trademarks or registered trademarks of
their respective owners.
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.
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 UnitFP7 High-speed counter Unit Users ManualWUME-FP7HSC
FP7 Pulse Output Unit FP7 Pulse Output Unit Users Manual
FP7 Positioning Unit FP7 Positioning Unit Users Manual WUME-FP7POSP
FP7 Serial Communication
Unit
PHLS System PHLS System Users Manual WUME-PHLS
Programming Software
FPWIN GR7
Manual name Manual code
FP7 CPU Unit Users Manual (Hardware) WUME-FP7CPUH
FP7 CPU Unit Command Reference Manual WUME-FP7CPUPGR
FP7 CPU Unit Users Manual
(Logging Trace Function)
FP7 CPU Unit Users Manual (Security Function) WUME-FP7CPUSEC
FP7 CPU Unit Users Manual
(LAN Port Communication)
FP7 series Users Manual (SCU communication) WUME-FP7COM
FP7 series Users Manual (Communication
cassette Ethernet type)
FP7 Analog Cassette Users Manual
FP7 series Users Manual (SCU communication) WUME-FP7COM
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.
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)
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. Me ssages in accordance wit h the protocol are
automatically generated by PLC. In the user program, read ing and writin g can be done simply by
specifying the station no. an d memory a ddress an d executi ng SE ND/RECV instru ction s.
Slave communication is performed when the computer or display connected to PLC has th e
sending right, and sends commands, and PLC returns responses. In slave communication, PLC
responds automatically, so no program concerning com mu nic ation i s necessary on the P LC 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 MEWTOCO L.
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 MEWT OCOL-COM
master communication.
Programmable displays made by various manufacturers
1-5
Functions of Units and Restrictions on Combination
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 t he 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 comm unication 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.
General-purpose communication is used when PLC executes communication in accordan ce
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.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
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.
CPU with built-in SCU (COM.1 port to COM. 2 port)
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.
CPU with built-in SCU (COM.1 port to COM. 2 port)
Serial communication unit (COM.1 port to COM.4 port)
CPU with built-in ET-LAN
(System connections 1 to 4 / User connections 1 to 16)
There is no restriction.
1.3.4 Unit to be Used and Applicable Versions o f CPU Unit and FPWIN GR 7
For using the unit, the following versions of CPU unit and FPWINGR7 are required.
Unit type
FP7 Serial Communication Unit Ver.1.2 or later Ver.1.3 or later
Including other units, the consumption current should be within the allowable capacity of a
power supply unit.
Unit's consumption current table (24 V)
Product name Model number
196k steps, Built-in Ethernet
function
CPU Unit
When attaching
Extension Cassette
(Communication
Cassette) to CPU
Unit
(Note 1) (Note 2)
Serial Communication Unit AFP7NSC 50 mA or less
When attaching
Extension Cassette
(Communication
Cassette) to Serial
Communication Unit
(Note 1) (Note 2)
(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).
120k steps, Built-in Ethernet
function
120k steps, No Ethernet function AFP7CPS3 200 mA or less
RS-232C x 1ch AFP7CCS1 35 mA or less
RS-232C x 2ch AFP7CCS2 60 mA or less
RS-422 / 485 x 1ch AFP7CCM1 60 mA or less
RS-422 / 485 x 2h AFP7CCM2 90 mA or less
RS-232C x 1ch
RS-422 / 485 x 1ch
Ethernet AFP7CCET 35 mA or less
RS-232C x 1ch AFP7CCS1 20 mA or less
RS-232C x 2ch AFP7CCS2 40 mA or less
RS-422 / 485 x 1ch AFP7CCM1 30 mA or less
RS-422 / 485 x 2h AFP7CCM2 60 mA or less
RS-232C x 1ch
RS-422 / 485 x 1ch
AFP7CPS4E 200 mA or less
AFP7CPS3E 200 mA or less
AFP7CCS1M1 70 mA or less
AFP7CCS1M1 50 mA or less
Consumption
current (mA)
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
(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.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
Display
- Blue Lights when the power supply of the CPU unit is on.
ERROR Red
ALARM Red Lights when an error occurs in hardware.
LED
color
Description
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)
Flashes when an extension cassette that cannot be used is installed. (Flashing
cycle: 500 ms)
(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.
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
AWG #28 to 16 0.08 mm2 to 1.25 mm2
Pole terminal with a compatible insulation sleeve
If a pole terminal is being used, the following models should be used.
Part no.
With insulating
sleeve
Without insulating
sleeve
Manufacturer
Phoenix Contact
Crosssectional
area
0.25 mm2 AWG #24 AI 0.25-6 BU A 0.25-7
0.34 mm2 AWG #22 AI 0.34-6 TQ A 0.34-7
0.50 mm2 AWG #20 AI 0.5-6 WH A 0.5-6
0.75 mm2 AWG #18 AI 0.75-6 GY A 0.75-6
1.00 mm
Size
2
AWG #18 - A 1-6
Pressure welding tool for pole terminals
Manufacturer
Phoenix Contact
Model no.
Part no. Product no.
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.
Suitable wires (strand wire): For RS-232C / RS-422 communication
Conductor Insulator
Classifi-
cation
Cross-sectional
view
Size
Resistance
value
(at 20°C)
Material
Thick-
ness
Cable
diam.
Sample
appropriate
cable
Shielded
multi-core
cable
Shield
Conductor
Cover
Insulator
0.3 mm2
(AWG22)
or larger
Max.
58.8 Ω/km
Vinyl
chloride
Max.
0.3 mm
Suitable wires (strand wire): For RS-485 communication
Conductor Insulator
Classifi0c
ation
Cross-sectional
view
Size
Resistance
value
Material
Thick-
ness
(at 20°C)
2
Max.
16.8 Ω/km
Max.
33.4 Ω/km
2
Max.
25.1 Ω/km
Polyethylene
Polyethylene
Polychlorinated
biphenyl
Max.
0.5 mm
Max.
0.5 mm
Max.
0.6 mm
Shielded
twisted
pair
VCTF
Shield
Conductor
Conductor
NOTES
1.25 mm
(AWG16)
Cover
or larger
Insulator
0.5 mm2
(AWG20)
or larger
Cover
0.75 mm
(AWG18)
Insu
lator
or larger
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.
Approx.
6.6 mm
Cable
diam.
Approx.
8.5 mm
Approx.
7.8 mm
Approx.
6.6 mm
Onamba Co. Ltd.
ONB-D6 × 0.3 mm
2
Sample
appropriate
cable
Hitachi Cable, Ltd.
KPEV-S1.25 mm
1P
Belden Inc., 9860
Hitachi Cable, Ltd.
KPEV-S0.5 mm
1P
Belden Inc., 9207
(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 wire s.
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.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.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
1 CH1 SD+ / S Transmission line (+) 2 RD- / S Transmission line (-) 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.
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.
1 CH1 SD + / S Transmission line (+) 2 RD - / S Transmission line (-) 3 485 + / R Transmission line (+) 4 422 - / R Transmission line (-) 5 - - - - 6 CH2 SD + / S Transmission line (+) 7 RD - / S Transmission line (-) 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.
LED part
Symbol
Terminal
part
Symbol
Functions that can
be allocated
Signal
direction
Ports that can
be allocated
in the software
COM.1
COM.2
3-16
3.4 Wiring for Communication Cassettes COM.1 to COM.4 Ports
1 CH1 SD + / S Sent Data (+)
2 RD - / S Sent Data (-)
3 485 + / R Received Data (+) PLC ← External device
4 422 - / R Received Data (-) PLC ← External device
5 - - - - 6 CH2 SD + / S Sent Data (+)
7 RD - / S Sent Data (-)
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.
LED part
Symbol
Terminal
part
Symbol
Functions that
can be allocated
Signal direction
PLC → External device
PLC → External device
PLC → External device
PLC → External device
Ports that can be
allocated
in the software
COM.1
COM.2
Example of wiring (in the setting of RS-422)
AFP7CCM2
No.
5
Terminal
part symbol
-
Signal name
Sent Data 1 (+)
Sent Data 1 (-)
Received Data 1 (+)
Received Data 1 (-)
Received Data 2 (-)
Functions
SD (+)+ / S1
SD (-)-/ S2
RD (+)+ / R3
RD (-)-/ R4
SD (+)Sent Data 2 (+)+ / S6
SD (-)Sent Data 2 (-)-/ S7
RD (+)Received Data 2 (+)+ / R8
RD (-)-/ R9
Terminal
Terminal
RD (+)
RD (-)
SD (+)
SD (-)
Terminal
RD (+)
RD (-)
SD (+)
SD (-)
Partner 1
Signal name
Received Data (+)
Received Data (-)
Sent Data (+)
Sent Data (-)
Partner 2
Signal name
Received Data (+)
Received Data (-)
Sent Data (+)
Sent Data (-)
3-18
3.4 Wiring for Communication Cassettes COM.1 to COM.4 Ports
Settings for termination resistance selector switch
A termination resistance selector switch is locate d on the RS-485 side of the surface of
Communication Cassette AFP7CCS1M1. Turn ON the switch only when it is the end unit.
Terminal
no.
1 CH1 SD + Transmission line (+) 2 RD - Transmission line (-)3
4
5 - 6
7 CH2 SD SD Sent data 8 RD RD Received data 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.
XC For COM.1 Port
XD For COM.2 Port
XE For COM.0 Port
XF - Not used Do not use this.
X10 For COM.1 Port
X11 For COM.2 Port
X12 For COM.0 Port
X13
X14 For COM.1 Port
X15
- X1F
(Note 1) The general-purpose communication reception done (copy) flag is effective after the execution of the RECV
Communication
port
- Not used Do not use this.
- Not used Do not use this.
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
Name Description
Generalpurpose
communication
Reception
done flag
Generalpurpose
communication
Reception
done (copy)
flag
Generalpurpose
communication
Clear to send
flag
Master
communication
Clear to send
flag
Reset done
CTS signal
monitor
When the unit completes the data reception,
it turns on (1).
Waiting for data reception: 0, Reception
completed: 1
It turns on (1) if there are copied data when
GPRECV instruction is executed. It turns off
(0) when END instruction is executed.
(Note 1)
Reading completed: 1
No data to be read: 0
It turns on (1) when the unit is set to the
general-purpose communication mode. It
turns off (0) in other modes.
It turns on (1) when the unit is set to modes
other than the PLC link mode or generalpurpose communication mode. It turns off (0)
in other modes.
When the communication channel is reset
under the output Y10 - Y12, the flag is
turned on (1) once the resetting operation is
completed.
Resetting done: 1
Y10 - Y12 is off: 0
Status of the CTS signal sent from the
device communicating with.
Clear to send from COM.1 port = 0
Cannot send from COM.1 port = 1
The RTS signal can be controlled with Y14.
Effective
operation
mode
Generalpurpose
communication
Generalpurpose
communication
Generalpurpose
communication
MEWTOCOL
MODBUS-RTU
Generalpurpose
communication
When RS/CS is
set to valid in
Communication
Block COM.1.
(Note 1) When transmission is completed within one scan, it turns off when the GPSEND instruction is executed in
Communication
port
- Undefined
- Undefined
the subsequent scan.
Name Description
Sending done
result
Generalpurpose
communication
Sending active
flag
Master
communication
Sending active
flag
Request to
reset CH
Output RTS
signal
Reports the results of sending in master
communication or general-purpose
communication.
Normal completion: 0, Abnormal completion:
1
Do not turn on "undefined". (Default setting is
0.)
It turns on (1) during sending in the general-
purpose communication mode.
(Note 1)
Sending done: 0, Sending: 1
Do not turn on "undefined". (Default setting is
0.)
It turns on (1) during sending in the master
communication mode.
Sending done: 0, Sending: 1
Do not turn on "undefined". (Default setting is
0.)
By turning on (1) Y10 - Y12, the
communication channel can be reset.
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
when this signal rises.
This function can be used to delete
unnecessary received data or to clear errors
before starting normal reception.
1:Sending canceled
2:Reception canceled
3:Re-set communication parameters
4:Clear error information (only for errors that
can be cleared)
Do not turn on "undefined". (Default setting is
0.)
By turning on (1) this output, RTS is
controlled.
Transmission from the device communicating
with is permitted = 0
Transmission from the device communicating
with is prohibited = 1
Monitor the CTS signal from the device
communicating with using X14.
Do not turn on "undefined". (Default setting is
0.)
Effective
operation
mode
MEWTOCOL
MODBUS-RTU
Generalpurpose
communication
Generalpurpose
communication
MEWTOCOL
MODBUS-RTU
Generalpurpose
communication
When RS/CS is
set to valid in
Communication
Cassette
COM.1
-
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.1.2 I/O Allocation of Serial Commun ication Unit
Input signal
Input
signal
X0 For COM.1 Port
X1 For COM.2 Port
X2 For COM.3 Port
X3 For COM.4 Port
X4 For COM.1 Port
X5 For COM.2 Port
X6 For COM.3 Port
X7 For COM.4 Port
X8 For COM.1 Port
X9 For COM.2 Port
XA For COM.3 Port
XB For COM.4 Port
XC For COM.1 Port
XD For COM.2 Port
XE For COM.3 Port
XF For COM.4 Port
X10 For COM.1 Port
X11 For COM.2 Port
X12 For COM.3 Port
X13
X14 For COM.1 Port
X16 For COM.3 Port
X15,
X17
- X1F
(Note 1) The general-purpose communication reception done (copy) flag is effective after the execution of the RECV
(Note 2): The I/O numbers actually allocated are the numbers based on the starting word number allocated to the unit.
Communication
port
For COM.4 Port
- Not used Do not use this.
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
Example) When the starting word number for the unit is "10", the general-purpose communication reception
done flag for COM.1 port is X100.
Name Description
Generalpurpose
communication
Reception
done flag
Generalpurpose
communication
Reception
done (copy)
flag
Generalpurpose
communication
Clear to send
flag
Master
communication
Clear to send
flag
Reset done
CTS signal
monitor
When the unit completes the data reception,
it turns on (1).
Waiting for data reception: 0, Reception
completed: 1
It turns on (1) if there are copied data when
GPRECV instruction is executed. It turns off
(0) when END instruction is executed.
(Note 1)
Reading completed: 1
No data to be read: 0
It turns on (1) when the unit is set to the
general-purpose communication mode. It
turns off (0) in other modes.
It turns on (1) when the unit is set to modes
other than the PLC link mode or generalpurpose communication mode. It turns off (0)
in other modes.
When the communication channel is reset
under the output Y10 - Y13, the flag is
turned on (1) once the resetting operation is
completed.
Resetting done: 1
Y10 - Y12 is off: 0
Status of the CTS signal sent from the
device communicating with.
Clear to send from COM.1/COM.3 port = 0
Cannot send from COM.1/COM.3 port = 1
The RTS signal can be controlled with
Y14/Y16.
Effective
operation
mode
Generalpurpose
communication
Generalpurpose
communication
Generalpurpose
communication
MEWTOCOL
MODBUS-RTU
Generalpurpose
communication
When RS/CS is
set to valid in
Communication
Cassette
COM.1/COM.3
Y0 For COM.1 Port
Y1 For COM.2 Port
Y2 For COM.3 Port
Y3 For COM.4 Port
Y4
- Y7
Y8 For COM.1 Port
Y9 For COM.2 Port
YA For COM.3 Port
YB For COM.4 Port
YC For COM.1 Port
YD For COM.2 Port
YE For COM.3 Port
YF For COM.4 Port
Y10 For COM.1 Port
Y11 For COM.2 Port
Y12 For COM.3 Port
Y13 For COM.4 Port
Y14 For COM.1 Port
Y16 For COM.3 Port
Y15
Y17
- Y1F
(Note 1) When transmission is completed within one scan, it turns off when the GPSEND instruction is executed in
(Note 2): The I/O numbers actually allocated are the numbers based on the starting word number allocated to the unit.
Communication
port
- Undefined
- Undefined
the subsequent scan.
Example) When the starting word number for the unit is "10", the sending done result flag for COM.1 port is
Y100.
Name Description
Reports the results of sending in master
Sending done
result
Generalpurpose
communication
Sending active
flag
Master
communication
Sending active
flag
Request to
reset CH
Output RTS
signal
communication or general-purpose
communication.
Normal completion: 0, Abnormal completion:
1
Do not turn on "undefined". (Default setting is
0.)
It turns on (1) during sending in the general-
purpose communication mode.
(Note 1)
Sending done: 0, Sending: 1
It turns on (1) during sending in the master
communication mode.
Sending done: 0, Sending: 1
By turning on (1) Y10 - Y13, the
communication channel can be reset.
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 - X13, return to
OFF (0). The reset is performed only once
when this signal rises. This function can be
used to delete unnecessary received data or
to clear errors before starting normal
reception.
1:Sending canceled
2:Reception canceled
3:Re-set communication parameters
4:Clear error information (only for errors that
can be cleared)
By turning on (1) this output, RTS is
controlled.
Transmission from the device communicating
with is permitted = 0
Transmission from the device communicating
with is prohibited = 1
Monitors the CTS signal from the device
communicating with using X14/X16.
Do not turn on "undefined". (Default setting is
0.)
Effective
operation
mode
MEWTOCOL
MODBUS-RTU
Generalpurpose
communication
Generalpurpose
communication
MEWTOCOL
MODBUS-RTU
Generalpurpose
communication
When RS/CS is
set to valid in
Communication
Cassette
COM.1/COM.3
-
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)
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
PLCPLCPLCPLC
RS485
R0
F0, MV, K10 0 , LD0
No.1 Link register
LD 0100
No.2 Link register
LD 0100LD 0100LD 0100
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.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.
Communication mode PLC link
Station no. 1 - 16
Baud rate 115200 bps
Data length 8 bit
Parity Odd
Stop bit 1 bit
RS/CS Invalid
Send waiting time 0
Start code STX Invalid
Terminator setting CR
Terminator judgment time0
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
link registers to be used
Maximum station no. to be used for 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
Size of link relay send area 0 to 64 words
Starting No. for link register send area 0 to 127
Size of link register send area 0 to 127 words
Settings when the PLC link
function is used
0 or 1
0 to 16
Remark
Set a specific station no. for PLC to be
connected to the PLC link.
Regardless of settings in FPWIN GR7,
the FP7 CPU unit itself performs automatic
settings.
Specify the device No. range for link relays
and link registers to be used in a block.
Set the Max. station no. for PLC to be
connected to the PLC link.
Specify the device No. range for link relays
and link registers to be used.
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.
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,
Set the same value for the Max. station no. for all PLCs connected to the
with no breaks between them. If there is a missing station no., the
transmission time will be longer.
6.3.3 Memory Block Numbers for Link Relays and Link Regist ers 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 U se 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.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 items
Memory block numbers for link
relays and link registers to be
used
Maximum station no. to be used
for PLC link
Range of link relays used
Starting no. for link relay send
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 items
Memory block numbers for link
relays and link registers to be used
Maximum station no. to be used for
PLC link
Range of link registers used for
PLC link
Starting No. for link register send
area
Size of link register send area
Setting
range
0 or 1
0 to 16
0 to 128
words
0 to 127
0 to 127
words
Station no. and setting method
No.1 No.2 No.3 No.4
0 0 0 0
4 4 4 4
128 128 128 128
0 40 80 0
40 40 48 0
NOTES
If a mistake is made when allocating a link area, be aware that an error will
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
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
formula
Ts = Scan time + Tpc (PLC link sending time)
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
formula
Tlt = Ttx (sending time per byte) x Ltm (link table sending size)
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)
Calculation
formula
When there is no station that is yet to be added to the link, Tlk = 0
Tlk = Tlc (link addition command sending time) + Twt (addition waiting time)
+ 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
7.2 List of MEWTOCOL / MEWTOCOL7 Supporting Commands
7.2.1 List of MEWTOCOL C ommands
Commands to be used
Type of instruction Code Description
RC Reads ON/OFF status of contact.
Read contact area
Write contact area
Read data area RD Reads the contents of a data area.
Write data area WD Writes data to a data area.
Register or Reset
contacts monitored
Register or Reset
data monitored
Monitoring start MG Monitors a registered contact or data using MC and MD.
Preset contact area
(fill command)
Preset data area
(fill command)
Read the status of PLC RT
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.
(RCS) - Specifies only one point.
(RCP) - Specifies multiple contacts.
(RCC) - Specifies a range in word units.
WC Turns ON or OFF the contact.
(WCS) - Specifies only one point.
(WCP) - Specifies multiple contacts.
(WCC) - Specifies a range in word units.
MC Registers the contact to be monitored.
MD Registers the data to be monitored.
SC Embeds the area of a specified range in a 16-point on/off pattern.
SD Writes the same contents to the data area of a specified range.
Reads the specifications of the programmable controller and error
codes if an error occurs.
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
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.
PLC
DT100100
DT1010
・・・・・・・・・・・・・・
・・・・・・・・・・・・・・
Command message
%01#RD0040000401 (BCC) C
%01$RD64000000 (BCC) C
R
R
External device sup por ting
MEWTOCOL-COM
DT00400 100
DT00401 0
・・・・・・・・・・・・・・
・・・・・・・・・・・・・・
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
R100
DF
()
XCYC
Master
communication
Clear to send flag
Master
communication
Sending active flag
R100
Execute
RECV
UNITSELU0U1
S1S2
RECV.USDT0U2DT100U1DT400
S1S2nD1D2
(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.
Starting conditions for RECV
execution
Clear to send flag: ON
Sending active flag: OFF
Settings for communication port
S1: Slot 0
S2: COM1
RECV processing
S1: Partner station no. (U1)
S2: Data address (DT400)
n: No. of data (U2)
D1: Data saving area (DT100)
D2: Execution result code (DT 0)
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
S2
n Specify the No. of sent data. (Note 3)
D1
D2
(Note 1) Transmission methods vary by the type of device to be specified for the operands [S2] and [D1].
(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
Specify the device initial address of the source node data area in the partner
node. (Note 1)( Note 2)
Specify the device initial address of the receiver node data area in the source
node. (Note1)
Specify the device area in the source node to save the execution result code
(one word). (Note 4)
Device to be specified for [S2] and [D1]
0 - 99999
1 - 509 words
or 1 bit
(Note1)
-
Transmission
method
16 bit device: WX, WY, WR, WL, DT, LD
1 bit device: X; Y; R; L; DT,n; LD, Bit transmission
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.
PLC
DT100100
DT1010
・・・・・・・・・・・・・・
・・・・・・・・・・・・・・
Command message
%01#WDD004000040164000000 (BCC) C
%01$WD (BCC) C
R
External device sup por ting
MEWTOCOL-COM
R
DT00400 100
DT00401 0
・・・・・・・・・・・・・・
・・・・・・・・・・・・・・
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
DF
()
R100
(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.
XCYC
Master
communication
Clear to send flag
Master
communication
Sending active flag
UNITSELU0U1
SEND.USDT0U1DT400DT100U2
S1nD1D2D3
R100
Execute
SEND
S1S2
SEND execution condition
Clear to send flag: ON
Sending active flag: OFF
Settings for communication port
S1: Slot 0 (U0)
S2: COM1 (U1)
SEND process
S: Data saving area (DT100)
n: No. of sent data (U2)
D1: Area code of the receiver (U1)
D2: "Forward to" address (DT400)
D3: Execution result code (DT0)
7.4.2 SEND Instruction (When MEWTOCOL-COM is Used)
Instruction format
Setting
items
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.
D1 Specify the partner station no. (Note 2) (Note 3) 0 - 99
D2
D3
(Note 1) Transmission methods vary by the type of device to be specified for the operands [S] and [D2].
(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
Settings Setting range
1 - 507 words
or 1 bit
Specify the initial address of the receiver node data area in the partner
node. (Note 4)
Specify the device area in the source node to save the execution result
code (one word).
Device to be specified for [S2] and [D1]
0 - 99999
(Note 5)
Transmission
method
16 bit device: WX, WY, WR, WL, DT, LD
1 bit device: X, Y, R, L, DT, n, LD, n Bit transmission
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.
Remarks
(Reference No.)
FP7 supported
functions
●
●
●
●
●
●
-
●
●
-
-
Correspondence table for MODBUS reference No. and device No.
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.
PLC
DT100100
DT1010
・・・・・・・・・・・・・・
・・・・・・・・・・・・・・
Command message
(Hex) 01 03 00 00 00 02 (CRC)
(Hex) 01 03 04 00 64 00 00 (CRC)
External device
supporting Modbus-RTU
40001100
400020
・・・・・・・・・・・・・・
・・・・・・・・・・・・・・
Response message
Specify and read station no. and address based on RECV instruction
Sample program
Send co mmands from the COM1 port of the CPU unit, read data from the data area o f 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
R100
DF
()
XCYC
Master
communication
Clear to send flag
Master
communication
Sending active flag
R100
Execute
RECV
UNITSELU0U1
S1S2
RECV.USDT0U2DT100H0301H0
S1S2nD1D2
(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.
Starting conditions for REC V
execution
Clear to send flag: ON
Sending active flag: OFF
Settings for com m u ni cat i on port
S1: Slot 0 (U0)
S2: COM1 (U1)
RECV processing
S1: MODBUS code (H03) and
partner device station no. (H01)
S2: Partner device address (H0)
(corresponds to H0: 40001)
n: No. of data (U2)
D1: Data saving area (DT100)
D2: Execution result code (DT0)
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
S1
S2 Specify the source MODBUS address in the partner node. H0 - HFFFF (0 - 65535)
n Specify the No. of sent data. (Note 3)
D1
D2
(Note 1) Operand [S1] is specified by combining two hexadecimal digits of MODBUS function code with two
(Note 2) Based on the types of device specified in operand [D1], the transmission methods and MODBUS function
byte
Lower
byte
Specify the device initial address of the receiver node data area in the
source node. (Note 2)
Specify the device area in the source node to save the execution result
code (one word).
hexadecimal digits of partner station no.
E.g. Specify "H030F" when MODBUS function code is 03 (Read Holding Registers) and station no. is 15.
codes that can be used vary.
Device to be specified
for [D1]
16 bit device
WX, WY, WR, WL, DT, LD
1 bit device
X, Y, R, L, DT, n, LD, n
(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
Two hexadecimal digits that indicate the MODBUS
function code
Two hexadecimal digits that indicate the station no.H1 - HF7 (1 - 247)
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)
S2
n Specify the No. of sent data.
D1
D2
(Note 1) Types of devices and transmission methods to be specified for operands [S2] and [D1], and MODBUS
(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.
Specify the device initial address of the source node data area in the
partner node.
Specify the device initial address of the receiver node data area in the
source node.
Specify the device area in the source node to save the execution result
code (one word).
function codes to be used for instruction execution vary.
Device to be specified
for [S2] and [D1]
16 bit device
WX, WY, WR, WL, DT, LD
1 bit device
X, Y, R, L, DT, n, LD, n
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
Transmission
method
Register
transmission
Bit transmission
MODBUS function codes
to be used for instruction execution
Read Coil Status (01)
Read Input Status (02)
Read Holding Registers (03)
Read Input Registers (04)
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.
PLC
DT100100
DT1010
・・・・・・・・・・・・・・
・・・・・・・・・・・・・・
Command message
(Hex) 01 10 00 00 00 02 04 00 64 00 00 (CRC)
(Hex) 01 10 00 00 00 02 (CRC)
External device
supporting Modbus-RTU
40001100
400020
・・・・・・・・・・・・・・
・・・・・・・・・・・・・・
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
DF
()
R100
(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.
XCYC
Master
communication
Clear to send flag
Master
communication
Sending active flag
UNITSELU0U1
SEND.USDT0H1001H0DT100U2
SnD1D2D3
R100
Execute
SEND
S1S2
SEND execution conditions
Clear to send flag: ON
Sending active flag: OFF
Settings for communication port
S1: Slot 0 (U0)
S2: COM1 (U1)
SEND process
S: Data saving area (DT100)
n: No. of sent da ta ( U2)
D1: MODBUS code (H10) and
partner device station no. (H01)
D2: "Transmit to" address (H0)
D3: Execution result code (DT0)
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) -
n Specify the No. of sent data. (Note 1) (Note 2)
Specify the MODBUS command and partner station no. to be used. (Note 3) (Note 4)
D1
D2
D3
(Note 1) Based on the types of device specified in operand [S] and the No. of sent data specified in [n], the
Specify the header of the MODBUS address in the receiver data area in
the partner node.
Specify the device area in the source node to save the execution result
code (one word).
transmission methods and MODBUS function codes that can be used vary.
Higher
byte
Lower
byte
Types of device
to be specified in [S]
Two hexadecimal digits that indicate the
MODBUS function code
Two hexadecimal digits that indicate the station
no.
Transmission
method
No. of sent
data
Values that can be specified in
[n]
H6: Preset Single Register (06)
16 bit device
WX, WY, WR, WL, DT,
LD
1 bit device
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) 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
Register
transmission
Bit
transmission
1
2 - 127
1
2 - 2040 HF: Force Multiple Coils (15)
HF: Force Multiple Coils (15)
H10: Preset Multiple Registers (16)
HF: Force Multiple Coils (15)
H10: Preset Multiple Registers (16)
H5:Force Single Coil (05)
HF: Force Multiple Coils (15)
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)
D2
D3
(Note 1) Types of devices and transmission methods to be specified for operands [S] and [D2], and MODBUS
Specify the initial address of the receiver node data area
in the partner node.
Specify the device area in the source node to save the
execution result code (one word).
function codes to be used for instruction execution vary.
Types of device
to be specified in [S]
16 bit device
WX, WY, WR, WL, DT, LD
Transmission
method
Register transmission
H0 - HFFFF (0 - 65535) (Note 4)
(Note 5)
MODBUS function codes
to be used for instruction execution
Force Multiple Coils (15)
Preset Multiple Registers (16)
1 bit device
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
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
DT100U 4
DT101H 42 41
DT102H 44 43
・・・・・・・・・・・・・・
ABCD (CR)
1 2 3 4 (CR)
400012 1
400024 3
・・・・・・・・・・・・・・
・・・・・・・・・・・・・・
Receive response message
Send command based on GPSEND instruction
Receive response based on GPRECV instruction
9.1.2 Write Data into an Externa l 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
DT100U 6
DT101H 42 41
DT102H 44 43
DT103H 32 31
Send command message
ABCD 1 2 (CR)
XYZ (CR)
Receive response message
External device
400012 1
・・・・・・・・・・・・・・
・・・・・・・・・・・・・・
・・・・・・・・・・・・・・
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.
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
DT100U 5
DT101B A
DT102D C
DT103・・E
ABCDE (CR)
Send data based on GPSEND
instruction
00001・・・・・・・・
00002・・・・・・・・
・・・・・・・・・・・・・・
・・・・・・・・・・・・・・
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
R100
R100
R100
DF
()
General purpose
communication
Clear to send flag
DF
()
X8Y8
General-purpose
communication
Sending active flag
SSETDT100“ABCDE”
GPSEND . US
R101
S1S2
R100
UNITSELU1U0
S1S2
DT101DT0DT100
SnD
GPSEND execution conditions
Clear to send flag: ON
Sending active flag: OF F
Data conversion
S1: Sent Data
S2: Save Sent Data
DT100: No. of Sent Characters
DT101 onward: Sent Data
Settings for communication port
S1: Slot 0 (U0)
S2: COM1 (U1)
SEND processing
S: Header of Sent Data (DT101)
n: No. of Sent Characters (DT100)
D: Execution Result Code (DT0)
Y8R101
()
DF /
(Note) The unit number and COM port number in the above program is applied when the COM.1 port of the CPU unit