RMPSendMessage
This function block serves to send messages to any module instance. The address of the instance must be known.
The behavior of the variables xExecute
, xDone
, xBusy
, and xError
complies with the "Guidelines for Library Design". This document is part of the CODESYS standard installation.
FUNCTION_BLOCK: RMPSendMessage
FUNCTION_BLOCK RMPSendMessage EXTENDS CBM.ETRIG VAR_IN_OUT mdData: ARRAY[0..63] OF BYTE; END_VAR VAR_INPUT itfrmp: IRMPService; xExecute: BOOL; udiReceiverID: UDINT; uiSenderModuleID: UINT; tValidity: TIME := t#1s; END_VAR VAR_OUTPUT xDone: BOOL; xBusy: BOOL; xError: BOOL; uiErrorID: UINT; END_VAR
Please note that the job of the function block is finished successfully as soon as the receipt of the message in the RMPService of the opposite side is confirmed. This does not necessarily mean that the message has reached the actual receiver module interface.
In mdData
, the data to send will be transferred. udiReceiverID
defines the ID of the receiver.rmp
defines the local RMPService instance.
The duration until the message is sent must not exceed
tValidity
(otherwise an error message will be created).The duration until the message is picked up by the receiver of the opposite side, must not exceed
tValidity
(otherwise the message will be deleted).
uiErrorID
:Send buffer is full; it is recommended to send again at a later date.
The message will not be deleted from the send buffer. Reasons can be a slow transfer, an interrupted connection or a full receive buffer on the opposite side.
The application to which the message is sent is not connected to this application. In this case a transfer of the data is no possible.