Mitsubishi Electric CR800 Series Ethernet Function Instruction Manual page 34

Electric industrial robot
Hide thumbs Also See for CR800 Series:
Table of Contents

Advertisement

3 Description of functions
C_COM
[Function]
Sets the parameters for the line to be opened by the OPEN instruction. This is used when the communication destination
is changed frequently.
* Character string type
* Only for a client with the Ethernet option.
[Format]
C_COM (<communication line number>) = "ETH: <server side IP address> [, <port number>]"
[Terminology]
ETH:
<Communication line number> The number of the COM to be specified by the OPEN instruction (The line type is
<Server side IP address>
<Port number>
[Reference Program]
Example when OPT12 is set in the second element of the COMDEV parameter
1 C_COM(2)="ETH:192.168.0.10,10010"
2 *LOPEN1:OPEN "COM2:" AS #1
3 IF M_OPEN(1)<>1 THEN *LOPEN1
4 PRINT #1, "HELLO"
5 INPUT #1, C1$
6 CLOSE #1
7 C_COM(2)="ETH:192.168.0.11,10011"
8 *LOPEN2:OPEN "COM2:" AS #1
9 IF M_OPEN(1)<>1 THEN *LOPEN2
10 PRINT #1, C1$
11 INPUT #1, C2$
12 CLOSE #1
13 HLT
14 END
[Description]
(1) It is not necessary to use this command when the communication counterpart of the robot controller is specified with the
NETHSTIP and NETPORT parameters and the specified communication counterpart will not be changed at all.
(2) Currently, this function is valid only for a client of a data link with the Ethernet.
(3) Because the communication parameters of the OPEN instruction are set, it is necessary to execute this command
before the OPEN instruction.
(4) When the power is turned on, the set values specified by the NETHSTIP and NETPORT parameters are used. When
this command is executed, the values specified by the parameters of this command are changed temporarily. They are
valid until the power is turned off. When the power is turned on again, the values revert to the original values set by the
parameters.
(5) If this command is executed after the OPEN instruction, the current open status will not change. In such a case, it is
necessary to close the line with the CLOSE instruction once, and then execute the OPEN instruction again.
(6) If an incorrect syntax is used, an error occurs when the program is executed, not when the program is edited.
[Related Parameters]
NETHSTIP, NETPORT
3-8
An identifier to indicate that the target is an Ethernet
assigned by the COMDEV parameter.) Specify 1 through 8.
Server side IP address (May be omitted.)
Port number on the server side (If omitted, the set value of the NETPORT parameter is
used.)
' Set the IP address of the communication destination server
corresponding to communication line COM2
' As 192.168.0.10 and the port number as 10010, and then open the line.
' Loops if unable to connect to the server.
' Sends a character string.
' Receives a character string.
' Closes the line.
' Set the IP address of the communication destination server
corresponding to communication line COM2
' As 192.168.0.11 and the port number as 10011, and then open the line.
' Loops if unable to connect to the server.
' Sends a character string.
' Receives a character string.
' Closes the line.
' Halts the program.
' Ends.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr751 seriesCr750 series

Table of Contents