Data transfer via communication ports
740
Part III FP Instructions
SendCharactersAnd
ClearString
Send characters and clesr string
In contrast to the instruction SendCharacters (see page 737), the string variable applied at sString
is cleared after execution.
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.
PLC types see see page 1330
Variable Data type Function
Port
INT
Communication port
Must be a constant
FP-X, FP and FP2, FP2SH (V1.4 or later):
PLC communication ports:
Value: SYS_COM1_PORT or SYS_COM2_PORT or
SYS_TOOL_PORT
MCU communication port:
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)
bSuppressEndCode
BOOL
When set to TRUE, the instruction does not append the sending
end code character even if specified in the respective system
register.
VAR_INOUT
sString STRING Stores the send string
Description
This instruction directly executes the send data instruction F159_MTRN (see page 741) on the
applied string without requiring an additional send buffer.
Data types
Example
In this example the function has been programmed in ladder diagram (LD) and structured text
(ST).The same POU header is used for all programming languages.
POU header
All input and output variables used for programming this function have been declared in the POU
header.