Automatic report generation after input triggered

Hello guys,

Do you have any script example that could send a report every time a production is finished? Since it’s more complex than just a Task Planner, do you have a beginning or complete script to use upon an input that is triggered?

Please let me know,

Best Regards,

Hello @Jcadorette,

You could set up an onalarm event in scripting to execute a script when an alarm occurs. You could also use onchange to execute code whenever a tag changes.

Deryck

Hi @deryck_hms,

All good for what you said. But do you have a script of how to send that report?

I presume it’s related with Export Block Descriptor?

Thanks,

Yes you will most likely utilize EBD. What exactly are you looking to send for a report?

This topic might be what you are looking for. BASIC IDE Code To Send Data File To Email

Hi @deryck_hms,

Some data + a graph of it… still possible?

Thanks

Hi @Jcadorette,

Can you provide me an example of how you currently are generating the report?

Deryck

Hi Deryck,

Here’s my customer’s request.:

I send temperature data to a client by generating a CSV file in attachment and graphs. All this is done manually by going in the Ewon.

Could it be done automatically at the end of a cycle of machine operation?

The important thing is the CSV file which must be sent by email.
image

I send temperature data to a client by generating a CSV in attachment and graphs. All this manually by going in the Ewon.

Could it be done automatically at the end of a cycle of machine operation?

The important thing is the CSV file which must be sent by email.

Hello Jonathan,

The CSV files would be created using and Export Block Descriptor.
I think this was the topic I originally had in mind for custom reports.


You could change the ONDATE command in the example to an ONALARM to trigger the email. You can also do the samething with out the advanced graph stuff and just include the EBD for the CSV file.

Deryck

Deryck