Announcement

REXYGEN forum has been moved. This one is closed.
Head over to the new REXYGEN Community Forum at https://forum.rexygen.com.

Looking forward to meeting you there!
 

#1 2015-11-05 01:58:05

hendrik
Member
Registered: 2015-11-01
Posts: 49

Sending e-mail alerts using EPC

Hi,

I have set up a python script to send e-mail alerts; how do I trigger the script using the EPC module?

Offline

#2 2015-11-05 09:09:51

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Sending e-mail alerts using EPC

Have a look at our example on using the EPC function block, which is included in our GitHub example repository. Go to Downloads and scroll down to the bottom for the link to download the examples.
The example is located in \Function_blocks_Advanced\EPC_Linux

Please note that you need a licence for using the Advanced function blocks to which the EPC block belongs.

Offline

#3 2015-11-07 00:41:03

hendrik
Member
Registered: 2015-11-01
Posts: 49

Re: Sending e-mail alerts using EPC

I have created a basic python script (.py) to send e-mail alerts; I tested the script in the LXterminal and it is working. I am not sure what  cmd ("Operating system command to execute") to use in the EPC module.

Please advice.

Thanks,

Offline

#4 2015-11-07 11:44:14

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Sending e-mail alerts using EPC

Put e.g. "python /home/pi/myscript.py" into the cmd parameter of the EPC block.

Offline

#5 2015-11-08 02:24:49

hendrik
Member
Registered: 2015-11-01
Posts: 49

Re: Sending e-mail alerts using EPC

I have done as you suggested; cannot seem to run the script for some reason but it does work in the terminal when typing "python /home/pi/myemail.py"
I am not sure what to do next?

Regards,

Offline

#6 2015-11-09 00:12:36

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Sending e-mail alerts using EPC

Uploading your source files (*.mdl and your Python script) is the best way to go. I'll check it for you and identify the problem.

Offline

#7 2015-11-09 12:33:25

hendrik
Member
Registered: 2015-11-01
Posts: 49

Re: Sending e-mail alerts using EPC

When I monitor the EPC function block I get a "218: Input connection error" I only use the EXEC function to run Python script.

Offline

#8 2015-11-09 15:52:58

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Sending e-mail alerts using EPC

This is because you have no input connected to uVec1. See our GitHub repository, I have added an example on sending e-mail notifications from REX control algorithms.

Offline

#9 2015-11-10 00:02:35

hendrik
Member
Registered: 2015-11-01
Posts: 49

Re: Sending e-mail alerts using EPC

Thank you!! All working and easy to use.

Offline

Board footer

Powered by FluxBB