I am facing difficulties in getting the writeimageftp function to work properly. While it functions well within In-Sight Explorer, it fails to connect to my FTP server. I have In-Sight Explorer operational on my laptop and another computer hosting an IIS FTP server V5.0 on port 22. I am able to access the FTP server through Windows Explorer, as I have set it up for anonymous connection, eliminating the need for a login when connecting. File transfers between the laptop and server work seamlessly, suggesting the issue lies within the writeimageftp function in In-Sight. The code for the function is: WriteImageFTP($A$0,"192.168.0.100.22","admin","",$A$0,"Bad",999,0,1,0,1,0). Despite running the code, I do not encounter any visible errors. Is there a way to include error tracing or status display within the function?
To monitor activity on your FTP server for any incoming commands from Cognex, review the log file. Additionally, investigate the presence of '.22' at the end of the address as it may not be intended. For further insights and discussions, visit http://www.mvresource.com/index.php?name=Forums&file=viewtopic&t=25 or search 'Cognex WriteImageFTP' on Google.
I will investigate the log file for port number 22. I appreciate the link; I also inquired about this issue yesterday in the same forum. Thank you for the assistance.
In a forum post, a user named CharlesM clarified the port number for FTP connections, noting that while regular FTP typically uses port 21, Secure FTP often employs port 22. He suggested omitting the port number from the Host Address when setting up the connection.
When specifying the port, use :22 (colon) instead of .22 (dot 22). This simple adjustment can help ensure smooth connectivity and avoid any potential issues.
The In-Sight software communicates with the camera via FTP on port 21. The help file suggests using port 22 instead, which should resolve any issues. If you're seeing a "." instead of a ":", try adjusting the settings and checking the log file for more information. Thank you for the helpful suggestions.
It seems like you're dealing with a pretty tricky issue; thanks for providing so much detail. Based on your information, my first thought is the port connection. Port 22 is generally used for SSH, but FTP typically uses port 21 for command and control, and a range of ports for data transmission. That said, In-Sight's WriteImageFTP function might be trying to connect using a different port setup. Alternatively, the issue could be related to the empty password field. Even though it's an anonymous connection, you might need to pass an empty string ("") to avoid an undefined variable error. Lastly, as far as I know, In-Sight explorer doesn't have a direct way to trace errors related to this function. However, you could use the System Access log in your IIS server to trace the FTP conversation, and this might help you find where the process is failing.
First and foremost, check the format of your IP address and port number in the FTP string. In your posted function code, I noticed you wrote "192.168.0.100.22". The port number should be separated by a colon, not a period. So, it should be "192.168.0.100:22". As for the error tracing, unfortunately, there's no in-built provision for logging errors directly in In-Sight Explorer's FTP function. However, you could possibly use a try-catch block to handle exceptions, if any occur. Alternatively, consider adding some print statements to monitor the status of your FTP transaction. Make sure your FTP server logs are enabled as well for further troubleshooting.
It looks like you've done some thorough troubleshooting already, great job! A common issue with the WriteImageFTP function could be linked to permissions or directory access. Although you've set up the FTP server for anonymous connection, In-Sight Explorer might not interact with it the same way as Windows Explorer. As for error tracing, In-Sight Explorer has a "results" section which could show you any errors. If none are showing up, try to use a different FTP server software, like FileZilla or WinSCP, to rule out any issue from the IIS FTP server side.
Your issue might be linked to the improper use of the port number in your FTP server address. As per my knowledge, when specifying the FTP server in the "WriteImageFTP" function, you would typically only use the IP address, i.e., "192.168.0.100" and let the operation function on the default FTP port (which is generally 21, not 22). If you must operate this on a different port, your FTP setup should allow specification of a non-standard port. Try adjusting your code and see if it resolves your problem. Furthermore, if you want to trace errors in In-Sight Explorer, you can use the Insight Display Control's "SendMessage" method to display status messages from your jobs in your user interface.
It sounds like you’ve done a lot of troubleshooting already! One thing to check is the syntax of the FTP address in your function; the port should probably be separated from the IP address, like "192.168.0.100:22" instead of "192.168.0.100.22". Also, consider using a tool like Wireshark to monitor the network traffic when you run the function. That might give you some insights into what’s happening during the connection attempt. Lastly, if error tracing isn’t built into this particular function, you might want to add some logging beforehand to capture any responses or issues that arise during the FTP call. Good luck!
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: Answer: The issue could be related to the configuration settings or parameters used in the writeimageftp function. Ensure that the FTP server details, such as the IP address, port number, username, and password, are correctly specified in the function.
Answer: Answer: To include error tracing or status display within the function, you can add error handling mechanisms or logging features to capture and display any potential errors or status updates that occur during the execution of the writeimageftp function.
Answer: Answer: The discrepancy in functionality might be due to differences in how In-Sight Explorer handles the FTP connection compared to other FTP client applications. Ensure that the FTP server settings and permissions are compatible with the requirements of the writeimageftp function in In-Sight Explorer.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.