EasyManua.ls Logo

Mitsubishi Electric MELSEC-L Series - Page 356

Mitsubishi Electric MELSEC-L Series
382 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
354
(4) Sample program on the connected device side
The program example of the connected device accessing the L02CPU in the E71-connected station is described.
When this program is executed, the contents of the following communication messages are displayed in order:
Batch write command message in word units
Batch write response message in word units
Batch read command message in word units
Batch read response message in word units
Remark
The following is an outline of how to compile a program created using Microsoft
Corporation Visual C++
.NET.
Start Visual C++
.NET.
Create a project. From [File][New][Project], select ".NET" in "Project Types" and "Empty Project" in
"Templates", and set the project name (e.g. AJSAMP) and location.
Create a source file. Open Solution Explorer. Then right-click Source Files and select [Add][Add New Item]. Set
the file name (e.g. AJSAMP.cpp) and location, and create a program according to the program example.
From the project setting window, get WSOCK32.LIB linked. Open Solution Explorer. Then right-click the project
name (AJSAMP) and select [Properties][Configuration Properties][Linker][Command Line]. Type
WSOCK32.LIB in Additional Options and press the OK button.
On the Build menu, click Build Solution to create an execution file (AJSAMP.EXE).
Exit Visual C++
.NET.
Execute AJSAMP.EXE.
The following is an outline of how to implement a socket routine call.
Start
socket()
bind()
Passive open Active open UDP
listen() connect()
accept()
send()/recv() sendto()/recvfrom()
shutdown()
closesocket
Completed
(Socket created)
(Bind)
(Open)
(Communications)
(Sending/reception disabled)
(Close)

Table of Contents

Other manuals for Mitsubishi Electric MELSEC-L Series

Related product manuals