ET_Result

Overview

Type:

Enumeration

Available as of:

V1.0.0.0

Description

The enumeration ET_Result contains the possible values that indicate the result of operations executed by the function block.

Enumeration Elements

Name

Data type

Value

Description

If q_xError of a function block is FALSE, the following status message is shown.

Ok

UDINT

0

Operation completed successfully.

Disabled

UDINT

2

The function block is disabled.

Disabling

UDINT

3

Ongoing disabling process of the function block (only set by FB_SqlDbRequest).

Connected

UDINT

4

The connection to the SQL Gateway is successfully established.

Connecting

UDINT

5

The client is connecting to the SQL Gateway.

Processing

UDINT

6

SQL request is currently proceeding

If q_xError of a function block is TRUE, one of the following status messages is shown.

TcpClientIssue

UDINT

1

The TCP operation was not completed successfully. General TCP issue, refer to the TcpUdpCommunication Library Guide.

InvalidIP

UDINT

26

The given IP address is not valid.

ClientNotConnected

UDINT

28

The client is not connected to the TCP server. Verify that the SQL Gateway is installed and running within the specified IP address and port.

ConnectionTimedOut

UDINT

41

Remote system is not available or is not answering the request. Verify that the SQL Gateway is installed and running within the specified IP address and port.

CertificateNotFound

UDINT

56

The default certificate of the controller could not be found in the certificate store of the controller.

InitTlsContextFailed

UDINT

58

Internal error detected while initializing the TLS context. Up to 10 different TLS contexts can be open at the same time. Ensure that not more than 10 TCP sockets using TLS are open at the same time.

DbConnectionNameNull

UDINT

61

DbConnectionName is empty (Null). Element wsDbConnectionName from input iq_stConnSettings or iq_stExtendedConnSettings is blank.

DataBufferTooSmall

UDINT

63

User buffer is insufficient for returning data. Matching the returning numbers of rows and columns with the settings in the global parameter list, you can find the minimum settings at q_uiRetNumOfRows (q_uiRetNumOfColumns) of FB_SqlDbRead or FB_SqlDbRequest  (read) after each execution.

SqlDatabaseBusy

UDINT

64

A former request is currently being processed. Another instance with the same input for iq_stConnSettings is currently executed (output q_xBusy = TRUE) or with the same input iq_stExtendedConnSettings is currently active (output q_xActive = TRUE).

SqlGwToPlcCorruptedMessage

UDINT

65

Controller received an invalid message from the SQL Gateway. Contact your local Schneider Electric support.

TimeoutExpired

UDINT

66

Function block operation timeout expired. Verify the setting of the input iq_stConnSettings.timSqlTimeout or iq_stExtendedConnSetting.timSqlTimeout (timSqlConnectionTimeout). Depending on the system configuration, the default value must be increased.

TransactionNumMismatch

UDINT

67

Transaction number mismatch. Contact your local Schneider Electric support.

TransmissionNumMismatch

UDINT

68

Transmission number mismatch. Contact your local Schneider Electric support.

ConnectionNotIdle

UDINT

69

TcpUdp client connection already occupied with another service.Verify that no other instance of TCPUDP.FB_TCPClient inside your application occupies the connection.

SocketNotClosed

UDINT

70

Method Shutdown or Close from TcpUdp client not successful. TCP connection issue. Restart your controller.

NoDataReturned

UDINT

71

The function block FB_SqlDbGetData does not provide any data. The SQL request was executed successfully but no data returned. Verify that the assigned database contains data.

NotConnected

UDINT

72

TcpUdp client system is not ready to receive or transmit data. TCP connection issue. Restart your controller.

TimeoutValueInvalid

UDINT

73

Timeout value is invalid. It must be greater than 0 s.

InvalidPort

UDINT

80

The given port number is equal to zero.

InvalidWstringNumber

UDINT

81

The input i_uiNumOfWstrings is less than 1 or greater than GPL.Gc_uiMaxRequest.

Verify the i_uiNumOfWstrings input. At least one WSTRING is required.

Also verify that the given number is greater than the limit GPL.Gc_uiMaxRequest (GPL).

InvalidRequestWstring

UDINT

82

Empty request string or invalid reference (NULL). Verify the i_refRequestWstring input. The first WSTRING (i_refRequestWstring[1]) must contain any character. Verify that if the input is assigned.

InvalidUserDataWstring

UDINT

83

Invalid user data reference (NULL). Verify that the i_refUserData input is assigned.

InvalidSqlRequest

UDINT

84

Input i_etSqlRequest not equal to Read (0) or Write (1).

GplMaxRowsExceedsLimits

UDINT

85

GPL.Gc_uiMaxRows is out of range. Verify the settings of Global Parameter List.

GplMaxColumnsExceedsLimits

UDINT

86

GPL.Gc_uiMaxColumns is out of range. Verify the settings of Global Parameter List.

GplTableWstringExceedsLimits

UDINT

87

GPL.Gc_uiTableWstringLength is out of range. Verify the settings of Global Parameter List.

GplRequestWstringExceedsLimits

UDINT

88

GPL.Gc_uiRequestWstringLength is out of range. Verify the settings of Global Parameter List.

GplMaxRequestExceedsLimits

UDINT

89

GPL.Gc_uiMaxRequest is out of range. Verify the settings of Global Parameter List.

GplMaxRecBufferExceedsLimits

UDINT

91

GPL.Gc_uiRecBufferLength is out of range. Verify the settings of Global Parameter List.

GplMaxSendBufferExceedsLimits

UDINT

92

GPL.Gc_uiSendBufferLength is out of range. Verify the settings of Global Parameter List.

ConnectionNameNotExisting

UDINT

100

SQL Gateway connection name does not exist. Verify available database connections from SQL Gateway console.

DbConfigurationInvalid

UDINT

101

SQL Gateway connection configuration does not match. Execute Test Database Connection from SQL Gateway console.

DbConnectionNotAvailable

UDINT

102

SQL Gateway connection to the database does not work. Execute Test Database Connection from SQL Gateway console.

SqlGwProtocolError

UDINT

120

Protocol error between SQL library and gateway detected. Contact your local Schneider Electric support.

CommandExecutionIssue

UDINT

150

Execution of the SQL request not successful. Verify i_refRequestWString input according to the required SQL syntax. Refer to SQL server manual.

NoQueryResultAvailable

UDINT

151

SQL Gateway does not provide an answer. Verify that the addressed database contains any data with an additional application.

SqlGwInvalidLicense

UDINT

170

SQL Gateway license issue. Open the License Manager to verify that SQL for EcoStruxure Machine Expert is valid.

SqlGwUnexpectedError

UDINT

199

SQL Gateway error detected. Contact your local Schneider Electric support.

NOTE: The results in the range 100...199 are messages from SQL Gateway. Refer to SQL Gateway User Guide.

Used By

oFB_SqlDbRead

oFB_SqlDbWrite

oFB_SqlDbRequest