At a Glance
We would like to read a character string sent by a data entry/display terminal connected to a Modicon M340 processor’s serial port.
This character string is stored in the Str
variable,
the management table of the communication function being gestion
.
Illustration
A Modicon M340 PLC is linked to a data entry/display terminal TM8501:

Programming
Programming in ST:
IF (%M15) THEN
INPUT_CHAR(ADDM(’0.0.0’), 1, 0, gestion, Str);
END_IF;
Request parameters:
Parameters |
Description |
---|---|
ADDM(‘0.0.0’) |
|
1 |
Reset |
0 |
Read the entire character string |
gestion |
Management table |
Str |
Variable of type STRING that is to receive the message |