Lenze ETC Motion Control User Manual

Page 416

Advertising
background image

PLC programming

Library
MMI communication functions

8

8.8
8.8.7

l

416

EDSTCXN EN 2.0

With this function the PLC can send a message of type
SB0_SPSAUFTRAG_KUC (SB0=14) with up to 512 Byte user data to HMI. Here
the message buffer between NCR and MMI in the dual port RAM will be used.
The function can be used together with GetApplicationMessage to establish
a fast message communication between the PLC and MMI.

In data_pab a pointer to a buffer containing the user data to be sent can be
transferred. When starting or resetting the PLC this pointer is automatically
initialised to the beginning of DB6 (%MW6.0).

The data descriptor datatypes_s can be used to automatically carry out the
possibly required byte swapping of the user data. Otherwise this must first
be carried out using MOVESWAPPED or the functions PUT_WORD,
PUT_DWORD, etc. must be used to write data to the message.

If datatypes_s contains an empty string the number of the user data bytes to
be sent must be stated in len_w. Otherwise the lengths will be provided by
the data descriptor.

sb1_b defines the type of message. For every user data format used a
separate control block should be used. The definition must be agreed
between the PLC and MMI developer.

The variables sb2_b and index_b are optional. Their use must be resolved
between the PLC and HMI developer. handle_b is reserved for the
simultaneous communication with several applications.

After entering the message into the send buffer to the HMI OK will be set to
TRUE. In case of a faulty descriptor string datatypes_s or a send buffer
overrun OK will be set to FALSE. The function will immediately provide a
return even if a message could not be sent. In the case of a send buffer
overrun it can, of course, be called again later.

)

Note!

These messages are always transferred unsynchronised. Up to 30
messages of this type from NCR to MMI can be buffered in the
control in total, the rest will be lost. In this case the control
reports a corresponding error message. If necessary,
synchronisation mechanisms must be agreed between HMI and
PLC.

Description

Advertising