Knowledge Base

ReadCoil(s) – 1, SlaveAddr, CoilAddr16, ItemCount, SPAddr16

A ModBus Master script command

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

Parameters are:

Item   Bit LengthDescription
SlaveAddr8An 8-bit slave address
CoilAddr1616The 16-bit, 0-based address of a coil (0xxxx reference) in the slave. This will be the starting point for the read.
ItemCount8An 8-bit count of how many coils are to be read. The minimum is 1. The maximum is determined by available communications buffer size (documented elsewhere). ItemCount contiguous items will be read.
SPAddr1616A 16-bit semaphore address within the SPLat master’s RAM, counting from RAM byte 0, bit 0. For example, RAM byte 34, bit 5 would be 34×8 + 5 = 277. The ItemCount single bit items read from the slave will be stored in these semaphores.