fp7 Users Scu E-14
fp7 Users Scu E-14
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
Table of Contents
ii
Table of Contents
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
iii
Table of Contents
iv
Table of Contents
v
Table of Contents
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
vi
Table of Contents
vii
Table of Contents
viii
1
Functions of Units and
Restrictions on Combination
Functions of Units and Restrictions on Combination
One
communication
cassette can be Two
attached. communication
cassettes can be
attached.
COM.0 port is
equipped as standard.
(For 3-wire RS-232C)
1-2
1.1 Features and Functions of Units
1-3
Functions of Units and Restrictions on Combination
1-4
1.2 Overview of Communication Functions
Master function
Slave function
1-5
Functions of Units and Restrictions on Combination
Master function
Slave function
1-6
1.2 Overview of Communication Functions
1-7
Functions of Units and Restrictions on Combination
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
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
(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-3
Names and Functions of Parts
2-4
3
Wiring the COM. Port
Wiring the COM. Port
PROCEDURE
1. Using a flathead screwdriver, remove the cover on the side of the CPU unit.
You will find four toggles.
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-3
Wiring the COM. Port
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
NOTES
3-4
3.2 Wiring of COM Port Terminal Block
(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)
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-6
3.3 Wiring for CPU Unit (GT Power Supply and COM0 Port)
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
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
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-9
Wiring the COM. Port
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)
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-12
3.4 Wiring for Communication Cassettes COM.1 to COM.4 Ports
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.
3-13
Wiring the COM. Port
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.
3-14
3.4 Wiring for Communication Cassettes COM.1 to COM.4 Ports
3-15
Wiring the COM. Port
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
3-17
Wiring the COM. Port
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.
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 (+)
3-18
3.4 Wiring for Communication Cassettes COM.1 to COM.4 Ports
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
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
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
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
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
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.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
PROCEDURE
4-6
4.2 Registration in I/O Map
4-7
I/O Allocation
4-8
5
Setting and Confirming
Communication Conditions
Setting and Confirming Communication Conditions
5-2
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
5-3
Setting and Confirming Communication Conditions
PROCEDURE
5-4
6
PLC Link
PLC Link
RS485
6-2
6.1 Operation of PLC link MEWNET-W0
R0 L0 L0 Y0 L0 Y0 L0 Y0
RS485
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
PROCEDURE
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
PROCEDURE
差し替え
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
Terminator setting CR
Terminator judgment time 0
Modem initialization Do not initialize
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
NOTES
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.
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)
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)
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
6-11
PLC Link
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:
6-13
PLC Link
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-2
7.2 List of MEWTOCOL / MEWTOCOL7 Supporting Commands
REFERENCE
7-3
MEWTOCOL
Master/Slave Communication
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
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
7-5
MEWTOCOL
Master/Slave Communication
KEY POINTS
7-6
7.3 MEWTOCOL-COM Master Communication (RECV)
7-7
MEWTOCOL
Master/Slave Communication
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).
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
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
7-9
MEWTOCOL
Master/Slave Communication
KEY POINTS
7-10
7.4 MEWTOCOL-COM Master Communication (SEND)
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-2
8.2 List of MODBUS RTU Supported Commands
8-3
MODBUS RTU
Master/Slave Communication
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
8-5
MODBUS RTU
Master/Slave Communication
KEY POINTS
8-6
8.3 MODBUS RTU Master Communication (RECV)
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
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)
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
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
8-10
8.4 MODBUS RTU Master Communication (SEND)
KEY POINTS
8-11
MODBUS RTU
Master/Slave Communication
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)
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
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
DT100 U4
ABCD (CR) 40001 21
DT101 H 42 41 40002 43
DT102 H 44 43 ・・・・・・ ・・・・・・・・
・・・・・・ ・・・・・・・・ 1 2 3 4 (CR) ・・・・・・ ・・・・・・・・
ABCD 1 2 (CR)
DT100 U6 40001 21
DT101 H 42 41 ・・・・・・ ・・・・・・・・
DT102 H 44 43 ・・・・・・ ・・・・・・・・
DT103 H 32 31 XYZ (CR) ・・・・・・ ・・・・・・・・
KEY POINTS
9-2
9.2 Configuration
9.2 Configuration
9-3
General-Purpose Communication
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)
(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).
Execute GPSEND
Sending data
9-5
General-Purpose Communication
KEY POINTS
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
KEY POINTS
9-7
General-Purpose Communication
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
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
(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
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
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
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
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)
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".
Request to
reset CH1
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
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
9-14
9.5 Sending/Receiving Flag Operation
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
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
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.
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
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
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
KEY POINTS
10-3
Troubleshooting
10-4
10.2 What to DO If an Error Occurs
(For Each Communication Mode)
10-5
Troubleshooting
10-6
10.3 Checking Status with PMGET Instruction
10-7
Troubleshooting
10-8
10.4 Clearing Errors Using User Programs
R100
( DF ) UCLR U1
Unit clear Slot No.
request
Request to
reset CH1
10-9
Troubleshooting
10-10
11
Specifications
Specifications
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
11-3
Specifications
(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-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
11-6
11.2 MEWTOCOL-COM Format
11-7
Specifications
NOTES
11-8
11.3 MEWTOCOL7-COM Format
> @ 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)
11-9
Specifications
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
> @ E E E 0 0 $ 0 0 M M R D
CR
11-11
Specifications
NOTES
Command > @ E E E 0 0 # 0 0 M M R D CR
Response > @ E E E 0 0 $ 0 0 M M R D CR
11-12
11.4 MODBUS RTU Format
11-13
Specifications
11-14
Record of changes
Manual No. Date Record of Changes