ClientRequestReadWideRegisters (FB)¶
FUNCTION_BLOCK ABSTRACT ClientRequestReadWideRegisters EXTENDS ModbusFB.ClientRequestRead
Read client request base class for ReadHoldingRegistersWide and ReadInputRegistersWide
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
xExecuteBOOLRising edge: Starts defined operationFALSE: Resets the defined operation after ready condition was reachedETrigTo
udiTimeOutUDINTMax. operating time for executing [µs], 0: No operating time limit
ETrigTo
Output
xDoneBOOLReady condition reached
ETrigTo
xBusyBOOLOperation is running
ETrigTo
xErrorBOOLError condition reached
ETrigTo
Inout
rClientClientReference to |Client|.
ClientRequest
Input
uiUnitIdUINT0
Unit-Id to send the request to.
ClientRequest
udiReplyTimeoutUDINT(50 * 1000)
50 ms
ClientRequest
uiMaxRetriesUINT0
Maximum number of request retries in case of “reply timeout”.
ClientRequest
Output
eErrorIDErrorError status
ClientRequest
eExceptionExceptionCodesRequest exception code.
ClientRequest
uiRetryCntUINT0
Number of request retries in case of “reply timeout”.
ClientRequest
Input
uiStartItemUINT0
First “data item” to read.
ClientRequestRead
uiQuantityUINT1
Number of “data items” to read. ReadCoils / ReadDiscreteInputs: 1 to 2000 ReadHoldingRegisters / ReadInputRegisters: 1 to 125
ClientRequestRead
pDataPOINTER TO BYTE
0
Pointer to result data, memory has to be provided by caller.
uiDataItemSizeUINT“data item” size / register width (in bytes). The ClientRequest has to know about the “data item” size a-priori to provide memory for result data. In case the server unexpectedly does have a different “data item” size than assumed, the ClientRequest can not succeed.