Mitsubishi Electric FX3U-ENET-ADP User Manual page 140

Table of Contents

Advertisement

FX
-ENET-ADP User's Manual
3U
<Remarks>
• The following explains an outline of the compiling procedure for a program created using Microsoft
Corporation Visual C++ .NET
1) Start Visual C++ .
2) Prepare for program creation.
Select "New Project" from the project tab, select "Win32 console project", and create an empty project
with the name "ENETSAMP".
3) Add ENETSAMP.C to the project and create a program.
(See the program example on the next page.)
4) Compile the created file from the compile screen of the build menu.
5) From the project menu property setting screen, add WSOCK32.LIB to the linker addition dependency
files.
6) Create an executable file (ENETSAMP.EXE) on the build screen of the build menu.
7) End Visual C++ .NET.
8) Execute ENETSAMP.EXE.
• Outline of the procedure for calling the socket routine
(Create socket)
(Bind)
(Open)
(Communicate)
(Disable sending/receiving)
(Close)
134
Appendix C-1 Program example for communication using MC protocol -1
Start
socket()
bind()
Passive open
listen()
accept()
send()/recv()
shutdown()
closesocket
Complete
Appendix C: Program Examples
Active open
connect()
sendto()/recvfrom()
UDP

Advertisement

Table of Contents
loading

Table of Contents