You are not logged in.
Pages: 1
Topic closed
Hi,
I have set up a python script to send e-mail alerts; how do I trigger the script using the EPC module?
Offline
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.
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
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
Put e.g. "python /home/pi/myscript.py" into the cmd parameter of the EPC block.
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
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
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.
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
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
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.
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
Thank you!! All working and easy to use.
Offline
Pages: 1
Topic closed