I have a question or better said problem with the FTP server of the PLC. If I delete a text file on the server and then copy a text file with the same name but a shorter length to the server, the content that was longer in the first file is copied into the second file on the server. It is merged, so to speak. This behavior is absolutely reproducible and occurs both with FileZilla and with our own tool (.NET). Has anyone ever observed this behavior?
thank you for your time. I have done further tests today and can say that the error is not directly on the FTP server, but generally has something to do with the file read access of the PLC. With a Windows fileshare there has also a problem occurred during deleting the file after it was opened with the PLC. I currently use the functionblocks FileOpen, FileRead and FileClose. I am not sure what it is, but the PLC seems to block the file somehow, even though it should be closed via the FileClose functionblock.
At first we forgot to call the FileClose block every time we accessed a file, but since we’ve been doing it correctly the error hasn’t occurred anymore. So far it seems to be working, although I have to say that this behavior shouldn’t have happened due to a missing FileClose call.
only as information for others maybe reading this thread in future:
if working with file devices on a FTP server, a file is transferred from / to the FTP server and is edited in the local memory of the client, since the server does not have the capability to edit a file directly at the remote location.
So the FileClose() is needed as “trigger” to (re)transfer the file to server.