7.5 UA_ServerGetIndexByUriList

FB-Name UA_ServerGetIndexByUriList
This Function Block is used to get several server-indexes of server-URIs
VAR_INPUT
BExecuteBOOLFB performs its task on rising edge on this input.
BConnectionHdlDWORDConnection handle.
BServerUrisCountUINTNumber of ServerUris in Array of ServerUris.
BServerUrisARRAY OF
Vendor specific

Shall be STRING or WSTRING. The recommendation for new implementation is to use WSTRING.

Array of Vendor specific with the ServerUris.

See Constants of Array Lengths (MAX_ELEMENTS_NAMESPACES)

BTimeoutTIMEMaximum time to response.
VAR_OUTPUT
BDoneBOOLFB has completed its task.
BBusyBOOLThe FB is not finished and new output values are to be expected.
BErrorBOOLSignals that an error has occurred within the FB.
EErrorIDDWORDError code.
BErrorIDsARRAY OF
DWORD

Error codes. Array shall be the same number of elements as ServerUrisCount.

See Constants of Array Lengths (MAX_ELEMENTS_NAMESPACES)

BServerIndexesARRAY OF
UDINT

Server Indexes. Array shall be the same number of elements as ServerUris.

See Constants of Array Lengths (MAX_ELEMENTS_NAMESPACES)

Notes: Reads the Server-Object ServerArray (NS:0; Id: 2254) and returns the indexes of the requested elements which can be used in subsequent calls where the Server-Array-Index is required - e.g. UA_Browse.

This is a convenient function call – could also be done with ReadList and the returned unknown array length of the ServerArray could be evaluated in the user program.

In case the requested ServerUri is not found the error PLCopenUA_Bad_NSNotFound will be returned in the corresponding ErrorIDs.

UA_ServerGetIndexByUriList
BOOLExecuteDoneBOOL
DWORDConnectionHdlBusyBOOL
UINTServerUrisCountErrorBOOL
ARRAY of Vendor specificServerUrisErrorIDDWORD
TIMETimeoutErrorIDsARRAY of DWORD
ServerIndexesARRAY of UINT