EasyManua.ls Logo

Panasonic FP Series

Panasonic FP Series
1345 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...
Data transfer via communication ports
747
Part III FP Instructions
You can only execute F159_MTRN with the number of bytes equal to
zero for the COM ports of a CPU; otherwise an operation error will
occur.
Communication port of the MCU:
Receiving data from the MCU using F161_MRCV (see page 755) implicitly clears the reception
area and resets the "rec
eption done flag". Hence the communication port can again receive data.
22.4.2 Receiving data from external devices
Steps for receiving data from external devices:
1. Setting the communication parameters and specifying the receive buffer
2. Receiving the data
3. Processing the data in the receive buffer
4. Preparing the system to receive subsequent data
NOTE
Data received via the communication ports of an MCU has to be moved to the CPU receive buffer
using the instruction F161_MRCV (see page 755).
1. Setting the communication par
ameters (see)
2. Receiving the data
Data is automatically received in the receive buffer defined in the system registers. Reception can be controlled
by the "reception done" flag or by directly evaluating the receive buffer. (For details on flag operation, see page
757.) When this flag is FALSE and data is sent to the communication port from an external d
evice, operation
takes place as follows. (The "reception done" flag turns to FALSE after switching to RUN mode.)
POU
Header and
LD Body
All input and output variables which are required for programming the function are declared in the
POU header.
ST Body
if (DF(ClearTheReceiveBuffer)) then
(* Clears the receive buffer of the COM1 port of the FP-SIGMA *)
F159_MTRN(s_Start := wDummy, n_Number := 0, d_Port := 1);
end_if;

Table of Contents

Other manuals for Panasonic FP Series

Related product manuals