AC_RMP_ReliableMessageProtocol ¶ The functions and function blocks in this folder are used for the creation of a RMP (Reliable Message Protocoll) by the composer and offer all the needed functionality for the user to use the RMP via IEC. AC_RMP_FBCommunication IRMPFBCommunication (Interface) CyclicCall (Method) InitializeCommunicationFBConnections (Method) InitializeCommunicationParameters (Method) InitializeReceiveBuffers (Method) InitializeSendBuffers (Method) ReceiveComAdress (Property) ReceiveCounter (Property) SendCounter (Property) SendToComAdress (Property) RMPVarData (Struct) IRMPService (Interface) IsMessageSent (Method) LocalAppID (Property) QueueSendMessage (Method) Receive (Method) IRmpService2 (Interface) GetIsActionOngoing (Method) SetIsActionOngoing (Method) IRmpService3 (Interface) GetComFBForComAddress (Method) RMPBufferedMessage (Struct) RMPConnection (FunctionBlock) Activate (Method) ActiveIndexInQueue (Property) CheckConnectivity (Method) Deactivate (Method) IsActive (Property) IsUp (Property) RMPExchangeData (Struct) RMPMessageBuffer (FunctionBlock) AddMessage (Method) ClearExpiredMessages (Method) Delete (Method) EnlargeExpirationTime (Method) ExistsMessageWithHandle (Method) GetMessage (Method) GetMessageForReceiver (Method) GetMessageToApplication (Method) Lock (Method) Unlock (Method) RMPSendMessage (FunctionBlock) RMPService (FunctionBlock) Cyclic CyclicCall (Method) GetComFBForComAddress (Method) GetIsActionOngoing (Method) LocalAppID (Property) Receive Receive (Method) Send IsMessageSent (Method) QueueSendMessage (Method) SetIsActionOngoing (Method) RMP_GVL (GVL) RMP_GVL_CONST (GVL)
AC_RMP_FBCommunication ¶ IRMPFBCommunication (Interface) CyclicCall (Method) InitializeCommunicationFBConnections (Method) InitializeCommunicationParameters (Method) InitializeReceiveBuffers (Method) InitializeSendBuffers (Method) ReceiveComAdress (Property) ReceiveCounter (Property) SendCounter (Property) SendToComAdress (Property) RMPVarData (Struct)
IRMPFBCommunication (ITF) ¶ INTERFACE IRMPFBCommunication EXTENDS __SYSTEM.IQueryInterface Implement this interface for a custom FB in the POU-Pool (or a library in the POU Pool), so be available as FB used for the RMP-Communication accross the network. For each App1-App2 connection a pair of two FBs (one in App1 and one in App2) is instantiated. FBs implementing this interface have to transmit and receive given data via some kind of network connection connection two applications of modules running on the latter. The following functions a comprised by this interface: IRMPFBCommunication.InitializeCommunicationParameters is called before the Cyclic-RMP-Communication and provides you with the communication addresses of the application to receive messages from and to send messages to; this methods functionallity is mandatory IRMPFBCommunication.InitializeReceiveBuffers provides you with pointers to the buffers holding the RMP data and mirrored variables to be received; this methods functionallity is mandatory IRMPFBCommunication.InitializeSendBuffers provides you with pointers to the buffers holding the RMP data and mirrored variables to be sent; this methods functionallity is mandatory IRMPFBCommunication.CyclicCall is called cyclically after the initialization functions have been called; use this method to implement all the communcational need for ina network connection, receiving via this connection and sending sending via this connection in respect to the given communication addresses. Directly read/write from/to the given buffers; this methods functionallity is mandatory The property IRMPFBCommunication.ReceiveCounter returns the count of received full data sets; as long as no data was received, this property shall return 0; this methods functionallity is mandatory for a working RMP communication using custom FBs The property IRMPFBCommunication.SendCounter returns the count of sent full data sets and sent via any network; this methods functionallity is mandatory for a working RMP communication using custom FBs Properties: ReceiveComAdress ReceiveCounter SendCounter SendToComAdress Methods: CyclicCall InitializeCommunicationFBConnections InitializeCommunicationParameters InitializeReceiveBuffers InitializeSendBuffers Structure: CyclicCall (Method) InitializeCommunicationFBConnections (Method) InitializeCommunicationParameters (Method) InitializeReceiveBuffers (Method) InitializeSendBuffers (Method) ReceiveComAdress (Property) ReceiveCounter (Property) SendCounter (Property) SendToComAdress (Property)
IRMPFBCommunication.CyclicCall (METH) ¶ METHOD CyclicCall : BOOL This method is called cyclically after the initialization functions have been called; use this method implement all the communcational need for ina network connection, receiving via this connection and sending sending via this connection in respect to the given communication addresses. Directly read/write from/to the given buffers. InOut: Scope Name Type Return CyclicCall BOOL
IRMPFBCommunication.InitializeCommunicationFBConnections (METH) ¶ METHOD InitializeCommunicationFBConnections : BOOL This method is called before the Cyclic-RMP-Communication AND provides you with a complete List of all locally (on one application) generated communication FBs (including the this instance). InOut: Scope Name Type Comment Return InitializeCommunicationFBConnections BOOL Input pComFBs POINTER TO IRMPFBCommunication The list of locally generated communication FBs udiComFBsCount UDINT This is the number of locally generated communication FBs pComFBs
IRMPService.IsMessageSent (METH) ¶ METHOD IsMessageSent : BOOL This method is used internally. Checks if a send message has been sent and acknowledged; InOut: Scope Name Type Comment Return IsMessageSent BOOL Input uiHandle UINT The message to check for if it was sent
IRMPService.LocalAppID (PROP) ¶ PROPERTY LocalAppID : UINT The ID of the application the current RMP (Reliable Message Protocoll) service belongs to
IRMPService.QueueSendMessage (METH) ¶ METHOD QueueSendMessage : UINT This method is used internally. Use the function block RMPSendMessage instead. This method adds a message to send into the send queue and returns a handle, that enables to check if the transmission was successful FFFF indicates that the buffer is full and the message was not transmitted FFFE indicates that the receiver module is in the same application and that the transmission was successful InOut: Scope Name Type Comment Return QueueSendMessage UINT Input udiSenderID UDINT The sender ID of the message (see function description for details) udiReceiverID UDINT The receiver ID of the message (see function description for details) tValidity TIME The time this message remains valid pmdData POINTER TO ARRAY [0..63] OF BYTE Data
IRMPService.Receive (METH) ¶ METHOD Receive : UDINT This method is called by each module that is able to receive a message it takes the oldest received message for uiReceiverID and acknowledges it. Returns 16#FFFFFFFF if there is no message waiting for the receiver. Returns 16#FFFFFFFE if there is at least one message waiting for the receiver, if the oldest message is currently locked by a different task. In all other cases, the communication address of the sender is returned. A possible call semantic could be: udiRec := Environment^.rmps.Receive(uiReceiverModuleID:=UDINT_TO_UINT(ComAddress AND 16#FFFF), pmd:=ADR(mdData)); Where udiRec returns the address of the module/communicator from which the message was received. Accesing this function was done using the environemin any module implementing IModule . InOut: Scope Name Type Comment Return Receive UDINT Input uiReceiverModuleID UINT The (local) address of the receiver, which equals the first 16bit of the ComAddress (see AND 16#FFFF) pmd POINTER TO ARRAY [0..63] OF BYTE The message data buffer to write to
IRmpService2 (ITF) ¶ INTERFACE IRmpService2 EXTENDS IRmpService Interface implemented by the RMP (Reliable Message Protocoll) service Methods: GetIsActionOngoing SetIsActionOngoing Structure: GetIsActionOngoing (Method) SetIsActionOngoing (Method)