17
status, value = mread (module, width, offset)
Description:
Reads an M-Module register from a specified M-Module position.
Parameters:
module
Integer indicating the M-Module position to read. (0 – 7)
width
Integer specifying the access width in bytes
2 = 16-bit
4 = reserved for future use
offset
Integer specifying the register offset to read. This value must be
bounded by the width parameter. For example, if width = 2 then this
value must be a multiple of 2 (0, 2, 4…). If width = 4 then this value
must be a multiple of 4 (0, 4, 8…). Valid values are 0 - 0xFF.
Return:
status
Integer status of the M-Module read (0 = success)
value
Integer value read from the M-Module register
status, buffer = mreadblock (module, width, offset, length)
Description:
Read a block of M-Module registers from a specified M-Module position. The
function will read
length
words incrementing the address between each read
Parameters:
module
Integer indicating the M-Module position to read. (0 – 7)
width
Integer specifying the access width in bytes. This value also
determines the increment of the address for each read in the block.
2 = 16-bit
4 = reserved for future use
offset
Integer specifying the register offset to read. This value must be
bounded by the width parameter. For example, if width = 2 then this
value must be a multiple of 2 (0, 2, 4…). If width = 4 then this value
must be a multiple of 4 (0, 4, 8…). Valid values are 0 - 0xFF.
length
Integer indicating the number of words of size
width
to read.
Return:
status
Integer status of the block read (0=Success)
buffer
Buffer of data from the block read