At a Glance

Let us assume we want to send a character string to a compact data entry/display terminal connected to a Modicon M340 processor’s serial port.

The management table is located in %MW110:4 and the string to be sent is located in the variable caract.

Illustration

A Modicon M340 PLC is linked to a data entry/display terminal TM8501:

Transmission

Programming in ST:

IF (%M16) THEN
   PRINT_CHAR(ADDM(’0.0.0’),caract,gestion);
END_IF;

Request parameters:

Parameters

Description

ADDM(‘0.0.0’)

  • 0: rack

  • 0: module

  • 0: channel 0

  • SYS: system address (optional on Modicon M340 PLCs)

caract

Character string to send, variable caract.

gestion

Management table

NOTE: Each time the function is launched, initialize the length parameter (For example: %MW113 if the management table is located from %MW110 to %MW113) with the value corresponding to the number of characters (in bytes) to send to caract).