Layer-7 Application Programming Interface |
||||
- | ||||
CONTENTS
TECHNOLOGY |
Definition of Process Data ChannelsMicroMessaging uses Process Data Channels for transporting process data. On layer 2 a data channel corresponds to a single message. As a result a single data channel can have up to 8 bytes. Each individual node can have multiple process data channels. An application may place multiple variables into each process data channel. The only limiting rules are: 1. A single variable must consist of 1, 2, 3 or 4 bytes. 2. The total number of bytes in a process data channel is limited to 8. 3. All variables of one process data channel must be located sequentially in the process image (starting at a specified offset, number of bytes as specified by DLC). 4. Numeric multiple-byte variables must be transferred in "Little Endian" format (lowest significant byte comes first). |
Required Common ServicesThe initialization services required at the layer 7 level are functions to initialize the MicroMessaging protocol stack and the process data channels. Once variables are assigned to the process data channels, the application may simply read and write the process data at any time. Per default the MicroMessaging protocol stack will operate independently and transport and update the process data as required. A more optimized communication model is available with two optional functions: Via a call-back function the MicroMessaging stack informs the application that new data arrived in a process data channel and with a function call the application can inform the MicroMessaging protocol stack that new process data was placed into one of the channels. The default operation mode is to simply call the main function MM7_Process repeatedly in the background task (typically the main while(1) loop).
|