Output
CHAPTER 8 MASTER-K COMMAND
8.3 Types of Command
8.3.1 ECON
Model K1000S K300S K200S K80S K120S
Application n n n
Available device FLAG
OPERLAN
D M P K L F T C D #D
CON STA
NT
STEP ERROR (F110)
ZERO (F111)
CARRY (F112)
RMKS
OP1 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
OP2 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
OP3 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
OP4 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
0 (AREA OVER)
[ECON OP1 OP2 OP3 OP4]
OPERLAND DESCRIPTION
OP1
Device 0: CH_NO(high byte), SLOT_NO(low byte) Device 1: PORT_NO(word)
CH_NO: The channel no. to establish (0~15)
SLOT_NO: The slot no. where the communication module is installed
PORT_NO: The port No. when establishing the channel
OP2
Device 0-3: IP_ADDR (ex. 192.168.100.1)
->Device0=192, Device1=168)
IP_ADDR: When the channel is established by TCP_ACTIVE, the IP address of the destination station is used. When the channel is established by TCP_PASSIVE, the IP address of the destination station is used.
OP3 Device 0-7: METHOD (ASCII Data, within 16byte)
METHOD: To determine whether to act by TCP or UDP, Client or Server when established channel (refer to the description below)
OP4
Device 0: STATUS(high byte), ERR(1'bit), NDR(0'bit) Device 1: CH_EN(0'bit)
NDR: ON when normal channel establishment ERR: ON when an error occurs after command execution
STATUS: Detail code value for the error CH_EN: Result for channel establishment
1) TCP_ACTIVE: Destination station port (Dest Port) + destination station IP address (Dest IP_ADDR)
This is the channel to use TCP/IP and designates the destination station for communication. For communication with the designated destination station, the local station acts as the client.
2) TCP_PASSIVE: local station port (Source Port) + local station IP address (Source IP_ADDR)
This is the channel to use TCP/IP, which is established for the station that requires to establish the channel first. The local station acts as the server for communication with the designated Logical communication channel
establishment with the remote station
3) TCP_SELECT: local station port (Source Port) + destination station IP address (Dest IP_ADDR)
This is a kind of TCP_PASSIVE and establishes the channel only for the destination station designated by the user. The local station acts as the server for communication with the designated destination station.
4) UDP_ACTIVE: local station port (Source Port) + local station IP address (Source IP_ADDR)
This is the channel to use UDP/IP and opens only a socket. For the communication with the designated destination station, the local station acts as client. (Actually, the channel is not bound.)
5) UDP_PASSIVE: local station port (Source Port) + local station IP address (Source IP_ADDR)
This is the channel to use UDP/IP and only a socket is bound. For communication with the designated destination station, the local station acts as the server. (Actually, the channel is not bound.)
Point
1) PASSIVE (SELECT) OPEN should start prior to ACTIVE OPEN.
UDP_ACTIVE, UDP_PASSIVE does not establish the channel by the service and opens the socket only to connect internally.
As above, the user should establish the channel suitable for communication characteristics according to the type of logical channel establishment. The request for channel establishment shall be established based on the value of METHOD among operand input.
METHOD: ‘XXX_YYY(or ‘XXX_YYY_TTT’) - (less than 16digits: string) XXX: group name prepared by frame editor.
YYY: channel establishment type (TCPACT, TCPPAS, TCPSEL, UDPACT, UDPPAS: 5 types)
TTT: sending/receiving standby time for channel release (0~FF sec.). If there is no response from the opposite side within a certain setting time, disconnect the connection by force. (for TCPPAS)
8.3.2 TSND
Model K1000S K300S K200S K80S K120S
Application n n n
AVAILABLE DEVICE FLAG
OPERLAN
D M P K L F T C D #D
CON STA
NT
STEP ERRO
R (F110)
ZERO (F111)
CARRY (F112)
REM ARKS
OP1 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
OP2 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
OP3 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
OP4 ◎ ◎
OP5 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
0 (AREA OVER)
[TSND OP1 OP2 OP3 OP4 OP5]
OPERLAND DESCRIPTION
OP1 Device 0: CH_NO(high byte), SLOT_NO(low byte)
CH_NO: The channel no. established by the ECON command
SLOT_NO: The slot no. where the communication module is installed.
OP2 Device 0-7: FRAME FRAME: Frame desired to send
Uses the name as it is used in frame editor OP3 Device 0: SND_AREA Area where the sending data is saved
OP4 LENGTH Data size desired to send
OP5
Device 0: STATUS(high byte), ERR(1'bit), NDR(0'bit)
NDR: ON when the channel is established normally ERR: ON when an error occurs after a command execution
STATUS: Detailed code value for the error
This is used to send the data of the local station to the destination station by using TCP/IP.
ACTION is done by reading the data as much as ‘LENGTH’ from ‘SND_AREA’ and sending the data to the destination station established by the CH_NO’ channel in the designated format in
‘FRAME’. The entered name in ‘FRAME’ should be used by the name defined by the sending/receiving format in the frame editor. If the service runs normally, the NDR bit shall be
‘On’. If an error occurs, ERR will be turned on and the code value accordingly shall saved in STATUS.
When sending the data to a remote station by using TCP/IP
8.3.3 TRCV
Model K1000S K300S K200S K80S K120S
Application n n n
AVAILABLE DEVICE FLAG
OPERLAN
D M P K L F T C D #D
CON STA
NT
STEP ERRO
R (F110)
ZERO (F111)
CARRY (F112)
REM ARKS
OP1 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
OP2 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
OP3 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
OP4 ◎ ◎
OP5 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
0 (AREA OVER)
[TRCV OP1 OP2 OP3 OP4 OP5]
OPERLAND DESCRIPTION
OP1 Device 0: CH_NO(high byte), SLOT_NO(low byte)
CH_NO: The channel no. established by ECON command
SLOT_NO: The slot no. that the communication module is installed
OP2 Device 0-7: FRAME FRAME: Frame desired to receive
Use the same name as in frame editor.
OP3 Device 0: RCV_AREA Area to save the receiving data
OP4 LENTH Data number desired to receive
OP5
Device 0: STATUS(high byte), ERR(1'bit), NDR(0'bit)
NDR: ON when establishing the channel normally ERR: ON when an error occurs after command
execution
STATUS: Detailed code value for an error
This is used to receive the data from the destination station by using TCP/IP.
ACTION starts when the flag is at the rising edge and the data shall be received through the communication module of the local station installed the CH_NO slot of the main base. CH_NO is the channel set when establishing the channel with the destination station in ECON command. The data name entered in FRAME shall be designated by the frame name that is downloaded from frame editor to the communication module. Only in the case when the data When receiving the data sent by the
remote station by using TCP/IP
8.3.4 USND
Model K1000S K300S K200S K80S K120S
Application n n n
AVAILABLE DEVICE FLAG
OPERLAN
D M P K L F T C D #D
CON STA
NT
STEP ERRO
R (F110)
ZERO (F111)
CARRY (F112)
REM ARKS
OP1 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
OP2 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
OP3 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
OP4 ◎ ◎
OP5 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
0 (AREA OVER)
[USND OP1 OP2 OP3 OP4 OP5]
OPERLAND DESCRIPTION
OP1
Device 0: CH_NO(high byte), SLOT_NO(low byte) Device 1: PORT_NO
CH_NO: The channel no. established in ECON command
SLOT_NO: The slot no. that the communication module is installed.
PORT_NO: The port no. of the destination station OP2
Device 0-3: IP_ADDR (ex.192.168.100.100 ->
Device0=192, Device1=168, ..)
IP_ADDR: The IP address of the destination station
OP3 Device 0-7: FRAME FRAME: Frame desired to send OP4 Device 0-7: SND_AREA Area that the sending data is saved
OP5 LENTH Data number desired to send
OP6 Device 0: STATUS(high byte), ERR(1'bit), NDR(0'bit)
NDR: ON when establishing the channel normally ERR: ON when an error occurs after command
execution
STATUS: Detailed code value for the error
This is used to send the data from the local station to the destination station by using UDP/IP.
If you establish the channel with UDP_ACTIVE or UDP_PASSIVE by ECON command, this does not mean that the channel is established by communication. It is only connected by opening the Socket. Accordingly, UDP/IP sending needs to designate an IP address and a port No. of the destination station when sending the data other than TCP/IP. The data is sent to the port of the destination station (D_PORT) with the defined IP address in IP_ADDR through the communication module of the local station installed in the CH_NO slot of the base.
The frame name used in FRAME shall be designated by the frame name that is downloaded in When sending the data to the remote
station by using UDP/IP
8.3.5 URCV
Model K1000S K300S K200S K80S K120S
Application n n n
AVAILABLE DEVICE FLAG
OPERLAN
D M P K L F T C D #D
CON STA
NT
STEP ERRO
R (F110)
ZERO (F111)
CARRY (F112)
REM ARKS
OP1 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
OP2 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
OP3 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
OP4 ◎ ◎
OP5 ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎
0 (AREA OVER)
[URCV OP1 OP2 OP3 OP4 OP5]
OPERLAND DESCRIPTION
OP1 Device 0: CH_NO(high byte), SLOT_NO(low byte)
CH_NO: The channel no. established in ECON command
SLOT_NO: The slot no. that the communication module is installed.
OP2 Device 0-7: FRAME FRAME: Frame desired to receive OP3 Device 0: RCV_AREA Area that receiving data is saved
OP4 LENTH Data number desired to receive
OP5
Device 0: STATUS(high byte), ERR(1'bit), NDR(0'bit) Device 1: PORT
Device 2: RCV_LEN Device 3-6: IP_ADDR
NDR: ON when normal service starts
ERR: ON when an error occurs after command execution
STATUS: Detailed code value for an error PORT: The port of the data sending station RCV_LEN: Receiving data size
IP_ADDR: The IP address of the data sending station
This is used to receive the data of the destination station by using UDP/IP.
As UDP/IP communication does not establish the channel. It is available to receive all data which is sending to the port no. open to the local station. Accordingly, URCV command can determined which station (SIP_ADDR) sent the data to which port no. (S_PORT) other than TRCV.
When receiving the data sent by a remote station by using UDP/IP.