We are using the HMI in part of a food production plant. After each batch we need to send reports that include the cooking parameters (for example temperature sensor readings every 5 seconds) as well as a screenshot of batch information.
I have a data sampling objects creating log files that are going to USB1. We are having to pull that USB and email manually, but I would like to automate that data transfer.
I have enabled email functionality in the System Parameter Settings and successfully sent a test email. Now I need to figure out how to send the email with the attached file. I’m guessing the best way is going to be to create a macro with LB2 as a trigger, but I can’t find any email functions. Is there another library that I need to import to get these?
Is email the right way to accomplish this? Maybe it would be better to use an FTP to store this data?
Within the General tab, I set the trigger to my LB-0 bit and my File Source as a Historical Data Sampling object. This allowed me to choose the data sampling index I wanted to email.
Lastly, within the Email tab, I enabled the condition Send when event triggered. This allows me to enter the recipients and attach a screenshot of a window using the option near the bottom of the popup window.
In the example below, I set up my file creation to trigger when the LB-15 bit is activated and allows user input of a new file name at the LW-10 address.
Lastly, within my Backup (Global) settings, under the Output tab, I modified the Split by option to Customized file. This allows the emails to be separated by file name. Therefore, when a new batch needs to be started, I can trigger the LB-15 bit, enter a new file name, and then save the batch only.
It sounds like you’re exporting a report similar to one we’ve been trying to create. Would you mind sharing if your data is from different recipes that you run or if you run the same batch each time?