
8. Simulator
(3) Ethernet / RS-232C communication command
(Print #, Input #, OpenCom, OpenNet, etc.)
All ports including the option RS-232C board are available in a virtual controller.
However, an Ethernet port requires configuration of the IP address and TCP/IP port.
Ethernet / RS-232C communication commands do not perform actual communication.
Output data from Print #, etc. is saved in the communication output file. In the input
by Input#, etc, the return value is 0 (numeric data) or blank (string). However, if you
create a communication response file, the return value depends on the file content.
Communication output file
When calling OpenCom or OpenNet command, a communication output file is created
in the \EpsonRC\Virtual\Mounted Volume\Project folder on the PC.
DummySend***.dat : Communication output file (*** is the port number)
When a communication output file already exists, the previous output data is deleted.
The file is deleted when you switch the project; save the file in a proper folder if you
need.
When executing the following program,
OpenCom #1
Print #1, 123
Print #1, "TEST DATA"
CloseCom #1
the DummySend001.dat file will contain...
123
TEST DATA
Communication response file
Copy the communication response file to the \EpsonRC\Virtual\Mounted
Volume\Project folder in before running a program. The file is deleted when you
change the project; save the file in another folder if you need to keep it.
When calling OpenCom or OpenNet command, the communication response file is
loaded.
DummyRead***.dat : Communication response file (*** is a port number)
When the following DummyRead001.dat file is used,
321
Test Data
and the following program is executed,
Integer i
String s$
OpenCom #1
Input #1, i
Input #1, s$
CloseCom #1
Print i
Print s$
the return values are i = 321 (numeric data), and s$ = "Test Data" (string).
EPSON RC+ 5.0 (Ver.5.4) User's Guide Rev.4 239
Comentários a estes Manuais