Data transfer via communication ports
742
Part III FP Instructions
F159_MTRN
Serial data communication to CPU or MCU port
F159_MTRN is encapsulated in the following instructions:
SendCharacters (see page 737)
SendCharactersAndClearString (see page 739)
ClearReceiveBuffer (see page 753)
SetCommunicationMode (see page 717)
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
REFERENCE
- Data transfer in program controlled mode (see page 733)
- Changing the communication mode in RUN mode (see page 717)
Description
This instruction is used to send data when an external device (computer, measuring instrument,
bar code reader, etc.) has been connected to the specified RS232C port. If applied to the CPU's
COM port, it also clears the receive buffer (see page 746), resets the "reception done flag" and
allows furth
er reception of data.