User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
custom_protocols [2020/01/02 10:56]
emozolyak [readRegister]
custom_protocols [2020/02/07 12:50] (current)
emozolyak [readRegister]
Line 93: Line 93:
 Three parameters are passed to it as arguments: Three parameters are passed to it as arguments:
  
-reg - Table (structure) with register parameters +  ***reg** - Table (structure) with register parameters 
-device - Table (structure) with register type parameters (that were defined in createDevices) +  ***device** - Table (structure) with register type parameters (that were defined in createDevices) 
-unitId – device ID for the bus or other ID. For instance, Slave ID in ModBus RTU or Unit ID in ModBus TCP. +  ***unitId** – device ID for the bus or other ID. For instance, Slave ID in ModBus RTU or Unit ID in ModBus TCP. 
-There are such attributes in the reg structure:+There are such attributes in the __reg__ ​structure:
  
-internalAddr - Recalculated register address. This number is recalculated from the specified number system with shift added to it. +  *internalAddr - Recalculated register address. This number is recalculated from the specified number system with shift added to it. 
-addr - The original address of the register that the user entered. +  *addr - The original address of the register that the user entered. 
-dataType – The type of data that the user specified for the register. 0 = Bit, 1 = Byte, 2 = Word, 3 = Double Word, 4 = UnixTime +  *dataType – The type of data that the user specified for the register. 0 = Bit, 1 = Byte, 2 = Word, 3 = Double Word, 4 = UnixTime 
-There are such attributes in the device ​structure:+There are such attributes in the __device__ ​structure:
  
-shift - The shift value from the corresponding row in createDevices +  *shift - The shift value from the corresponding row in createDevices 
-base - base value from the corresponding row in createDevices +  *base - base value from the corresponding row in createDevices 
-xtraFields – xtraFields value from the corresponing row in createDevices+  *xtraFields – xtraFields value from the corresponing row in createDevices
 These parameters are passed in order to be able to correctly and fully compose a request according to the protocol. These parameters are passed in order to be able to correctly and fully compose a request according to the protocol.
  

Page Tools