Overview Of Sending Data - Panasonic FP-XH Series User Manual

Hide thumbs Also See for FP-XH Series:
Table of Contents

Advertisement

7.1 Overview of Sending Data

7.1 Overview of Sending Data

7.1.1 Overview of Sending Data
Communication with external devices is handled through the data registers. When data to be
sent is stored in the data register (DT) used as a send buffer, and F159 (MTRN) instruction is
executed, the data is outputted from the COM port.
PLC
Sample program
The following program sends a string "ABCDEFGH (Hex)" to an external device via COM1 port.
The program described above is executed in the following sequence.
1. "ABCDEFGH" is converted to an ASCII code and stored in a data register.
2. The data of 1) above is sent from COM1 port using an F159 (MTRN) instruction.
R0
DF
R10
Code Description
Character constant to be
(1)
sent
(2)
Area that stores send data
(3)
Starting area of send buffer
(4)
Number of send data bytes
(5)
COM port No.
(a)
Sending data instruction
(b)
Data conversion
(c)
Sending data
7-2
Data register (DT)
Send a command aligned to an
Send data
Receive data
F253 SSET
F159 MTRN
Input a character constant to be sent. In the case of input using FPWIN
GR7, select "M" as a device type. On FPWIN GR7, a character constant
is bracketed by double quotation marks.
Specify the starting address of the data register that stores data to be
sent.
Specify the starting address of the data register allocated to a data table
that contains send data and the number of characters of send data.
Specify the number of send data bytes.
Specify a COM port No. for sending data.
K0: COM0 port; K1: COM1 port; K2: COM2 port; K3: COM3 port
Turn ON the internal relay (R10) according to the timing of send
conditions (R0).
Convert the string "ABCDEFGH (Hex)" into ASCII code, and write it into
DT101 to DT104.
Data in the send buffer is sent from COM1 port.
external device
Receive a response from an
external device
H8000
ABCDEFGH
"
DT100
DT100
RS-232C, RS-485,
etc. (commercially
R10
"
DT100
K1
WUME-FPXHCOMG-02
available)

Advertisement

Table of Contents
loading

Table of Contents