F159_MTRN (n_Number=0)

Redundant instruction

NOTE

This is a redundant instruction. It is replaced by: SendData

The receive buffer is automatically reset when a send instruction is executed. To reset the receive buffer without sending further data, execute this instruction. Alternatively, you can use ClearReceiveBuffer. Resetting the receive buffer sets the number of bytes received in offset 0 to 0 and moves the write pointer back to offset 1. The next data will be stored starting at offset 1 and overwriting the existing data.

NOTE

When data is received from a Multi-Communication Unit using F161_MRCV, the reception area is cleared and the "reception done" flag is reset. Hence the communication port can again receive data. To reset the receive buffer without using F161_MRCV, ClearReceiveBuffer must be used. F159_MTRN with n_Number=0 will cause an operation error.

Parameters

Input

s_Start (WORD, INT, UINT)

Send buffer

n_Number (WORD, INT, UINT)

Number of bytes to send:

  • Negative value: The end code selected in the system registers is not appended to the send string.

  • 0 (zero bytes): Prepare system to receive further data

  • 16#8000:Toggle communication mode between MEWTOCOL master/slave and Program controlled [General Purpose]

d_Port (WORD, INT, UINT)

Specifies the communication port (depending on the PLC type):

  • COM port e.g. SYS_COM0_PORT

  • Ethernet port e.g. SYS_ETHERNET_USER_CONNECTION_1

  • MCU/SCU e.g. 16#xx01 (xx = slot number) in COM01

Related topics:

Modified on: 2019-12-14Feedback on this pagePanasonic hotline