Control Unit

Message to/from PLC

Description

This control unit receives messages sent by the CNC to the PLC and messages sent by the PLC to other users of the communication process provided by the CNC.

The CNC can send a message to the PLC via the commands #MSG PLC ["…"] or #MSG SYN PLC [“...”] (see [PROG]). The information on which of the commands was used to send a message is also sent in the user data of this control unit.

Data type

MC_CONTROL_MSG_UNIT, see description Control Unit with usage check

ST path

gpCh[channel_idx]^.msg_mc_control

Commanded, requested data

ST element

.command_w

.request_r

Data type

HLI_MSG_SENDUNG

Access

PLC writes command_w and reads request_r

Flow control of commanded value

ST element

.command_semaphor_rw

Data type

BOOL

Value range

[TRUE, FALSE]

Special features

Consumption data item

Access

PLC can write data for commanding if command_semaphor_rw has the value FALSE. When all command data is written, the PLC sets command_semaphor_rw to TRUE.

CNC takes the commanded data if command_semaphor_rw is TRUE and then sets the flag to FALSE.

Flow control of requested data

ST element

.request_semaphor_rw

Data type

BOOL

Value range

[TRUE, FALSE]

Special features

Consumption data item

Access

The data requested by the GUI can be written if request_semaphor_rw is FALSE. This element is then set to TRUE.

PLC reads the data requested by GUI if request_semaphor_rw is TRUE. After the PLC fully accepts the data, the PLC sets this element to FALSE.

Redirection

ST path

.enable_w