Skip to content

mbus CSDB Message At Index.vi


Description

CSDB Message At Index is used to extract a CSDB message out from an array of CSDB messages. Each message is an array of three or four 16-bit words.

Refer to CSDB message format for description of the Multibus CSDB message format.

Parameters  
error in in error conditions that occur before entering the function
buffer in array of 16-bit words containing the CSDB messages
wordCount in number of words in the array
msgSize in CSDB message size in bytes (6 or 8 bytes)
msgIndex in word index of the CSDB message to extract
message out 16-bit words array containing the CSDB message at index
nextIndex out index of the next CSDB message in the array
error out out error information
function return out function execution status

Considering the following CSDB Message array populated with three messages. The array contains messages at words index 0, 3 and 6. The array wordCount is 9.

CSDB word index 16-bit word
Word #0 0x0011
Word #1 0x2233
Word #2 0xC1E1
Word #3 0x4455
Word #4 0x6677
Word #5 0xC2E2
Word #6 0x8899
Word #7 0xAABB
Word #8 0xC3E3

Calling mbus CSDB Message At Index with index input parameter to 0 will return the fisrt message. The nextIndex output parameter will return the value 3, the index of the next message.

Message #0 (at word Index 0) 16-bit words
Word #0 0x0011
Word #1 0x2233
Word #2 0xC1E1

Status is 0xC1 Label is 0xE1

Calling mbus CSDB Message At Index with index input parameter to 3 will return the second message. The nextIndex output parameter will return the value 6, the index of the next message.

Message #1 (at word Index 3) 16-bit words
Word #0 0x4455
Word #1 0x6677
Word #2 0xC2E2

Status is 0xC2 Label is 0xE2,

Calling mbus CSDB Message At Index with index input parameter to 6 will return the second message. The nextIndex output parameter will return the value 9, the index of the next message in the array.

Message #2 16-bit words
Word #0 0x8899
Word #1 0xAABB
Word #2 0xC3E3

Status is 0xC3 Label is 0xE3,

Calling mbus CSDB Message At Index with index input parameter to 9 will return an error.


Availability

Available in Multibus VI 1.3 and later.

See Also

-

Example

_