Appendix C: Program Examples
139
FX
3U
-ENET-ADP User's Manual
B
Ve
rsion
Inform
ation
C
Program
Examples
D
Di
fferences w
ith
FX
3U
-E
N
E
T
E
D
ocum
ent,
oth
ers
Appendix C-2 Program example for communication using MC protocol -2
Appendix C-2 Program example for communication using MC protocol -2
This section explains an example of an external device program that reads/writes data from/to the PLC.
A sample program, its execution environment and contents of data communication are shown below.
1) Execution environment of the program example
a) The settings of the PLC side are the same as those of the execution environment described in Section
C-1 1) a) and 3) of Appendix.
b) The settings of the external device side are the same as those of the execution environment described
in Section C-1 1) b) of Appendix, except for the following including the software development:
- Software development environment: Microsoft Corporation Visual Basic .NET
- Arbitrary numbers are assigned for the IP address and port number.
c) The communication protocol is TCP/IP
2) Outline of the program example
With the A-compatible 1E frame command (01: batch read in word units), this program reads data from
D0 to D4 (five points) of the PLC of the station on which the Ethernet adapter is mounted.
3) Outline of the sample program
a) Create a new project and form.
b) Create the (example) window shown in (4) below using "Button" and "List Box" in the toolbox.
c) Create the program shown in (5).
4) Window example (Form 1)
(Object name)
Start
Connect to the Ethernet adapter
and perform communication
1st Output
Display data that was read from
the Ethernet adapter
Содержание FX3U-ENET-ADP
Страница 1: ...FX3U ENET ADP USER S MANUAL ...
Страница 2: ......
Страница 6: ... 4 Safety Precautions Read these precautions before use MEMO ...
Страница 160: ...154 FX3U ENET ADP User s Manual Revised History Revised History Date Revision Description 2 2012 A First Edition ...
Страница 161: ......