MICREX-SX SPH Ethernet Interface Module
MICREX-SX SPH Ethernet Interface Module
USER’S MANUAL
FEH259f
Preface
Thank you for purchasing Fuji Electric Programmable Controller MICREX-SX Series.
This User’s Manual describes the specifications of the MICREX-SX SPH series Ethernet interface modules (Type: NP1L-ET1
and NP1L-ET2) for connecting to Ethernet.
Read this manual carefully to ensure correct operation. When using modules or peripheral devices, be sure to read the
corresponding user’s manuals listed below.
* This manual is applicable to both SX-programmer Expert (hereinafter referred to as D300win) and SX-programmer Standard
(hereinafter referred to as Standard loader). For the Standard loader, word addresses are expressed by decimal numbers (the
same as for MICREX-F series). When described merely as “loader” in this manual, it applies to both loaders.
* In addition to the above manuals, the following Fuji Electric Co.,Ltd. site offers various manuals and technical documents
associated with MICREX-SX series.
URL http://www.fujielectric.com
Notes
1. This manual may not be reproduced in whole or part in any form without prior written approval by the manufacturer.
2. The contents of this manual (including specifications) are subject to change without prior notice.
3. If you find any ambiguous or incorrect descriptions in this manual, please write them down (along with the manual No.
shown on the cover) and contact FUJI.
Safety Precautions
Be sure to read the “Safety Precautions” thoroughly before using the module.
Here, the safety precautions items are classified into “Warning” and “Caution”.
Warning : Incorrect handling of the device may result in death or serious injury.
Caution : Incorrect handling of the device may result in minor injury or physical damage.
Warning
z Never touch any part of charged circuits as terminals and exposed metal portion while the power is turned ON. It may
result in an electric shock to the operator.
z Turn OFF the power before mounting, dismounting, wiring, maintaining or checking, otherwise, electric shock, erratic
operation or troubles might occur.
z Place the emergency stop circuit, interlock circuit or the like for safety outside the PLC. A failure of PLC might break or
cause problems to the machine.
z Do not connect in reverse polarity, charge (except rechargeable ones), disassemble, heat, throw in fire or short-circuit the
batteries, otherwise, they might burst or take fire.
z If batteries have any deformation, spilled fluids, or other abnormality, do not use them. The use of such batteries might
cause explosion or firing.
z Do not open the FG terminal with the LG-FG short circuited. (It must be grounded, otherwise it might cause electric shock.)
Safety Precautions
Caution
z Do not use one found damaged or deformed when unpacked, otherwise, failure or erratic operation might be caused.
z Do not shock the product by dropping or tipping it over, otherwise, it might be damaged or troubled.
z Follow the directions of the operating instructions when mounting the product. If mounting is improper, the product might
drop or develop problems or erratic operations.
z Use the rated voltage and current mentioned in the operating instructions and manual. Use beyond the rated values might
cause fire, erratic operation or failure.
z Operate (keep) in the environment specified in the operating instructions and manual. High temperature, high humidity,
condensation, dust, corrosive gases, oil, organic solvents, excessive vibration or shock might cause electric shock, fire,
erratic operation or failure.
z Select a wire size to suit the applied voltage and carrying current. Tighten the wire terminals to the specified torque.
Inappropriate wiring or tightening might cause fire, malfunction, failure, or might cause the product to drop from its mounting.
z Contaminants, wiring chips, iron powder or other foreign matter must not enter the device when installing it, otherwise,
erratic operation or failure might occur.
z Remove the dust-cover seals of modules after wiring, otherwise, fire, accidents, failure or fault might occur.
z Connect the ground terminal to the ground, otherwise, an erratic operation might occur.
z Periodically make sure the terminal screws and mounting screws are securely tightened.
Operation at a loosened status might cause fire or erratic operation.
z Put the furnished connector covers on unused connectors, otherwise, failure or erratic operation might occur.
z Install the furnished terminal cover on the terminal block, otherwise, electric shock or fire might occur.
z Sufficiently make sure of safety before program change, forced output, starting, stopping or anything else during a run.
The wrong operation might break or cause machine problems.
z Engage the loader connector in a correct orientation, otherwise, an erratic operation might occur.
z Before touching the PLC, discharge any static electricity that may have been collected on your body. To discharge it, touch a
grounded metallic object. Static electricity might cause erratic operation or failure of the module.
z Be sure to install the electrical wiring correctly and securely, observing the operating instructions and manual. Wrong or loose
wiring might cause fire, accidents, or failure.
z When disengaging the plug from the outlet, do not pull the cord, otherwise, break of cable might cause fire or failure.
z Do not attempt to change system configurations (such as installing or removing I/O modules) while the power is ON,
otherwise, failure or erratic operation might occur.
z Do not attempt to repair the module by yourself contact your Fuji Electric agent. When replacing the batteries, correctly and
securely connect the battery connectors, otherwise, fire, accidents or failure might occur.
z Clean this product after power-off using a towel that is moistened with lukewarm water and then wrung tightly. Do not use
thinner or other organic solvents, as the module surface might become deformed or discolored.
z Do not remodel or disassemble the product, otherwise, a failure might occur.
z Follow the regulations of industrial wastes when the device is to be discarded.
z The modules covered in these operating instructions have not been designed or manufactured for use in equipment or
systems which, in the event of failure, can lead to loss of human life.
z If you intend to use the modules covered in these operating instructions for special applications, such as for nuclear energy
control, aerospace, medical, or transportation, please consult your Fuji Electric agent.
z Be sure to provide protective measures when using the module covered in these operating instructions in equipment which,
in the event of failure, may lead to loss of human life or other grave results.
z External power supply (such as 24V DC power supply) which is connected to DC I/O should be strongly isolated from AC
power supply, otherwise, accident or failure might occur. (Use of EN60950 conforming power supply is recommended.)
z Do not use this equipment in a residential environment.
Revision
* The manual No. is printed at the bottom right of the cover of this manual.
Mar. 2004 FEH259a • Errors in writing in “Appendix 1-2 Transmission Data Format of Commands” were corrected.
• Specifications for NP1L-ET2 (of 10BASE5 interface specification) were added.
• Specification for response speed was added.
• Running status information RAS was added.
• The operating method when the Standard program loader is used was added.
Dec. 2019 FEH259f • Widely revised reflecting the contents of the latest Japanese version.
(The version No. of this manual shall be “f” in accordance with the latest Japanese version.)
Contents
Preface
Safety Precautions
Revision
Contents
Section 1 Overview
1-1 Overview of Ethernet Interface Module..........................................................................................1-1
Section 2 Specifications
2-1 General Specifications....................................................................................................................2-1
2-2 Transmission Specifications...........................................................................................................2-2
2-2-1 Transmission specifications............................................................................................................................2-2
2-2-2 Communication ports of the module...............................................................................................................2-3
2-2-3 Communication speed....................................................................................................................................2-4
2-3 Communication Functions..............................................................................................................2-9
2-3-1 General purpose communication mode..........................................................................................................2-9
2-3-2 Fixed buffer communication mode..................................................................................................................2-10
2-3-3 Loader command communication mode.........................................................................................................2-11
2-4 Names and Functions......................................................................................................................2-12
2-4-1 NP1L-ET1.......................................................................................................................................................2-12
2-4-2 NP1L-ET2.......................................................................................................................................................2-13
2-5 Dimensions........................................................................................................................................2-15
Ethernet
MICREX-SX MICREX-SX
<Features>
• NP1L-ET1 supports 10BASE-T as well as 100BASE-TX. The Auto Negotiation function automatically changes over between
10BASE-T and 100BASE-TX.
• NP1L-ET2 supports 10BASE5.
1-1
Section 1 Overview
<Supported versions of CPU and programming loader>
When you use the Ethernet interface module (NP1L-ET1/ET2) for Ethernet communication, use the following version of CPU
and loader.
Name Version
SPH200 V**30 or later (Note 1)
CPU SPH300 V**25 or later (Note 2)
SPH2000/SPH3000 All versions
D300winV2 V2.2.3.1 or later (Note 3)
Loader D300winV3 V3.0.0.0 or later (Note 4)
Standard loader V2.0.3.0 or later (Note 5)
Notes:
1) V**42 or later to use the R_READ or R_WRITE instruction
2) V**58 or later to use the redundant function
3) In V2.2.3.1, select NP1L-ET1 to register NP1L-ET2 in system definition.
4) In V3.0.0.0, select NP1L-ET1 to register NP1L-ET2 in system definition.
SPH2000 is supported by V3.3.0.0 or later. (The supported version differs depending on the type.)
5) SPH2000 is supported by V2.2.0.0 or later. (The supported version differs depending on the type.)
1-2
Section 2 Specifications
Notes:
1) Influenced by the noise immunity of the connected transceiver. Fuji Electric conducts test and evaluation under the wiring
and installation environment described in Appendix 2-2.
2) Use an external power supply that meets the specifications for transceiver and transceiver cable (AUI cable).
[Reference]
IEEE 802.3 specifies as follows:
• Transceiver input terminal voltage: 12 V -6% to 15 V +15%
• DC resistance of transceiver cable: 40 Ω/km or less, max. 50 m
• Max. current consumption of transceiver: 500 mA
2-1
Section 2 Specifications
Notes:
1) Hub setting
Use a HUB (a communication target when directly connected to a LAN cable) in auto negotiation mode (automatic
changeover between 10M and 100M). When fixed at 100M or 10M (full duplex), communication cannot be performed.
2) "URG" flag of TCP header
When the URG flag is ON, receive data is treated differently depending on the firmware version.
V48 or earlier: Receive data of M_RECEIVE is data obtained by subtracting the data for the length specified in "Urgent
pointer" (urgent pointer value) of TCP header from the data part of the communication packet.
If the length of the data part of communication packet is the same as the urgent pointer value, M_RECEIVE
cannot receive the data.
V49 or later: Receive data of M_RECEIVE is all the data in the data part of the communication packet.
* When the URG flag is OFF, receive data is treated in the same manner as in V49 or later regardless of the firmware version.
3) "CWR" and "ECE" flags of TCP header
When the CWR and ECE flags are ON, port open operation is different depending on the firmware version.
V48 or earlier: Port open is not possible.
V49 or later: Port open is possible.
* When either the CWR flag or ECE flag is OFF, port open operation is the same as in V49 or later regardless of the
firmware version.
2-2
Section 2 Specifications
Number of
Connection
Communication type Communication function connections
type
(Note 4)
Notes:
1) “Send” means the operation of a node that sends a request by R_WRITE or R_READ.
2) “Receive” means the operation of a node that receives a request of R_WRITE or R_READ sent from a partner node.
3) “Loader connection” means communication performed between a personal computer loader, POD, and personal computer
by loader command communication.
4) Up to 56 connections can be established per CPU, including general purpose communication modules other than
Ethernet modules and communication via the port built in the CPU. Before reaching 56, the number of communication
connections increases by a maximum of 16 ports every time an Ethernet module is added.
However, as the number of connections increases, the communication response time becomes slower.
2-3
Section 2 Specifications
Ethernet
Remote node
ON
Set send data and
turn ON the send request
(REQ) of M_SEND
SX message processing
Starts sending the data to the remote node.
1)
Ethernet module
internal processing
2) 3)
ON
Sending operation of
Ethernet module is completed. ON for one scan
2-4
Section 2 Specifications
<Example of communication speed calculation>
* The calculation conditions are as follows: SPH300 is used and "receipt confirmation" is enabled.
* For the data volume, calculation is made in two cases: 100 words and 1017 words. (“1017 words” is an example that the
operation to pass data from CPU to Ethernet is divided.)
* Transmission time is supposed to be 1 ms (approximate value when transmission speed is 10 Mbps).
Notes:
1) When the volume of send data exceeds 256 words, 5 ms is added to message processing time 1), and 2.5 ms is added to
Ethernet module internal processing time 2).
2) In the case of communication between Ethernet modules:
If the volume of send data is 730 words or less when receipt confirmation is enabled, 205 ms is added to the above formula
If the volume of send data is 731 words or more when receipt confirmation is enabled, 5 ms is added to the above formula.
In the case of communication with other devices, ACK response time on the target device side is added.
Ethernet
Remote node
SX message processing
2)
M_RECEIVE
Receive end (DONE)
2-5
Section 2 Specifications
1) Ethernet module internal processing time
The time required to pass the data, which the Ethernet module has received from the remote node, to the CPU module.
Ethernet module internal processing time = 4 to 15 ms + (0.008 ms x Number of words)
2) SX message processing time
The time required to pass the receive data from the Ethernet module to the CPU internal memory.
This processing time differs between SPH300/SPH2000 and SPH200.
• SPH300/SPH2000: Executes at 5-ms intervals (The volume of message data processed at a time: Max. 256 words)
• SPH200: Executes at the interval of SX bus tact time (The volume of message data processed at a time: Max. 256 words)
* When the data volume exceeds 256 words, the remaining data is processed in the next cycle of SX message processing.
Note:
When the volume of send data exceeds 256 words, 5 ms is added to SX message processing time 2), and 2.5 ms is added to
Ethernet module internal processing time 1).
2-6
Section 2 Specifications
(3) When "remote read/remote write" (R_READ/R_WRITE) is used
<System configuration example>
Ethernet
MICREX-SX MICREX-SX
ON
R_READ
R_WRITE
request (REQ)
SX message
processing
1)
Ethernet transmission time
Ethernet module
internal processing
Ethernet transmission time
5) SX message processing
Ethernet module 6) 7)
internal processing
ON for one scan
R_READ
R_WRITE
end (DONE)
2-7
Section 2 Specifications
4) Response processing time on the remote node
The time required for the remote SX system to pass response data to transmission path after receiving request data.
Max. value for R_READ = 7.5 x 2 + (0.008 x Number of words) ms
Min. value for R_READ = 7.5 x 2 + (0.008 x Number of words) ms
Max. value for R_WRITE = 7.5 x 2 + (0.008 x Number of words) ms
Min. value for R_WRITE = 7.5 x 2 + (0.008 x Number of words) ms
6) Ethernet module internal processing time
Max. value for R_READ = 15 + (0.008 x Number of words) ms
Min. value for R_READ = 7.5 + (0.008 x Number of words) ms
Max. value for R_WRITE = 15ms
Min. value for R_WRITE = 7.5ms
Note:
When the data volume exceeds 90 words, +15 to 32.5 ms is added for every additional 90 words (every additional 97 words in
the case of SPH200).
2-8
Section 2 Specifications
MICREX-SX
NP1L-ET1/ET2
Send Receive
buffer buffer
Receive data
TCP/IP or UDP/IP
Other nodes
2-9
Section 2 Specifications
MICREX-SX NP1L-ET1/ET2
Other nodes
2-10
Section 2 Specifications
<Communication conditions>
Note:
There are the following restrictions on the use of 253 (loader interface server).
• Changeover in redundant CPU mode is not supported. Use 251 (loader command server) when it is necessary to perform
changeover in CPU redundant mode during Ethernet communication.
• You cannot read the detail RAS of modules other than CPU0 via Ethernet.
* Actual port No. = Self port standard No. + Self port No. (251 or 253)
(You can set the self port standard No. in the system definition. Default: 256)
Default value is "256 + 251 = 507."
For example, when the self port standard No. is set to 1000, 1251 (1000 + 251) is the port No. for loader command
communication.
Communi- Communi-
cation cation
channel channel
CPU
Request data
Response data
TCP/IP
Request data
2-11
Section 2 Specifications
3) Version No.
(2) Functions
1) Status indication LED
These LEDs indicate the current status of NP1L-ET1.
ERR RDY CN
2) 10BASE-T/100BASE-TX connector
10BASE-T or 100BASE-TX communication cable is connected to this connector.
3) Version No.
The hardware version and software version of NP1L-ET1 are indicated on the label.
20 Hardware version
30 Firmware version
2-12
Section 2 Specifications
2-4-2 NP1L-ET2
(1) Names
1) Status indication LED
4) Version No.
(2) Functions
1) Status indication LED
These LEDs indicate the current status of NP1L-ET2.
ERR RDY CN
2-13
Section 2 Specifications
2) 10BASE5 connector
10BASE5 communication cable is connected to this connector.
AUI cable
White Black
Red
DC+ 0 V DC
Grounding
DC power supply
3) Version No.
The hardware version and software version of NP1L-ET2 are indicated on the label.
20 Hardware version
30 Firmware version
2-14
Section 2 Specifications
2-5 Dimensions
NP1L-ET1
Unit: mm
35 (Note) 90
UTP
105
NP1L-ET2
35 (Note) 90
AUI cable
105
Notes:
Consider the bending radius of the cable to be used when installing the module and wiring.
2-15
Section 3 Mounting Modules
Mountable slots
Mountable slots
Note:
NP1L-ET1/ET2 cannot be mounted on a base board of remote I/O such as T-link, OPCN-1, and DeviceNet.
CPU
Power Power
supply supply
3-1
Section 3 Mounting Modules
Name Type
P-link module NP1L-PL1
PE-link module NP1L-PE1
FL-net module NP1L-FL1/FL2/FL3
LE-net module NP1L-LE1
LE-net loop module NP1L-LL1
LE-net loop2 module NP1L-LL2
General purpose communication module NP1L-RS1/RS2/RS3/RS4/RS5
PC card interface module NP1F-PC2
Memory card interface module NP1F-MM1
ADS-net module NP1L-AD1
WEB module NP1L-WE1
LONWORKS interface module NP1L-LW1
POD directly connected to SX bus -
The modules listed above are controlled by “Circuit No.” that is set from the "Module insert" or "Module properties" dialog box.
When the modules listed above are registered, circuit numbers from 8 to 23 are automatically assigned to them so that 17
or more modules cannot be registered to one system.
3-2
Section 4 Communication Procedures
When the system is turned on, the Ethernet module is * For the setting of the Ethernet module, see
1) Initialization initialized according to the setting of Ethernet module "4-2 Module Operation Definition."
properties in the system definition.
2) Opening Using M_OPEN FB, make the system ready for * For the details of M_OPEN FB, see
communication communicating with the remote node (open the port to "4-4-2 Open channel (M_OPEN)."
channel establish connection).
1) Initialization
When the system is turned on, two ports are automatically
and opening
opened to enable the communication with up to 8 stations
communication
using loader commands.
channel
For communication between nodes of SX series devices, * For the details of communication FBs, see
R_READ FB and/or R_WRITE FB are used. When the "4-4-5 Remote data write (R_WRITE)" and
2) Communication "4-4-6 Remote data read (R_READ)."
corresponding remote node is a personal computer, loader
with remote For the details of the loader commands that are
commands (data read request and data write request)
mode used to issue commands from the personal
are issued from an application program of the personal
computer. computer, see "Appendix 1 Loader Command."
3) Closing
No application program is necessary for this. The ports are
communication
automatically closed.
channel
4-1
Section 4 Communication Procedures
To communicate with other nodes, set module operation definition (set module parameters) and prepare a communication
program.
1) IP address
Set an IP address for the Ethernet module (determined by the network administrator). An IP address identifies each node on
Ethernet. It consists of 32-bit binary data and is defined as a combination of an IP network address and an IP host address. An
IP network address identifies the network; An IP host address is the ID for identifying the host (node) in a network.
2) Subnet mask
Controlling many nodes connected to one network is hard. To divide one network into multiple subnets (groups), set the subnet
mask value. A subnet uses a part of the host address, masking the bits for the IP network address part and subnetwork part with
“1” and the IP host address part with “0.” When no subnet exists, set “0.0.0.0.”
Example 1) When a class B network is divided into 16 subnets, set as follows.
“255.255.240.0” (FFFFF000)
Example 2) When a class B network is divided into 256 subnets, set as follows.
“255.255.255.0” (FFFFFF00)
4-2
Section 4 Communication Procedures
3) Gateway
An IP router (gateway) allows connection to other IP network segments. When networks are connected by an IP router, they can
communicate with each other via the router. Set the gateway to enable communication with another network. Set the IP address
of the gateway here. When no gateway is used, set to "0.0.0.0" (or do not specify anything).
Example) When three routers are used as shown below, the Ethernet module can only access the network of the router A (set
as the default gateway).
However, if the routers support the "ICMP redirect function," information is automatically exchanged among the routers and the
Ethernet module. Then, the Ethernet module can access the networks of the router B and router C.
The following screen shows a setting example when the router A is set as the default gateway in the above configuration.
* In old versions of loaders, the "Gateway" tab window includes the following setting items: "New gateway" and "Installed
gateway." However, these settings are actually disabled, therefore, deleted in the new version of loaders.
4-3
Section 4 Communication Procedures
4) TCP sending timeout value (setting range: 0 to 300, in 0.1-second steps)
Set a value for communication error monitoring timer when TCP connection is opened and data is sent.
If opening of a connection or data sending fails (no ACK is returned from the remote node) during TCP/IP communication,
Ethernet automatically retries it. The retry interval increases exponentially, like 3 seconds, 6 seconds, 12 seconds, ......
1) If open processing has started but cannot end normally although Ethernet repeatedly retries it, the open processing ends
abnormally after the set timeout time elapses .
2) If data sending has started but cannot end normally although Ethernet repeatedly retries it, the sending ends abnormally
when the timing of retry is reached after the set timeout time elapses.
For example, when TCP send timeout value is set to 15 seconds and 30 seconds, the internal operation before error detection is
as follows.
15 s 30 s
Total time
3s 6s 12 s
t
5) Maximum TCP end timer value (setting range: 0 to 600, in 0.1-second steps)
Set the waiting time to keep the socket for a specified time after the local station performs processing for closing TCP connection
and completes it normally. The maximum waiting time until the processing for closing the remote station is completed normally
when the local station performs processing for closing TCP connection station is twice the set TCP send timeout value.
If the processing for closing the remote station cannot be completed normally (when no FIN is received), RST is sent to the
remote node to forcibly close the connection. 0 means no waiting time.
7) Server FTP command watch timer value (setting range: 0 to 3000, in 0.1-second steps)
Set the time to automatically disconnect the connection when a port is opened from the remote node in loader command mode,
however, no command is sent from the node for a given period of time.
Set this item to “0” not to disconnect the connection even when no command is sent from the remote node, for example, when
the loader is connected via the Ethernet module.
8) Client FTP data connection watch timer value (setting range: 0 to 30, in 0.1-second steps)
Currently, this item is not used.
4-4
Section 4 Communication Procedures
9) Close process during TCP sending timeout
TCP sending timeout occurs if no ACK is returned even if sending is retried specified times during communication under TCP/IP
protocol. Select whether to close the connection under this condition.
Note:
This item is disabled. If a TCP sending timeout occurs, the connection is forcibly closed.
4-5
Section 4 Communication Procedures
<Operating procedure>
1) Open the "Module properties" dialog box for the Ethernet module and click the [Parameter...] button. The "Ethernet parameter
setting" dialog box opens.
2) On the "IP Address" tab window, set the IP address and subnet mask.
4-6
Section 4 Communication Procedures
3) On the "Gateway" tab window, set the address of the gateway if necessary.
3) Click the [Detail Setting] tab to display the "Detail Setting" tab window. (Usually, keep the default settings.)
4) After setting all necessary items, click the [OK] button to complete the setting.
4-7
Section 4 Communication Procedures
<Downloading module driver>
The module driver, which stores various parameter settings (IP address, gateway and detail settings), is written into the ROM in
the Ethernet module via the CPU module.
Note that the setting contents are not stored in the memory of the CPU module. The contents of the module driver (IP address,
gateway and detail settings) cannot read even if you upload the program from the CPU by the loader. Each parameter setting (IP
address, gateway and detail settings) in the uploaded data is restored to its default value.
With V36 or later version of Ethernet modules, you can check the setting contents by using the diagnosis function of the loader.
For the details, see "(5) Initializing information."
The only way to download the module driver is to directly download it to the CPU from the loader. Even if you store a program
(including system definitions) in a user ROM, insert it into the CPU module, and then turn the CPU module off and then on
again, the program and system definitions are downloaded, but not the module driver.
When you use an Ethernet module for the first time, the CPU module must recognize it before downloading the module driver.
Follow the steps below to download the module driver.
1) Check "Program" and "System definition," and then download the program. (Do not check "Module driver.")
4-8
Section 4 Communication Procedures
SX_CPU
M_OPEN FB
Open request
(EN_C)
1) 6)
M_OPEN FB
Open enable
(VALID)
M_SEND FB
Send data Set send data.
(SD)
2)
M_SEND FB
Send request
(REQ)
M_SEND FB
Send end 5)
(DONE) 3)
Remote node
1) Open a communication channel by the M_OPEN FB first. Set ON the open request (EN_C) to establish a connection with the
remote node according to the setting of M_OPEN. The open enable flag (VALID) turns ON.
2) Set data to be sent in the send data (SD) of the M_SEND FB, and then set ON the send request (REQ).
3) The data is sent to the send buffer in the Ethernet module at the rising edge of the send request (REQ)
4) The Ethernet module adds a header part necessary for communication to the data and then sends it to the remote node.
5) When the Ethernet module completes sending data, the send end (DONE) of the M_SEND FB turns ON for one scan. When
the communication protocol is TCP/IP and receipt confirmation is enabled, the send end flag (DONE) turns ON for one scan
after the Ethernet module receives data reception signal (ACK) from the remote node.
Note:
If the data sending is not completed normally, the send error (ERROR) turns ON for one scan. In this case, set the send
request OFF, and then re-execute processing for sending data (from the step 3).
6) To break the communication channel when communication ends, set OFF the open request (EN_C) of the M_OPEN FB.
VALID turns OFF when the close processing is completed.
4-9
Section 4 Communication Procedures
(2) Data receiving
To receive data from the remote node, establish a connection by M_OPEN, and then receive data by M_RECEIVE.
Remote node
3)
NP1L-ET1/ET2
Receive buffer
2) Receive enable
SX_CPU
M_OPEN FB
Open request
(EN_C)
1) 5)
M_OPEN FB
Open enable
(VALID)
M_RECEIVE FB
Receive enable
(REQ)
M_RECEIVE FB
Receive data Receive data
(RD)
4)
M_RECEIVE FB
Receive end
(NDR)
1) Open a communication channel by the M_OPEN FB first. Set ON the open request (EN_C) to establish a connection with the
remote node according to the setting of the M_OPEN FB. The open enable flag (VALID) turns ON.
2) Set ON the receive enable (EN_R) of the M_RECEIVE FB to make the Ethernet module ready for receiving data.
3) The Ethernet module receives data from the remote node and stores it in the receive buffer.
4) The received data that is stored in the receive buffer in the Ethernet module is stored in the receive data (RD) of the
M_RECEIVE FB, and then the receive end (NDR) turns ON for one scan.
Note:
If abnormal data is received, the receive end (NDR) does not turn ON and the received data is not stored in the receive buffer.
5) To break the communication channel when communication ends, set OFF the open request (EN_C) of the M_OPEN FB.
VALID turns OFF when the close processing is completed.
4-10
Section 4 Communication Procedures
(3) Data format
Data sent to or received from the remote node.
1) Header part
The header part is a header for Ethernet TCP/IP or UDP/IP. When data is sent to the remote node by an application program,
the Ethernet module automatically adds a header to the data before sending it to the remote node. When data is received from
the remote node, the Ethernet module removes the header part from the received data, and sends only the data part to the FB.
2) Data part
The data part is data for Ethernet TCP/IP or UDP/IP. When data is sent to the remote node by M_SEND, data that is transferred
to the send buffer in the Ethernet module is set in the data part of Ethernet TCP/IP or UDP/IP, and then sent. When data in
binary code is set in the send buffer, it is sent without change. When data in ASCII code is set in the send buffer, it is sent after
converted into ASCII characters.
When data is received from the remote node, data of the data part of TCP/IP or UDP/IP is stored in the receive buffer in the
Ethernet module. When data in binary code is received, it is stored in the receive buffer without change. When data in ASCII
code is received, it is stored in the receive buffer after converted into binary code.
Send/receive buffer
Header part D1L D1H D2L D2H D3L D3H ··· DnL
of NP1L-ET1/ET2
1 D1H D1L
2 D2H D2L
3 D3H D3L
n DnL
The data length shows the number of bytes of data stored in the send/receive buffer in decimal (Max. 2034 bytes).
If the data length is an odd number, data up to the low byte of the last word is effective.
Send/receive buffer
Header part D1H D1L D2H D2L D3H D3L ··· DnH
of NP1L-ET1/ET2
1 D1H D1L
2 D2H D2L
3 D3H D3L
n DnH
The data length shows the number of bytes of data stored in the send/receive buffer in decimal (Max. 2034 bytes).
If the data length is an odd number, data up to the high byte of the last word is effective.
4-11
Section 4 Communication Procedures
<ASCII code>
Packet of
TCP/IP or UDP/IP Twice the data length (Max. 4068 bytes)
1 D1H D1L
2 D2H D2L Converted
into
ASCII
n DnH
The data length shows the number of bytes of data stored in the send/receive buffer in decimal (Max. 2034 bytes).
If the data length is an odd number, data up to the high byte of the last word is effective.
4-12
Section 4 Communication Procedures
SX_CPU
M_OPEN FB
Open request
(EN_C)
1) 6)
M_OPEN FB
Open enable
(VALID)
M_SEND FB
Send data Set send data.
(SD)
2)
M_SEND FB
Send request
(REQ)
M_SEND FB
Send end 5)
(DONE) 3)
NP1L-ET1/ET2
Send buffer
4)
Response
Remote node
1) Open a communication channel by the M_OPEN FB first. Set ON the open request (EN_C) to establish a connection with
the remote node according to the setting of the M_OPEN FB. The open enable flag (VALID) turns ON.
2) Set data to be sent in the send data (SD) of the M_SEND FB, and then set ON the send request (REQ).
3) The data is sent to the send buffer in the Ethernet module at the rising edge of the send request (REQ)
4) The Ethernet module adds a header part necessary for communication to the data and then sends it to the remote node.
5) When the Ethernet module completes sending data and receives a response from the remote node, the send end (DONE) of
the M_SEND FB turns ON for one scan.
Note:
If the data sending is not completed normally (no response is returned from the remote node or the end code of the response
is a value other than “00”), the send error (ERROR) turns ON for one scan. In this case, turn OFF the send request, and then
re-execute processing for sending data (from the step 3).
6) To break the communication channel when communication ends, set OFF the open request (EN_C) of the M_OPEN FB.
VALID turns OFF when the close processing is completed.
* When fixed buffer communication mode is used, set separate ports for sending and receiving.
4-13
Section 4 Communication Procedures
(2) Data receiving
To receive data from the remote node, establish a connection by M_OPEN, and then receive data by M_RECEIVE.
Remote node
3)
NP1L-ET1/ET2 Response
Receive buffer
2) Receive enable
SX_CPU
M_OPEN FB
Open request
(EN_C)
1) 5)
M_OPEN FB
Open enable
(VALID)
M_RECEIVE FB
Receive enable
(REQ)
M_RECEIVE FB
Receive data Receive data
(RD) 4)
M_RECEIVE FB
Receive end
(NDR)
1) Open a communication channel by the M_OPEN FB first. Set ON the open request (EN_C) to establish a connection with the
remote node according to the setting of the M_OPEN FB. The open enable flag (VALID) turns ON.
2) Set ON the receive enable (EN_R) of the M_RECEIVE FB to make the Ethernet module ready for receiving data.
3) The Ethernet module receives data from the remote node and stores it in the receive buffer.
4) The received data that is stored in the receive buffer in the Ethernet module is stored in the receive data (RD) of the
M_RECEIVE FB, and then the receive end (NDR) turns ON for one scan. When the receive end turns ON, the Ethernet
module returns a response to the remote node. During reception processing, the data length to receive and the size of
received data part are checked. The Ethernet module continues receiving until all the remaining data is received. Receiving is
completed when all the data is received.
If the size of received data is greater than the data length to receive, the Ethernet module returns “E052 (h)” as a response
(E052: Abnormal number of data words). In this case, the receive error (ERROR) does not turn ON in M_RECEIVE, and the
received data is discarded.
Note:
If abnormal data is received, the receive end (NDR) does not turn ON and the received data is not stored in the receive buffer.
5) To break the communication channel when communication ends, set OFF the open request (EN_C) of the M_OPEN FB.
VALID turns OFF when the close processing is completed.
* When fixed buffer communication mode is used, set separate ports for sending and receiving.
4-14
Section 4 Communication Procedures
(3) Data format
Command/response
1) Header part
The header part is a header of Ethernet TCP/IP or UDP/IP. When data is sent to the remote node by an application program, the
Ethernet module automatically adds a header to the data before sending it to the remote node. When data is received from the
remote node, the Ethernet module removes the header part from the received data, and sends only the data part to the FB.
2) Data part
The data part is data for Ethernet TCP/IP or UDP/IP. When data is sent to the remote node by M_SEND, a sub-header is added
to the data that is transferred to the send buffer in the Ethernet module. The data with the sub-header is set in the data part of
TCP/IP or UDP/IP, and then sent. When data in binary code is set in the send buffer, it is sent without change. When data in
ASCII code is set in the send buffer, it is sent after converted into ASCII characters.
When data is received from the remote node, the data is stored in the receive buffer in the Ethernet module after the sub-header
is removed from the data part of TCP/IP or UDP/IP. When data in binary code is received, it is stored in the receive buffer without
change. When data in ASCII code received, it is stored in the receive buffer after converted into binary code.
<Command format>
<Response format>
Sub-header
2 bytes
Sub-header
4 bytes
4-15
Section 4 Communication Procedures
<Sub-header>
XXh
7 6 5 4 3 2 1 0
* 1 1 0 0 0 0 0
Command/response type
(The figure shows the state in fixed buffer communication mode)
Command/response flag
0: Command
1: Response
Command Response
End code
Packet of
Data for the number of data specified in
TCP/IP or UDP/IP data length (Max. 2034 bytes)
60h 00h nL nH D1L D1H D2L D2H D3L D3H DnL DnH
n DnH DnL
* Data length indicates the number of bytes of the data that is stored in the send or receive buffer (maximum 1017 words).
4-16
Section 4 Communication Procedures
<Data Binary code (with data swap)>
Packet of
Data for the number of data specified in
TCP/IP or UDP/IP data length (Max. 2034 bytes)
60h 00h nL nH D1L D1H D2L D2H D3L D3H DnL DnH
n DnH DnL
36h 30h 30h 30h nL nH D1H D1L D2H D2L DnH DnL
Automatically set
Send/receive buffer
of NP1L-ET1/ET2
0 D1H D1L
1 D2H D2L
n DnH DnL
4-17
Section 4 Communication Procedures
SX_CPU
R_WRITE FB
Write data Set send data.
1)
R_WRITE FB
Write request
(REQ)
R_WRITE FB
Write end 4)
(DONE) 2)
NP1L-ET1/ET2
3)
Response
Remote node
MICREX-SX
1) Set data to be sent in the send data (SD) of the R_WRITE FB and set ON the write request (REQ).
2) When the write request (REQ) of the R_WRITE FB turns ON, the FB automatically opens a communication channel to the
Ethernet module.
3) When a connection is established, data is written into the remote SX node via Ethernet by the loader command.
4) The remote SX node (SX_CPU) executes the write command issued by R_WRITE and sends the processing result (response)
to the Ethernet module. When the Ethernet module receives a normal end signal, the write end (DONE) turns ON for one
scan.
Note:
If the data writing is not completed normally (no response is returned from the remote node or the end code of the response is
a value other than “0”), the write error (ERROR) turns ON for one scan. In this case, turn OFF the write request once, and then
re-issue it.
No application program for communication is required in the remote node.
4-18
Section 4 Communication Procedures
(2) Data reading
To read data from a remote SX node (memory in CPU), use R_READ.
R_READ automatically opens a communication channel and reads data from a remote node (SX system).
SX_CPU
R_READ FB
Read request
(REQ)
1)
R_READ FB
Read end
(DONE)
NP1L-ET1/ET2
3) Response
2)
(read data)
Remote node
MICREX-SX
1) When the read request (REQ) of the R_READ FB turns ON, the FB automatically opens a communication channel to the
Ethernet module.
2) When a connection is established, a request to read the memory in an SX_CPU is issued to the remote SX node (SX_CPU)
via Ethernet by the loader command.
3) The remote SX node (SX_CPU) executes the read command issued by R_READ and returns the processing result (read
data and status). When the Ethernet module receives a normal end signal and read data, the read end (DONE) turns ON for
one scan.
Note:
If the data reading is not completed normally (no response is returned from the remote node or the end code of the response is
a value other than “0”), the read error (ERROR) turns ON for one scan. In this case, set OFF the read request once, and then
re-issue it.
No application program for communication is required in the remote node.
4-19
Section 4 Communication Procedures
Note:
Loader command communication mode requires no program to open a communication port since a communication port
is automatically opened when the Ethernet interface module starts up.
Notes:
1) There are two modes to open a port: “Passive mode” for receiving data and “Active mode” for sending data.
To send data, the destination node must be ready for receiving data. Therefore, open processing in “passive mode” for
receiving data needs to be completed in advance.
2) If the same port (the same self port and same communication target port) is attempted to be reopened, the connection is
established during the retry that is performed three seconds later because it takes one second to open the socket.
4-20
Section 4 Communication Procedures
(2) FB format
1) For D300win
M_OPEN
UINT MODULE_TYPE
UINT MODE
UINT SUB_MODE
UINT RPORT_NO
UINT SPORT_NO
4-21
Section 4 Communication Procedures
(3) Description of terminals
* When UDP/IP protocol is used, broadcast transmission is available by specifying “255.255.255.255” and partial broadcast
transmission is available by specifying “***.***.***.255.”
Broadcast reception is not available.
4-22
Section 4 Communication Procedures
*2 Communication mode
Set communication conditions for the connection where a channel is to be opened in the following format.
15 (F) 8 7 0
Representation in D300win: UINT#16#****
Representation in Standard loader: H****
Communication protocol
0: TCP/IP
1: UDP/IP
4-23
Section 4 Communication Procedures
<Open mode>
For TCP/IP communication, perform Fullpassive/Unpassive open processing before performing active open processing.
5) Open completed
UDP/IP
UDP/IP provides connectionless communication without the concept of open. However, the operation differs depending on the
selected open mode as follows.
1) Active open mode
The local node communicates only with a node that has the IP and port No. specified in M_OPEN.
Open processing can also be performed by setting both the local node and remote node in Active open mode. If both nodes
are set in passive open mode, the connection cannot be established.
2) Fullpassive open mode
The operation in Fullpassive open mode is the same as in Active open mode.
3) Unpassive open mode
The local node can communicate with any node. (The IP address and port No. of the communication partner node specified in
M_OPEN are ignored.) After setting ON the open request ("EN_C" of M_OPEN), the local node waits to receive data from the
communication partner node. It cannot send data before receiving the first data. Once data communication is performed, the
local node stores the information on the partner node and thereafter communicates only with it.
Set OFF the open request ("EN_C" of M_OPEN) to reset the stored information and make the local node ready for being
accessed from any node again.
4-24
Section 4 Communication Procedures
<Destination Addition mode>
Destination Addition mode is supported by V34 or later version of Ethernet interface modules. This setting is only enabled in
"general purpose communication mode."
(For Ethernet built in SPH2000, this setting is also enabled in “fixed buffer communication mode.”)
When Destination Addition mode is enabled, the first four words of data are used as a destination information area.
When communicating with an arbitrary node in Unpassive open mode of TCP/IP communication or in UDP/IP communication,
enable this mode to obtain the IP address and port No. of the communication partner node.
An application program on the PLC side uses data shown below.
Information on the first four bytes of the data is not sent to the communication partner. (Only send/receive data part is
exchanged.)
• TCP/IP
Sending Receiving
IP address of
Reserved
communication partner (L)
IP address of
Reserved
communication partner (H)
Max. Max.
1021 words Port No. of 1021 words
Reserved
communication partner
• UDP/IP
Sending Receiving
IP address of IP address of
communication partner (L) communication partner (L)
IP address of IP address of
communication partner (H) communication partner (H)
Max. Max.
Port No. of 1021 words Port No. of 1021 words
communication partner communication partner
4-25
Section 4 Communication Procedures
<Send data length selection>
"Send data length selection" is supported by V37 or later version of Ethernet interface modules. This setting is only enabled in
"general purpose communication mode."
When “Word” is selected, data is sent in units of words (the same operation as V36 or earlier versions) The FB sends the
specified number of words (SIZE) from the beginning of the data that is set in the send area ("SD" of M_SEND). (Range of the
number of words: 1 to 1017 words)
When “Byte” is selected, data is sent in units of bytes (this setting has been newly added to V37). In the first word of the data
that is set in the send area, enter the number of bytes in hexadecimal that you would like to send to the Ethernet communication
channel. In the second and the following words, set data to be practically sent. Data set in the second and the following words
are sent to the channel. (Range of the number of bytes: 1 to 2034 bytes)
* When “Byte” is selected, “Destination Addition mode” cannot be used together. If “Byte” is selected with Destination Addition
mode enabled, the setting is ignored and the operation is the same as when “Word” is selected.
When the number of bytes is an odd number, the last one byte of the data becomes as follows according to the data swap
setting.
• When data swap is disabled
The last one byte is entered on the low-order side.
Packet of
TCP/IP or UDP/IP
Send byte
length
D1H D1L
D2H D2L
D3H D3L
DnL
Packet of
TCP/IP or UDP/IP
Send byte
length
D1H D1L
D2H D2L
D3H D3L
DnH
<Data swap>
When the transmission code is set to binary, the treatment of high bytes and low bytes of transmission data are reversed.
When the transmission code is set to ASCII, disable the data swap.
4-26
Section 4 Communication Procedures
<Automatic reopen>
If Automatic Reopen mode is enabled in “Fullpassive” or “Unpassive” open mode, the Ethernet module automatically performs
close processing when it receives a close request from the remote node after the connection is established, and then
automatically starts waiting for an open request.
*3 Communication submode
“Communication submode” specifies whether or not to enable receipt confirmation when data is sent using TCP/IP protocol.
1) Operation when receipt confirmation is disabled (SUB_MODE = 0 [UINT#0])
Sneding
M_SEND completed
DONE → ON
ACK
SX bus Ethernet
* Data sending is completed when the data is sent onto Ethernet without waiting for ACK from the remote node.
Sneding ACK
M_SEND completed
DONE → ON
SX bus Ethernet
* Data sending is completed after the Ethernet module receives ACK from the remote node.
4-27
Section 4 Communication Procedures
<Notes on when “receipt confirmation” is disabled in communication submode>
When “receipt confirmation" is disabled, the Ethernet module retries sending for five minutes if a communication error occurs
(for example, power interruption or LAN cable disconnection in the partner device). No error occurs in the M_OPEN or M_SEND
FB during and after retry, therefore, it is necessary to detect the error by an application program using a timer instructions, for
example, after M_SEND starts up.
In addition, another M_OPEN or M_SEND FB cannot be executed during retry operation. In other words, if a communication
error occurs, the port becomes unavailable for five minutes.
If a communication error occurs when “receipt confirmation" is enabled, "ERROR" of M_SEND turns ON for one scan after the
period of time specified in “TCP sending and receiving timeout value (30 seconds by default)” has elapsed, and "STATUS"
outputs an error code 195. In this mode, another M_OPEN or M_SEND FB can be executed after an error is detected. (No
need to wait for five minutes.)
Usually, enable receipt confirmation.
*4 Status
The table below shows errors that occur during open processing.
4-28
Section 4 Communication Procedures
(2) FB format
1) For D300win
FB No. (instance name)
M_SEND_
Data type Data type
M_SEND
STATUS INT
ANY SD SD ANY
UINT SIZE
4-29
Section 4 Communication Procedures
(3) Description of terminals
Terminal function Terminal name Data
I/O Description
name (parameter) type
Send request REQ BOOL IN Data set in “SD” is sent at the rising edge of this signal.
Connection No. CON_NO UINT IN Set the connection No. that is opened by M_OPEN.
Connect the “CON_NO” terminal of M_OPEN to this terminal.
Send data size *1, 2 SIZE UINT IN Set the size of data to be sent in units of words.
Send data *3, 4 SD ANY IN-OUT Connect a variable where data to be sent is stored.
Send end DONE BOOL OUT Turns ON for one scan when the message sending is
completed normally.
Send error ERROR BOOL OUT Turns ON for one scan when the message sending ends
abnormally.
Status *5 STATUS INT OUT Outputs the result of the message sending by a status code.
*1 When “Destination Addition mode” is enabled, four words of destination information are added to the send buffer.
The send data size "SIZE" must be the send data size plus four words.
*2 When “byte” is selected for “send data length selection,” the first one word of the send buffer is the data size.
The send data size "SIZE" must be the send data size plus one word.
*3 When “Destination Addition mode” is enabled, four words of destination information are added to the send buffer.
The send data “SD” must be the send data size plus four words.
*4 When “byte” is selected for “send data length selection,” one word of send size information is added to the send buffer.
The send data “SD” must be the send data size plus one word.
*5 Status
4-30
Section 4 Communication Procedures
Notes:
1) Up to 1017 words of data can be received at a time.
2) During message receiving (until “NDR” or “ERROR” turns ON after the rising edge of “EN_R”), keep “EN_R” ON.
Turning OFF “EN_R” halts message receiving.
3) Turning ON “EN_R” again resumes message receiving after being halted. Even if “CON_NO,” “SD,” or “SIZE” has been
changed, the receiving is resumed using the values set before being halted. The change is not reflected to the message
receiving processing
4) If “EN_R” remains ON in the next scan after the message receiving is completed, new message receiving processing starts.
5) Do not change “RD” during message receiving. Otherwise, the receive data cannot be guaranteed.
6) If the number of data specified in “SIZE” exceeds the variable size specified in “RD,” the data for the excess part becomes
undefined. Be sure to enter the specified variable size for “SIZE.”
7) The receive request “EN_R” must be programmed to be turned ON after “VALID” of M_OPEN turns ON.
(2) FB format
1) For D300win
FB No. (instance name)
M_RECEIVE
STATUS INT
ANY RD RD ANY
UINT SIZE
4-31
Section 4 Communication Procedures
(3) Description of terminals
*1 When “Destination Addition mode” is enabled, four words of destination information are added to the receive buffer.
The receive data size "SIZE" must be the receive data size plus four words.
*2 When “Receive data length storage” is enabled,” one word of receive data length is added to the top of the receive buffer.
The receive data size "SIZE" must be the receive data size plus one word.
*3 When “Destination Addition mode” is enabled, four words of destination information are added to the receive buffer.
The receive data “RD” must be the receive data size plus four words.
*4 When “Receive data length storage” is enabled,” one word of receive data length is added to the top of the receive buffer.
The receive data “RD” must be the receive data size plus one word.
*5 Status
Note:
According to the “working information” of detail RAS, check the following items:
• SMC send 16 collision (offset address: 00000020)
• SMC send memory allocation incomplete (TASK) (offset address: 00000028)
• SMC send memory allocation (INT) (offset address: 00000030)
• SMC receive overrun (offset address: 00000090)
• SMC receive USNET buffer full (offset address: 000000A0)
If any of these counters is up, the load of the network line may be too heavy. Reduce the load of the network line.
4-32
Section 4 Communication Procedures
<Notes on using M_SEND and M_RECEIVE>
1) In general purpose communication mode using UDP/IP protocol, neither receipt confirmation nor flow control is performed.
If the processing on the receiver side is too slow, the receive buffer becomes full and the data sent thereafter is discarded.
As a result, mismatch occurs between the number of data sent from the sender and the number of data received by the
receiver.
Since it takes approximately 10 seconds to release the buffer that becomes full, data receive processing may be halted
in the interim.
2) In Full Passive open mode, if the FB receives an open request from a remote node whose IP address and/or port No. do not
match, the connection is established first, and then Full Passive side issues a close request to the Active side.
As a result, on the Active side, “channel forcible close” error (error code 199) occurs after port open processing is completed
normally and data is sent.
3) If the port No. on the sender side does not match that on the receiver side, a send error occurs and the sender side forcibly
closes the port. As a result, “channel forcible close” error (error code 199) occurs.
4) During communication between MICREX-SX devices, if one-word sending operation is performed consecutively, the receiver
side may receive two words by linking the first received one word with the second received one word depending on the
timing of M_RECEIVE. When one-word data is sent, the buffer area for two words must be secured on the receiver side.
When two or more words are sent, the buffer area for the same number of words as that of send data must be secured on
the receiver side.
5) When data is sent after converted into ASCII code in general purpose communication mode using UDP/IP protocol, if the
number of bytes of send data exceeds 1017, the sender side divides the data into two pieces and performs the send
processing twice to send them separately. Therefore, the receiver side needs to receive a receive request twice. In addition,
the buffer area of the receiver side must be greater than the send data.
4-33
Section 4 Communication Procedures
Notes:
1) “REQ” is enabled at its rising edge, however, additional “REQ” command is disabled during data writing (until “DONE” or
“ERROR” turns ON after the rising edge of “REQ.”)
2) Do not change “SD” during data writing. Otherwise, the write data cannot be guaranteed.
3) When “VAR_TYPE” is set to 0, “SIZE” is not limited. When set to a value other than 0, “SIZE” is limited by the
communication module through which data is written.
4) If the number of data specified in “SIZE” exceeds the variable size specified in “SD,” the data for the excess part becomes
undefined. Be sure to enter the specified variable size for “SIZE.”
5) To execute “R_WRITE” consecutively, set the default maximum TCP end timer value to 0.
6) To execute “R_READ and/or “R_WRITE,” set the self port standard No. and communication target port standard No. to the
default values (256).
(2) FB format
1) For D300win
R_WRITE
UDINT STATION_NO
UINT VAR_TYPE
UINT SIZE
ANY SD SD ANY
4-34
Section 4 Communication Procedures
2) For Standard loader
4-35
Section 4 Communication Procedures
*1 Target variable to access (REMOTE_VAR)
Specify the destination memory in the SX_CPU in the following format:
<For D300win>
15 0
CPU No.
UINT type array Memory type
with data of 4 elements
Low byte of address
*2 Status
4-36
Section 4 Communication Procedures
Notes:
1) additional “REQ” command is disabled during data reading (until “DONE” or “ERROR” turns ON after the rising edge of
“REQ").
2) Do not change “RD” during data reading. Otherwise, the read data cannot be guaranteed.
3) When “VAR_TYPE” is set to 0, “SIZE” is not limited. When set to a value other than 0, “SIZE” is limited by the
communication module through which data is read.
4) If the number of data specified in “SIZE” exceeds the variable size specified in “RD,” another variable area is rewritten. Be
sure to enter the specified variable size in “SIZE”.
5) To execute “R_READ” consecutively, set the default maximum TCP end timer value to 0.
(2) FB format
1) For D300win
R_READ
UDINT STATION_NO
UINT VAR_TYPE
UINT SIZE
ANY RD RD ANY
4-37
Section 4 Communication Procedures
2) For Standard loader
4-38
Section 4 Communication Procedures
*1 Target variable to access (REMOTE_VAR)
Specify the destination memory in the SX_CPU in the following format:
<For D300win>
15 0
CPU No.
UINT type array Memory type
with data of 4 elements
Low byte of address
*2 Status
4-39
Section 5 Sample Programs
This section introduces sample programs for D300win loader. When you use Standard loader, create sample programs using
the following examples as a reference.
<System configuration>
Hub
Configuration A Configuration B
(sender side) (receiver side)
MICREX-SX MICREX-SX
Ethernet interface module A Ethernet interface module A
SX bus station No.: 1 SX bus station No.: 3
IP address: 192.0.0.7 IP address: 192.0.0.8
5-1
Section 5 Sample Programs
(1) Project tree
The sample program shown above has the following project tree configuration.
Configuration A
Data sending side
Assigned to the default task
* In this example, the name "WORD_1_5" is given so that the starting and end element Nos. of array and the data type of
elements can be known.
5-2
Section 5 Sample Programs
2) Local variable worksheet
3) Code worksheet
Always fixed to 0
Always fixed to 1
Receipt confirmation
is enabled
15 8 7 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
Communication mode
001: General Purpose Communication mode
Open mode Automatic reopen
00: Active 0: Disabled (Always fixed to 0 on the active side)
5-3
Section 5 Sample Programs
(4) Data receiving program (configuration B side)
1) Global variable worksheet
3) Code worksheet
Always fixed to 0
Always fixed to 0
Receipt confirmation
is enabled
15 8 7 0
1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0
Communication mode
001: General Purpose Communication mode
Open mode Automatic reopen
10: Unpassive 1: Enabled
5-4
Section 5 Sample Programs
<System configuration>
Hub
Configuration A Configuration B
(read/write requesting side) (loader command responding side)
MICREX-SX MICREX-SX
Ethernet interface module A Ethernet interface module A
SX bus station No.: 1 SX bus station No.: 3
IP address: 192.0.0.7 IP address: 192.0.0.8
5-5
Section 5 Sample Programs
(1) Project tree
The sample program shown above has the following project tree configuration.
Code worksheet
POU for data reading
Variable worksheet
Code worksheet
* In this example, the names "WORD_1_5" and "UINT_1_4" are given so that the starting and end element Nos. of array
and the data type of elements can be known.
5-6
Section 5 Sample Programs
(3) Data writing program
1) Local variable worksheet
2) Code worksheet
Start to write
Always fixed to 0
IP address of
remote node
Always fixed to 0
Write data →
5-7
Section 5 Sample Programs
(4) Data reading program
1) Local variable worksheet
2) Code worksheet
Start to read
Always fixed to 0
IP address of
remote node
Always fixed to 0
Read data
5-8
Section 6 Failure Diagnosis
6-1
Section 6 Failure Diagnosis
<Content of bus transmission>
Click the [Bus transmission] tab to display the following information.
6-2
Section 6 Failure Diagnosis
<Content of dump list>
Click the [Dump list] tab to display the following information.
Maximum
number of data
Pointer to newest data
Pointer to the top of data part Data size
Reserved
+04h
Reserved
+08h Error code * For the error codes, see (9) Error code.
+F5h
6-3
Section 6 Failure Diagnosis
(4) SX bus message communication count information
This function stores the total number of SX bus message communication operations.
6-4
Section 6 Failure Diagnosis
(5) Initializing information
The "Initializing information" area displays information such as the Ethernet address, IP address, and gateway setting of the
Ethernet module.
Initializing information consists of top address and data part, as shown below.
6-5
Section 6 Failure Diagnosis
The tables below show the contents of the data part.
This information includes network parameter setting of the Ethernet module that is downloaded from the loader.
Although the setting in the loader is made in decimal, it is stored in hexadecimal in the initializing information.
Note:
Item No. 16 and the following items are supported by the following version of loader and Ethernet module.
• NP1L-ET1/ET2 firmware version: V36 or later
• D300win: V3.1.2.0 or later version, or
Standard loader: V2.0.0.0 or later version
6-6
Section 6 Failure Diagnosis
(6) Communication channel information
The communication channel information area displays information at the time when communication channels specified by the
client port number of the Ethernet module opened (for 16 channels at the maximum). The displayed information includes the
communication mode, port No. of local module and the port No. of remote node.
0198:0000 0000 0000 0000 0000 0000 0000 0000 Client port
01A0:0000 0000 0000 0000 0000 0000 0000 0000 (channel information 16)
01A8:0000 0000 0000 0000 0000 0000 0000 0000
+00h
Server port Server port
+29h
+30h Communication mode
* For the details of the communication mode,
see "4-4-2 Open channel (M_OPEN)."
+31h Port No. of local module
+32h IP address (L) of remote node
Client port
+33h IP address (H) of remote node (channel information 1)
+34h Port No. of remote node
+34h
Not used
(Fixed to 0)
+47h
Client port
+1AFh (channel information 16)
6-7
Section 6 Failure Diagnosis
(7) Channel communication state information
"Channel communication state information" area displays the information when individual communication channels specified by
client port No. of the Ethernet module open (for 16 channels at the maximum). The first 48 words indicate the communication
status of the server port.
Client port
0198:0000 0000 0000 0000 0000 0000 0000 0000
(communication status of channel 16)
01A0:0000 0000 0000 0000 0000 0000 0000 0000
01A8:0000 0000 0000 0000 0000 0000 0000 0000
+00h Open status code +08h Status of fixed buffer overwrite +10h Send count
Open error code Number of receive data Send error count
Send status code Sending processing time (max.) Receive count
Send error code Sending processing time (min.) Receive error count
Fixed buffer communication mode response code Sending processing time (latest) Not used
Number of send data Receiving processing time (max.) Not used
Receive status code Receiving processing time (min.) Not used
+07h Receive error code +0Fh Receiving processing time (latest) +17h Not used
6-8
Section 6 Failure Diagnosis
1) Open status code
Indicates the open status of a channel. 0: Not open, 1: Opening, 2: Already open, 3: Closing, 8xh: Forcible close
2) Open error code
Stores a binary value for the error code that occurred while opening a channel.
For the details of open error codes, see "(9) Error code."
* The error code is cleared when the next open processing is normally completed or communication is started.
3) Send status code
Indicates the sending status. 0: No send request or sending completed, 1: Sending
4) Send error code
Stores a binary value for the error code that occurred while sending data.
For the details of open error codes, see "(9) Error code."
* The error code is cleared when the next open processing is normally completed, communication is started, or the sending is
normally completed.
5) Fixed buffer communication mode response code
Stores a binary value for the end code of the response that is returned when sending data in fixed buffer communication. For the
details of the end code of a response, see “4-3-2 Communication in fixed buffer communication mode."
* The error code is cleared when the next open processing is normally completed or communication is started.
6) Number of send data
Stores a binary value for the number of send data specified when send request is issued. If no send request has been issued, 0
is stored.
* The error code is cleared when the next open processing is normally completed or communication is started.
7) Receive status code
Indicates the receiving status. 0: No receive request or receiving completed, 1: Receiving, 2: Receive data exists (when there is
no receive request)
8) Receive error code
Stores a binary value for the error code that occurred while receiving data.
For the details of open error codes, see "(9) Error code."
* The error code is cleared when the next open processing is normally completed, communication is started, or the receiving is
normally completed.
9) Status of fixed buffer overwrite
Indicates whether or not the Ethernet module received data again (whether or not overwriting occurred) from when it receives
data from the remote node until it sends a response in fixed buffer communication mode.
0: Fixed buffer overwriting not occurred, 1: Fixed buffer overwriting occurred
* Fixed buffer overwriting status is cleared when the next open processing is normally completed or communication is started.
10) Number of receive data
Stores a binary value for the number of bytes of receive data that is transferred to the receive data storage area during receipt
confirmation after a data receive request is issued.
11) Sending processing time
Stores the maximum, minimum and current values of the sending processing time in each communication.
(a) Stores processing time as a binary value in steps of 10 ms.
(b) Stores the time from when the Ethernet module starts sending data onto the line until it notifies the CPU module of the
completion of the sending.
* This data is cleared when the next open processing is normally completed or communication is started.
12) Receiving processing time
Stores the maximum, minimum and current values of the receiving processing time in each communication.
(a) Stores processing time as a binary value in steps of 10 ms.
(b) Stores the time from when the Ethernet module starts receiving data from the line until it notifies the CPU module of the
completion of the receiving.
6-9
Section 6 Failure Diagnosis
13) Send count
Stores the total number of successfully completed operations for sending data to another node.
(a) Counted when the communication of command and response is normally completed.
(b) Counted when any of the following communications is normally completed.
• Sending data to another node in fixed buffer communication mode
• Sending data to another node in general purpose communication mode
• Transferring files to another node during server FTP/TFTP communication
• Transferring files to another node during client FTP/TFTP communication
* This data is cleared when the next open processing is normally completed or communication is started.
14) Send error count
Stores the total number of communication errors that occurred while sending data to another node (when the communication of
command and response ended abnormally).
* This data is cleared when the next open processing is normally completed or communication is started.
15) Receive count
Stores the total number of successfully completed operations for receiving data from another node.
(a) Counted when the communication of command and response is normally completed.
(b) Counted when any of the following communications is normally completed.
• Receiving data from another node in fixed buffer communication mode
• Receiving data from another node in general purpose communication mode
• Transferring files from another node during server FTP/TFTP communication
• Transferring files from another node during client FTP/TFTP communication
* This data is cleared when the next open processing is normally completed or communication is started.
16) Receive error count
Stores the total number of communication errors that occurred while receiving data from another node (when the communication
of command and response ended abnormally).
* This data is cleared when the next open processing is normally completed or communication is started.
6-10
Section 6 Failure Diagnosis
(8) Node connect information
Node connect information area displays the intensive information on the communication status of the individual communication
channels specified by the client port No. of the Ethernet module (for 16 channels at the maximum).
6-11
Section 6 Failure Diagnosis
(9) Error code
The error codes and contents that are stored in the “error logging information”, “Channel communication state information” or “node
connect information” areas are described below.
15 8 7 0
1st word
6-12
Section 6 Failure Diagnosis
<Detailed error codes of each error type>
1) Parameter error
2) Sequence error
6-13
Section 6 Failure Diagnosis
4) Communication error between physical layer and transport layer
6-14
Section 6 Failure Diagnosis
(10) Working information
"Working information" consists of counter information and supplementary information. The counter information indicates the
number of occurrences of an event. The supplementary information is updated to the latest information every time an event
occurs.
This RAS information is supported by D300win the version of which is V3.1.0.0 or later, or V2.2.4.0 or later, and the Ethernet
module the software version of which is V34 or later.
The working information is classified into the following 5 groups:
6-15
Section 6 Failure Diagnosis
6-16
Section 6 Failure Diagnosis
<Related to USNET socket I/F>
6-17
Section 6 Failure Diagnosis
<Related to the processing of APP part>
6-18
Section 6 Failure Diagnosis
<Related to PING sending>
* The "Communication channel information," "Channel communication state information," and "Node connect information" areas
do not output information related to PING communication.
6-19
Section 6 Failure Diagnosis
[Running status information occurrence conditions]
<Related to Ethernet communication SMC91C111 (LANC)>
6-20
Section 6 Failure Diagnosis
<Related to Ethernet communication SMC91C111 (Physical)>
6-21
Section 6 Failure Diagnosis
<Related to SBM communication>
6-22
Section 6 Failure Diagnosis
6-23
Appendix 1 Loader Command
Note:
The "CPU batch initialize and start" and "CPU individual initialize and start" commands start the CPUs after clearing the retain
memory.
Personal computer
Request command
Ethernet
Response command
MICREX-SX
* The response monitoring time on the personal computer side must be 3 seconds or more.
App.1-1
Appendix 1 Loader Command
DP (Fixed to FBh)
Data part
(Max. 492 bytes)
App.1-2
Appendix 1 Loader Command
<Detail description of transmission data>
1) TCP/IP header part
For request commands, the personal computer adds this part at the top of the transmission data part of a loader command.
For response commands, the Ethernet module adds this part at the top of the transmission data part when returning response
data. Normally, the Ethernet communication driver automatically adds this part, therefore, the user do not need to pay attention
to it.
2) DP (Destination Port)
For request (PC to PLC)
DP is a destination port No. on the destination module (not TCP/IP port No.). This is specified by the requester.
* Usually, 251 (FBh), which is the loader interface server port on CPU0, is specified.
* To access CPU0, 253 (FDh), which is the loader command server port, can be specified.
* The positions of DP and SP are replaced in response data.
For response (PLC to PC)
The same DP as the one sent by the sender is returned.
3) SP (Source Port)
SP is a requester port No. on the source module. This is specified by the requester and fixed to 128 (80h).
For request (PC to PLC)
Fixed to 80h.
* The positions of DP and SP are replaced in response data.
For response (PLC to PC)
SP is any number from 80 to 87h. (The PLC automatically determines an arbitrary No.)
4) Transaction
“Transaction" specifies Yes or No of transaction, request or response, and a transaction ID.
Set Yes or No of transaction on the requester side (PC). Dynamically assign the transaction ID on the PC side when issuing a
request. The Ethernet module sets the response bit when returning a response.
* The requester (PC) side must set the transaction ID and also perform transaction ID collation of response data.
7 0
5) Transmission status
"Transmission status" indicates the result of transmission via SX bus or network
* Fixed to 00h for request commands.
* For response commands, any value other than 00h means abnormal end. The meaning of each codes is the same as that of
“operation status."
App.1-3
Appendix 1 Loader Command
6) Operation status
"Operation status" indicates the result of operations requested by a loader command. Check the operation status in response
commands on the personal computer side. Set FFh (fixed) to issue a request command.
<Status list>
* In cases other than redundant mode, you can also access CPU0 by setting the connection mode to “7Ah” and the connection
ID to “00h.”
8) Command, Mode
Command: Indicates the major classification code of the command
Mode: Indicates the detail code of the command
For the details of commands and modes, see “Appendix 1-3 Details of Loader Commands.”
App.1-4
Appendix 1 Loader Command
1) Command/mode code
Command: 00h, Mode: 00h
Read data
.
.
.
* Set the memory address and number of words of read data in hexadecimal.
App.1-5
Appendix 1 Loader Command
4) Example of data read command
[For D300win]
The table below shows the command part for reading 2-word data beginning with %MW1.1000 of the standard memory in the
CPU module (CPU station No. 0). (Data in the case of %MW1.1000 = WORD#16#1234 and %MW1.1001 = WORD#16#5678)
[For Standard loader]
The table below shows the command part for reading 2-word data beginning with WM1000 of the standard memory in the CPU
module (CPU station No. 0). (Data in the case of WM1000 = H1234 and WM1001 = H5678.)
App.1-6
Appendix 1 Loader Command
<Memory type code>
The table below shows the memory type codes for individual MICREX-SX internal memories.
Notes:
1) When accessing the broadcast area of the PE-link module by a command, the address does not begin with 0.
See the following address correspondence table.
2) When accessing the broadcast area of the P-link module by a command, the high-speed bit area, high-speed word area,
and low-speed word area are not consecutive. See the following address correspondence table.
App.1-7
Appendix 1 Loader Command
1) Command/mode code
Command: 01h, Mode: 00h
12 34 34 Connection ID (H) 00 00
56 78 12 Fixed to 11h 11 11
78 Fixed to 00h 00 00
56 Fixed to 00h 00 00
Fixed to 00h 00 00
4) Example of write data command Fixed to 00h 00 00
[For D300win]
Fixed to 00h 00 00
When writing 1-word data to the retain memory
%MW3.1 of the CPU module (CPU station No. 0), Command 01 01
the command part will be as shown in the right table.
Mode 00 00
(Write data: WORD#16#1234)
Fixed to 00h 00 00
[For Standard loader] Fixed to 01h 01 01
When writing 1-word data to the retain memory WL1
of the CPU module (CPU station No. 0), the command Number of bytes in data part (L) 08 06
part will be as shown in the right table. Number of bytes in data part (H) 00 00
(Write data: H1234)
Memory type 04 04
Memory address (L) 01 01
Memory address (M) 00 00
Memory address (H) 00 00
Number of write words (L) 01 01
Number of write words (H) 00 00
34 -
Read data
12 -
App.1-8
Appendix 1 Loader Command
1) Command/mode code
Command: 04h, Mode: 00h
App.1-9
Appendix 1 Loader Command
1) Command/mode code
Command: 04h, Mode: 01h
App.1-10
Appendix 1 Loader Command
1) Command/mode code
Command: 04h, Mode: 02h
App.1-11
Appendix 1 Loader Command
1) Command/mode code
Command: 04h, Mode: 03h
App.1-12
Appendix 1 Loader Command
1) Command/mode code
Command: 04h, Mode: 04h
App.1-13
Appendix 1 Loader Command
1) Command/mode code
Command: 04h, Mode: 05h
App.1-14
Appendix 1 Loader Command
1) Command/mode code
Command: 04h, Mode: 06h
App.1-15
Appendix 1 Loader Command
1) Command/mode code
Command: 04h, Mode: 07h
App.1-16
Appendix 2 Wiring for Ethernet
Max. 100 m
NP1L-ET1 NP1L-ET1
Multi-port transceiver
Max. 50 m
AUI cable
NP1L-ET2 NP1L-ET2
App.2-1
Appendix 2 Wiring for Ethernet
Transceiver
Metal duct
Control panel
Ferrite core
12 VDC
power supply
Note:
The above wiring and layout may not be able to completely remove noise. Therefore, for TCP sending, be sure to set a
proper timeout value for sending operation, taking retry into consideration. For UDP/IP communication, be sure to execute
retransmission by user application program.
App.2-2
Appendix 3 Receive Data Packet Merging Phenomenon
1) 2) 3)
Data Data Data Data
App.3-1
Appendix 3 Receive Data Packet Merging Phenomenon
<Conditions for causing receive data packet merging phenomenons>
Under the following conditions, receive data packet merging phenomenons are more likely to occur.
1) When data are frequently sent from an external device
The received data are moved from Memory A to Memory B every 10 ms. If data are sent more frequently, a data packet
merging phenomenon occurs.
2) When two or more "M_SEND/M_RECEIVE" FBs are executed by using two or more communication modules
(Also when two or more "M_SEND/M_RECEIVE" FBs are executed by using two or more ports by one Ethernet module)
When data are stored in Memory B, M_RECEIVE is executed to read them. Processing of M_RECEIVE ends within a
maximum of 100 ms (for 1017 words), however, the processing time is increased if other M_SEND/M_RECEIVE FBs are
executed (increased by 15 ms for one M_SEND/M_RECEIVE FB). Use the following formula to calculate the approximate
processing time.
Processing time (T) = 100 ms +15 ms × (Total number of M_SEND/M_RECEIVE FBs being executed - 1)
If the Ethernet module receives data from an external device during processing of M_RECEIVE, data movement from
Memory A to Memory B is temporarily suspended and a data packet merging phenomenon occurs in Memory A.
To prevent this phenomenon, the external device must send data at intervals longer than the above processing time (T).
If the external device needs to send data more frequently, take measures described on the next page on both the external
device and Ethernet module.
App.3-2
Appendix 3 Receive Data Packet Merging Phenomenon
<Measures against data packet merging phenomenons>
In a system where data packet merging phenomenons occur, divide data on both the external device and CPU as needed.
Example measures are described below.
1) Reading the first received data. 2) Reading the second received data.
App.3-3
Appendix 3 Receive Data Packet Merging Phenomenon
<When merged data length exceeds 1017 words>
When the length of data received from an external device is long, a data dividing phenomenon may occur besides data packet
merging phenomenons. Operation of a data dividing phenomenon is described below.
■ Operation example
The following describes an operation example where the Ethernet module receives 600 words of data twice in a row and a data
merging phenomenon occurs.
1) Data 1 (600 words) and Data 2 (600 words) are merged and stored in Memory A (1200 words in total).
2) When data in Memory A are moved to Memory B, data for the buffer size of Memory B (1017 words) are moved.
Concretely, all of Data 1 and the first 417 words of Data 2 (1017 words in total) are moved to Memory B.
The remaining 183 words of Data 2 remain in Memory A.
3) Executing the M_RECEIVE FB reads 1017 words of data to memory C. (Memory B is released.)
1) 2) 3)
Data 1 Data 1 Data 1
+ +
Part of Part of
Data 2 Data 2
Data 2
Data 2
Buffer size:
1017 words
4) When Memory B is released, the remaining part of Data 2 (183 words) still in Memory A is moved to Memory B.
5) Executing the M_RECEIVE FB reads 183 words of data to Memory C.
In Memory C, the specified memory is overwritten every time M_RECEIVE is executed. Therefore, copy the data to another
memory using an application program every time M_RECEIVE is completed (when NDR turns ON).
4) 5)
Remaining Remaining Remaining
part of Data 2 part of Data 2 part of Data 2
* You can download a sample program to handle data merging phenomenons (Program No.: Etehr001) from Fuji Electric website
(Fe Library).
App.3-4
Appendix 4 Notes on Module Replacement
Therefore, after you replace an Ethernet module, you need to write (download) such data to the replaced module. Usually, select
"Module driver" on the "Download loader -> CPU" dialog box in the loader, and then write the data.
Note that if you download a user program to a user ROM and then turns the PLC off and on again with the user ROM inserted in
the CPU, the "program" and "system definition" are automatically downloaded to the CPU, but not the "module driver."
(Module driver can not be updated by the user ROM.)
* You cannot upload these data (from the Ethernet module to the loader). Management of original data is important. With V36 or
later version of Ethernet modules, you can check them using the failure diagnosis function of the loader.
For the details, see "(5) Initializing information."
To transfer "Ethernet parameter" to the Ethernet module, perform either of the following operations.
1) Transfer it using a loader. (Download the module driver.)
2) Transfer it using a user program.
For how to transfer using a user program, see "Appendix 4-1-2 How to transfer Ethernet parameter using a program."
App.4-1
Appendix 4 Notes on Module Replacement
* The Ethernet parameter is written into the internal flash memory of the Ethernet module. The maximum number of
rewrite times of the flash memory is 100,000 times in general.
Avoid frequently rewriting the internal flash by the F_WRITE FB.
App.4-2
Appendix 4 Notes on Module Replacement
<Data arrangement of Ethernet parameter>
The table below shows the data arrangement of the Ethernet parameter. The data size is fixed to 48 words. (Be sure to write all
of 48 words of data in a batch.)
*1
0000 0000 0000 00**
Close process during TCP sending timeout
This setting is disabled.
Regardless of the setting, this bit is set ON in the module.
App.4-3
Appendix 4 Notes on Module Replacement
<Variable declaration>
<Program>
App.4-4
Appendix 4 Notes on Module Replacement
<Program (Continued from preceding page)>
App.4-5
Appendix 4 Notes on Module Replacement
<Program (Continued from preceding page)>
App.4-6
Appendix 4 Notes on Module Replacement
(2)-1 For Standard V2 loader
<Initial Data List>
On the "Initial Data List" dialog box, define the character string "D:\PCTCP1.INI" in WM50 to WM63.
App.4-7
Appendix 4 Notes on Module Replacement
<Program>
App.4-8
Appendix 4 Notes on Module Replacement
<Program (Continued from preceding page)>
App.4-9
Appendix 4 Notes on Module Replacement
<Program (Continued from preceding page)>
App.4-10
Appendix 4 Notes on Module Replacement
<Program (Continued from preceding page)>
App.4-11
Appendix 4 Notes on Module Replacement
(2)-2 For Standard V3
Click the "Device" icon on the project view to open the device window. Then, select "WM" from the dropdown list.
Enter ASCII codes corresponding to the character string "D:\PCTCP1.INI" in the "Initial Value" boxes from WM50 to WM63.
App.4-12
Appendix 4 Notes on Module Replacement
<Program>
App.4-13
Appendix 4 Notes on Module Replacement
<Program (Continued from preceding page)>
App.4-14
Appendix 4 Notes on Module Replacement
<Program (Continued from preceding page)>
App.4-15
Appendix 4 Notes on Module Replacement
<Program (Continued from preceding page)>
App.4-16
Appendix 4 Notes on Module Replacement
The reason is that the Ethernet device (or a hub or router connected in-between) stores the MAC address of the communication
partner (learning function). Since it is held for a certain period of time even after the communication partner stops communication
or does not exist, communication with a different MAC address is failed. This period is referred to as “Aging Time.”
This condition occurs when Fuji Ethernet module is in passive open mode (Unpassive/Fullpassive) in TCP/IP communication or
communication begins with receiving operation in UDP/IP communication. In these cases, the communication partner performs
sending (or opening) operation first. Therefore, if the Ethernet module is replaced and the MAC address is changed,
communication is failed.
When the Ethernet module is in active open mode in TCP/IP communication or communication begins with sending operation
in UDP/IP communication, the local station performs sending (or opening) operation first to rewrite the MAC address that is
stored in the communication partner. Therefore, communication can be performed.
The above uncommunicable state is eliminated after “Aging Time” passes or by turning the power of the target device (or a hub
or router connected in-between) off and then on again.
<FYI>
The aging time of the Fuji Ethernet module is one minute (fixed). For information on the aging time of the target device, contact
the maker. The aging time of hubs is generally set to approximately 5 minutes.
App.4-17
Appendix 5 PING Sending Function
PING sending
Target node
App.5-1
Appendix 5 PING Sending Function
Note:
1) Additional “REQ” command is disabled during PING processing (until “DONE” or “ERROR” turns ON after the rising edge of
“REQ").
(2) FB format
1) For D300win
FB No. (instance name)
R_READ
UDINT STATION_NO
UINT VAR_TYPE
UINT SIZE
ANY RD RD ANY
App.5-2
Appendix 5 PING Sending Function
1) For Standard loader
App.5-3
Appendix 5 PING Sending Function
*1 PING monitoring time (REMOTE_VAR)
Specify the monitoring time of PING responses in the following format:
15 (F) 0
H0004
H0001
H0008
*2 Status
Status
Meaning Description Substatus
code
0 Normal • The Ethernet module receives a response from the target node. Note 1
164 Send error • No target module exists at the station No. specified in MODULE_NO. -
171 Internal resources depleted Five or more R_READ/R_WRITE FBs were simultaneously executed. -
• A value other than 0 and 2 is set in VAR_TYPE.
• When VAR_TYPE is set to 2, any of the following occurred.
1) A value in an unspecified format was entered in REMOTE_VAR.
(For example, the content of the first word is not "H0004.")
2) An out-of-range value is entered in Timeout (H) or (L).
177 Parameter error -
3) A value other than 1 is entered in the SIZE terminal.
4) An array that is not one-word is specified in RD.
5) The Ethernet module does not support the PING function (The
version of the Ethernet module is V43 or earlier.)
• No module exists at the SX bus station No. specified in MODULE_NO.
193 Channel open error • An abnormal value is set in CHANNEL_NO. -
• After sending a PING, the Ethernet module did not receive a response
195 Time out within the specified time -
• The Ethernet module received an ICMP error message.
201 Client port FULL • Two or more PING send requests are executed. -
Note:
1) The PING function sends an arbitrary data to the target node, which echobacks the same data. The substatus outputs the
result of verification between the send data and echoback data.
0: Verification match
1: Verification mismatch
A mismatch occurs if echoback data are garbled due to the unstable state of LAN.
App.5-4
Fuji Electric Co., Ltd.
Gate City Ohsaki, East Tower,
11-2, Osaki 1-chome, Shinagawa-ku, Tokyo 141-0032, Japan
E-mail: [email protected]
URL: http://www.fujielectric.com/
Materials covered in this document are subject to revision due to the modification of the product.