Main Content

Two Way Interprocess Communication

This example shows how to two-way interprocess data communication between two processors running in an operating system managed processor.

Model

Process1 sends a data message, using the Interprocess Data Write block, to the Interprocess Data Channel block at a 0.01 second intervals. Process2 receives and processes the data messages asynchronously, using the Interprocess Data Read block. The processed data returns to the first process and is received by an asynchronous task.

Results

In the Simulation tab, click Run. When the simulation completes, open the Simulation Data Inspector to view the resulting signals and task executions. Process1 sends the data packet at the completion of Task11. Task21 in Process2 triggers upon receiving the event, processes the data packet, and sends the packet back to Process1. Task12 in Process1 executes immediately upon receiving the data packet, preempting Task11.