Documentation

Determine Whether a Queue Is Nonempty

To determine whether a queue is storing any entities, use this technique:

  1. Enable the n output signal from the queue block. In the block dialog box, on the Statistics tab, select the Number of entities in block, n check box.

  2. From the Sinks library in the Simulink® library set, insert a Scope block into the model. Connect the n output port of the queue block to the input port of the Scope block.

The scope shows if the queue is empty.

See Also

|

Related Examples

More About

Was this topic helpful?