I am using “ITL_FTP_FileCopy” in IT_Library trying to copy one file from a PLC to another PLC. However, both the “strLastResponseSourceFTP” and “strLastResponseDestFTP” report “DIAG: Both sockets are occupied by this client”. DiagCode displays “16#C101” wAddDiagCode is"16#C330".
I attached the screenshot for the reference. ITL_FTP_FileCopy.jpg Could anyone figure out what is the problem? Thanks
ITL_FTP_FileCopy.udtDiag.wDiagCode = 16#C101 = Source FTP : error during IP connection
ITL_FTP_FileCopy.udtDiag.wAddDiagCode = 16#C330 = IPC_SOCKET error code = Error of the TCP/UDP/TLS_SOCKET firmware function block
udtIP_Socket_Source.udtDiag.wDiagCode = ?
udtIP_Socket_Source.udtDiag.wAddDiagCode = ?
udtIP_Socket_Dest.udtDiag.wDiagCode = ?
udtIP_Socket_Dest.udtDiag.wAddDiagCode = ? You can find infos about these diag codes in the IT_Library documentation appendix 16#C001 Socket creation failed.
16#C002 IP has wrong format.
16#C003 Memory allocation failed.
16#C100 Unexpected error during connecting of a client to a server. TCP/TLS_SOCKET
16#C101 Unexpected error during receive operation. UDP/TCP/TLS_RECEIVE
16#C102 Unexpected error during send operation. UDP/TCP/TLS_SEND
16#C103 Unexpected error during bind operation. UDP_SOCKET
16#C104 Unexpected error during listen operation. TCP/TLS_SOCKET
16#C105 Unexpected error during accept operation. TCP/TLS_SOCKET
16#C150 The TLS parameterization of the TLS_SEND/TLS_RECEIVE function blocks is inconsistent with the TLS_SOCKET function block.
This is the case when:
TLS_SEND/TLS_RECEIVE require secure transmission/reception of data (SEND_SECURE/RECEIVE_SECURE input = TRUE), but the socket is not yet initialized for TLS communication (START_TLS input of TLS_SOCKET is FALSE).
TLS_SEND/TLS_RECEIVE require insecure transmission/reception of data (SEND_SECURE/RECEIVE_SECURE input = FALSE), but the socket is already initialized for TLS communication (START_TLS input of TLS_SOCKET is TRUE).
TLS_*
16#C151 An error regarding the START_TLS input of the TLS_SOCKET function block has occurred. START_TLS was set from TRUE to FALSE during opened TLS socket (ACTIVE input = TRUE). This is the case when: TLS_*
16#C201 There are too many open sockets in the underlying socket provider.
16#C202 An operation on a nonblocking socket cannot be completed immediately.
16#C204 The datagram is too long.
16#C205 Only one use of an address is normally permitted.
16#C206 The selected IP address is not valid in this context.
16#C207 The connection was aborted by the .NET Framework or the underlying socket provider.
16#C208 The connection was reset by the remote peer.
16#C210 The application tried to send or receive data, and the Socket is not connected (_SOCKET.ACTIVE == False).
16#C211 No such host is known. The name is not an official host name or alias.
16#C212 An unspecified System.Net.Sockets. Socket error has occurred.
16#C213 The remote host is actively refusing a connection.
16#C214 An invalid argument was supplied to a System.Net.Sockets.Socket member.
16#C215 A blocking operation is in progress.
16#C216 The overlapped operation was aborted due to the closure of the System.Net.Sockets.Socket.
16#C217 The application has initiated an overlapped operation that cannot be completed immediately.
16#C218 A blocking System.Net.Sockets.Socket call was canceled.
16#C219 An attempt was made to access a System.Net.Sockets.Socket in a way that is forbidden by its access permissions.
16#C21A An invalid pointer address was detected by the underlying socket provider.
16#C21B A System.Net.Sockets.Socket operation was attempted on a non-socket.
16#C21C A required address was omitted from an operation on a System.Net.Sockets.Socket.
16#C21D An unknown, invalid, or unsupported option or level was used with a System.Net.Sockets.Socket.
16#C21E The protocol type is incorrect for this System.Net.Sockets.Socket.
16#C21F The protocol is not implemented or has not been configured.
16#C220 The support for the specified socket type does not exist in this address family.
16#C221 The address family is not supported by the protocol family.
16#C222 The protocol family is not implemented or has not been configured.
16#C223 he address family specified is not supported. This error is returned if the IPv6 address family was specified and the IPv6 stack is not installed on the local machine. This error is returned if the IPv4 address family was specified and the IPv4 stack is not installed on the local machine.
16#C224 The network is not available.
16#C225 No route to the remote host exists.
16#C226 The application tried to set System.Net.Sockets.SocketOptionName. KeepAlive on a connection that has already timed out.
16#C227 No free buffer space is available for a System.Net.Sockets.Socket operation.
16#C228 A request to send or receive data was disallowed because the System.Net.Sockets.Socket has already been closed.
16#C229 The connection attempt timed out, or the connected host has failed to respond.
16#C22A The operation failed because the remote host is down.
16#C22B There is no network route to the specified host. Could not connect to DEST_IP.
16#C22C Too many processes are using the underlying socket provider.
16#C22D The network subsystem is unavailable.
16#C22E The version of the underlying socket provider is out of range.
16#C22F The underlying socket provider has not been initialized.
16#C230 A graceful shutdown is in progress.
16#C231 The specified class was not found.
16#C232 The name of the host could not be resolved. Try again later.
16#C233 The error is unrecoverable or the requested database cannot be located.
16#C234 The requested name or IP address was not found on the name server.
The PLC running this IT library FB has IP address “192.168.1.11” The remote PLC has IP address “192.168.1.12” These two PLCs and my laptop running PLCnext Engineer are connecting to the same switch.
I cannot find the diag code for “16#C330” in the IT_Library documentation appendix
From “16#C213 The remote host is actively refusing a connection”, I can see the remote PLC is not allowed to be connected but two PLCs is connecting to the same switch. What is the reason PLC is not allowed to be connected?
Both of the PLCs have the firmware “2020.0 LTS” The user and password is setting correctly in the pin of “ITL_FTP_FileCopy”. Currently port number 21 is used. I am not sure if I should change it to 22.
This means that the PLC at “192.168.1.12” is a AXC F 2152 too? You cannot connect to a PLCnext PLC by FTP. Only SFTP is supported, please refer to AXC F 2152 handbook. For SFTP currently no function blocks are avaibale in IT_Library. The message “DIAG: Both sockets are occupied by this client” is a status message, not an error message and is OK.
Is there a plan to release a IT library for SFTP? We have a heavy task which needs the distributed computing and share the result (csv file) between PLCs.
Yes, we have multiple AXC F 2152 and tried to do SFTP between them.