At a Glance

The communication functions allow one device to communicate with another device.

Some of these functions are common to several types of communication channels, others may be specific to a single communication channel.

Communication functions are processed asynchronously regarding the application task that is used to activate them (except SEND_TLG and RCV_TLG). A communication function is asynchronous when it is executed during one or several cycles after the cycle in which it has been activated.

Several communication function blocks can be programmed on the same communication port. If the maximum number of communication blocks is exceeded on a port, the exceeding blocks are not serviced until a transaction path is released. When the transaction path resource becomes free, the next block on the same port becomes active and uses the released path.

The purpose of this topic is to describe the management of the communication functions according to their type:

  • EF and procedure type functions

  • EFB type functions

NOTE: Placing a communication EF in the FAST task does not increase the EF processing speed, nor does it increase the communication execution speed. All communications – including the physical release of the messages over all communication links -– are executed at the end of the MAST task, even if the communication EF is processed in the FAST task.

EF and Procedure Type Communication Functions

The EF and procedure type communication functions are managed as follows:

Launching a communication:

The function is called inside the task. Calling the function launches the communication if EN input is set to 1.

Monitoring a communication:

The CPU operating system handles the communication autonomously. It is processed asynchronously regarding the application task that activated the function. It is not required to execute the function again once it has been activated. User monitors the communication process through management parameters updated by the operating system.

While the communication is ongoing, the activity bit parameter is set to 1. Once the communication is completed (with or without detected error), the activity bit parameter is set to 0. As the communication may require multiple task cycles to be completed, testing the activity bit parameter allows to know when the communication has ended.

For a communication requiring multiple task cycles to be completed: to execute the function once, reset EN input to 0 after the communication function launch and before next task cycle. To maintain a continuous communication activity, let the EN input set to 1.

Launching a new communication:

Two situations are faced:

  • The function is called once when a communication is required (edge triggering): call the function with EN input set to 1 to launch the communication, and reset EN (0) before next task cycle.

  • The function is cyclically called in a task: if the activity bit parameter is set to 0 (previous communication has ended, tested by the function itself when it is called) the function internal process launches a new communication. This situation leads to a continuous communication.

    To avoid launching a communication in the next task cycle, reset EN input to 0.

EFB Type Communication Functions

The EFB type communication functions are managed as follows:

Launching a communication:

The function is called inside the task, but depends on ENABLE input state. To launch the communication, the ENABLE and EN inputs must be set to 1 when the function is called.

Monitoring a communication:

The function is processed during the task. If the communication requires many task cycles to be completed, the function must be called and enabled in the task at each cycle.

While the communication is ongoing, ACTIVE output is set to 1. Once the communication is completed (with or without detected error), the ACTIVE output is set to 0.

For a communication requiring multiple task cycles to be completed:

  • Once the communication function has been launched, the ENABLE and EN inputs need to be set to 1 during the ongoing communication process. The ACTIVE output value can be used as a condition to manage the ENABLE input of the function. An example is provided in the section on M580 communication functions description.

  • If the ENABLE or EN input is set to 0 during a task, the function activity is disabled and frozen. The function activity resumes in a following cycle if the ENABLE and EN input are set to 1.

Launching a new communication:

The function is cyclically called in a task for monitoring purposes.

When the function is called, the activity is tested by the function itself. If the function is not active (previous communication has ended), the ENABLE and EN inputs must be set to 1 to launch a new communication.

To launch the communication function only once, the ENABLE input needs to be set to 0 when the ACTIVE output is read at 0.

The following figure shows in detail the role and operation of ENABLE, ACTIVE, DONE (or SUCCESS) and ERROR parameters:

1 DONE = 1 if no detected error, DONE = 0 if detected error

2 ERROR = 0 if no detected error, ERROR = 1 if detected error

The ENABLE parameter is written by the application. The ACTIVE, DONE, and ERROR parameters are read by the application.