- HMI Model: cMT2078X
- EasyBuilder Pro Version: 6.08.01.442
- Serial Number or supplier: 2301407054
I have a Keyence IV camera sending images to display via FTP to a USB disk on the HMI. My original idea was to let the camera provide the folder structure and dynamically change the folder for the picture viewer each day as the camera makes a directory structure based on date. Unfortunately it uses a subfolder (IV000x) that is indexed each time the camera is power cycled.
Can I detect this change in subfolder via a macro or other alternatives (JS?)
When the Keyence IV camera is powered down, is the HMI powered off as well? If so, a simple solution would be to prompt the user to select the current folder using a “File Browser” when the HMI is powered on.
If this solution will work within your application I can provide instructions that will help you add this feature to your project.
I’ve considered doing just that and changing that part of my string but was hoping there might be a way to manipulate files on the USB directly. If that’s not a possibility what I may do is set the camera to upload into a single directory then just go purge the folder every 6 months when I do system backups.
This would also allow an older model camera to show it’s NG images in the same folder. It’s really just so the operator has a better understanding of why the product failed the vision test. This machine is solely QA testing at the end of an assembly line so it’s a set it and forget it type of machine.
Although it may be possible to determine what folders exist within the USB and dynamically change the file path without operator interaction, the only solutions for this request are complex and involve the use of FTP and loopback. Unfortunately, this method is not reliable.
I would recommend that you use the alternative solution, in which you upload files to a single directory and “purge” the folder every 6 months during system backups. I am so sorry that we don’t have a feature suitable for this process, but perhaps one will be created within the near future. To delete files within a USB, you may perform the following:
Within EasyBuilder Pro select the “Common Window”:
Select the “Object” tab and create a “File Browser”:
Within the “File Browser” define the “Folder path”, “File name”, and “Control” address according to the image below:
Click “Ok” when finished and place this object in the upper left corner outside of the work area:
Then, to delete a file enter the “Folder path” and “File name” within the addresses defined in step 3. Set a value of ‘3’ within the “Control” address to select the specified folder or file. Once selected, set a value of ‘1’ within the “Control” address to delete the selected item:
Note: The file browser is visible within this example.
Thank you for the explanation and the setup example.