EasyManua.ls Logo

Panasonic FP-X0 L40MR - Pulse inputoutput performance

Panasonic FP-X0 L40MR
290 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...
6.5.2 Programming Example of General-purpose Serial Communication
The F159(MTRN) instruction is used to send and receive data via the specified communication port.
F159 (MTRN) instruction
Data is sent and received via the specified COM port .
Devices that can be specified for S:
Devices that can be specified for n:
Devices that can be specified for D:
Only data registers (DT) can be specified as the send buffer.
WX, WY, WR, WL, SV, EV, DT, LD, I (I0 to ID), K, H
Only the K constants (K0 and K1 only)
Sending data
- The amount of data specified by n is sent to the external device from among the data stored in the data
table, starting with the area specified by S, through the COM port specified by D.
- Data can be sent with the start code and end code automatically attached.
- When the above program is run, the eight bytes of data contained in DT101 to DT104 and stored in the
send buffer starting from DT100 are sent from communication port.
Receiving data
- Data can be received when the "reception done" flag is off. The received data is stored in the receive
buffer specified by the system register.
- When the reception of the data is completed (the terminator is received), the “reception done” flag
(R9038) turns on, and subsequently, receiving data is prohibited.
- To receive the next data, execute the F159 (MTRN) instruction and turn off the "reception done" flag
(R9038) to clear the number of received bytes to zero.
- To receive data continuously without sending data, clear the number of transmitted bytes to zero (set
“n” to K0”), and then execute the F159 (MTRN) instruction.
Binary communication
- Selecting STX not existfor the header and Nonefor the terminator in the general-purpose serial
communication enables the binary communication.
Sending data: Sends the data of bytes to be specified.
Receiving data: Check the No. of bytes received before the process. At that time, the reception done
flag does not work.
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com

Table of Contents

Related product manuals