ClientRequestReadDiscreteInputs
(FB)
FUNCTION_BLOCK ClientRequestReadDiscreteInputs EXTENDS ClientRequestReadBits
ReadDiscreteInputs client request (FC02).
For details about client request see ClientRequest.
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
xExecute
BOOL
Rising edge: Starts defined operationFALSE
: Resets the defined operation after ready condition was reachedETrigTo
udiTimeOut
UDINT
Max. operating time for executing [µs], 0: No operating time limit
ETrigTo
Output
xDone
BOOL
Ready condition reached
ETrigTo
xBusy
BOOL
Operation is running
ETrigTo
xError
BOOL
Error condition reached
ETrigTo
Inout
rClient
Reference to Client.
Input
uiUnitId
UINT
0
Unit-Id to send the request to.
udiReplyTimeout
UDINT
(50 * 1000)
Reply timeout in µs - accepted maxmimum time between request message send and reply message receveived - default 50ms.
uiMaxRetries
UINT
0
Maximum number of request retries in case of “reply timeout”.
Output
eErrorID
Error status
eException
Request exception code.
uiRetryCnt
UINT
0
Number of request retries in case of “reply timeout”.
Input
uiStartItem
UINT
0
First “data item” to read.
uiQuantity
UINT
1
Number of “data items” to read. ReadCoils / ReadDiscreteInputs: 1 to 2000 ReadHoldingRegisters / ReadInputRegisters: 1 to 125
pData
POINTER TO ARRAY [0..0] OF BOOL
0
Pointer to result data array, memory has to be provided by caller.