ReadInRegs - 4, SlaveAddr, InRegAddr16, ItemCount, SPAddr16,NumFormat

A ModBus Master script command

When processed this command will result in the SPLat master sending out a ModBus function 4 query (Read input registers), then wait for and process the response.

Parameters are:

ItemBit LengthDescription
SlaveAddr 8 An 8-bit slave address
InRegAddr16 16 The 16-bit, 0-based address of an input register (1xxxx reference) in the slave. This will be the starting point for the read.
ItemCount 8 An 8-bit count of how many 16-bit registers are to be read. The minimum is 1. The maximum is determined by available communications buffer size (documented elsewhere). ItemCount contiguous registers will be read.
SPAddr16

16

A 16-bit RAM address within the SPLat master's RAM. The ItemCount 16-bit input registers read from the slave will be stored, starting from this address. The transfer is always in word mode with the first byte of each 2-byte word sent on the ModBus stored in the lowest address in the SPLat.   

NumberFormat

8

Specifies the number format sent from the slave, either byte (8 bits), word (16 bits, standard) or float together with the endianness of the value.