ReceiveData
This instruction copies the received data of the port specified by the variable at Port into the data
Description
applied at aBuffer.
To add an enable input and enable output to the instruction, select [With EN/ENO] from the
"Instructions" pane (LD, FBD or IL editor). To reuse an instruction select "Recently used" from the
context menu or press <Ctrl>+<Shift>+<v> in the programming window.
See also:
ReceiveCharacters (see page 752)
ClearReceiveBuffer (see page 753)
see see page 1330
PLC types
Data types
Input variable
Port
Output variable
aBuffer
Error flags
No.
IEC address
%MX0.900.7
R9007
%MX0.900.8
R9008
In this example the function has been programmed in ladder diagram (LD) and structured text (ST).
Example
POU header
All input and output variables used for programming this function have been declared in the POU
header.
LD
Receive data from CPU or MCU port
Data type
Function
Communication port
Must be a constant
FP-X, FP
PLC communication ports:
Value: SYS_COM1_PORT or SYS_COM2_PORT or SYS_TOOL_PORT
MCU communication port:
ANY16
Value: 16#xx01 (COM1), 16#xx02 (COM2)
xx = slot number (hexadecimal) of the MCU (e.g. 16#0001: COM1 in slot 0,
16#0A02: COM2 in slot 10, 16#1401: COM1 in slot 20)
Other PLCs:
The command will be compiled to F144_TRNS, which works on the COM port
of the CPU (the parameter d_Port will be ignored)
stores the receive data
ANY
Set
If
permanently
the MCU unit does not exist at the slot no.
for an instant
Data transfer via communication ports
and FP2, FP2SH (V1.4 or later):
specified by 'Port'.
751