Mitsubishi Electronics MELSEC-F Universal Remote User Manual


 
App - 14
MELSEC-F
APPENDIX
App - 14
Appendix 4.2 Program example for communication using MC protocol -2
This section explains an example of an external device program that reads/writs data
from the PLC.
A sample program, its execution environment and contents of data communication
are shown below.
(1) Execution environment of the program example
1) The settings of the PLC side are the same as those of the execution
environment described in Section 4.1 (1) (a) and (3) of Appendix.
2) The settings of the external device side are the same as those of the
execution environment described in Section 4.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.
3) 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 module 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).