msgcount - Number of messages in read-enabled channel queue

Syntax

msgcount(rx,'channel')

Description

msgcount(rx,'channel') returns the number of unread messages in the read-enabled queue specified by channel for the RTDX™ interface rx. You cannot use msgcount on channels configured for write access.

Examples

If you have created and loaded a program to the target processor, you can write data to the target, then use msgcount to determine the number of messages in the read queue.

  1. Create and load a program to the target.

  2. Write data to the target from MATLAB® software.

    indata=1:100;
    writemsg(cc.rtdx,'ichannel', int32(indata));
    
  3. Use msgcount to determine the number of messages available in the queue.

    num_of_msgs = msgcount(cc.rtdx,'ichannel')
    

See Also

read, readmat, readmsg

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS
 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS