ITcAdsServiceSimplex.TryReadState
Reads the ADS status and the device status from an ADS server. Unlike the ReadState method this method does not call an exception on failure. Instead an AdsErrorCode is returned. If the return value is equal to AdsErrorCode.NoError the call was successfull.
int TryReadState (
string netId,
int port,
out StateInfo stateInfo
);
Parameters
netId | NetID of the target AMS Router. |
port | Port of the target AMS Router. |
stateInfo | Output reference of type StateInfo which will receive the data. |
Return Value
AdsErrorCode
SOAP Error Faults
Type | Description |
---|---|
The AdsErrorFault is returned if an AdsException is thrown by a TcAdsClient object in a method of the TwinCAT ADS WCF service. | |
The AdsErrorErrorFault is returned if an AdsErrorException is thrown by a TcAdsClient object in a method of the TwinCAT ADS WCF service. | |
The UnexpectedErrorFault is returned if an unexpected Error occurs. |