External Applications

Hi
I am planning a project on Raspberry Pi 4, running either Maker Edition or Edge

I would like to trigger an Python Script from within Ignition. The script will initiate a photo via the Pi’s camera, plus a little image processing. The script also needs to read/write to the same database as Ignition, probably MariaDB.

I have searched the forum and remain unclear
Questions and or comments
Is this feasible?
Is Edge “lighter” than maker. (Edge has all capabilities required)
I assume I would use “system.util.execute()” scripting function. Is that correct? Where do I store the external function? Would it be defined a ***.py file?
Can my external python script access same database as Ignition (I saw somewhere that this could be problematic)?

Any other comments would be appreciated.

Thanks

  1. Maker is not for commercial applications
  2. Edge has no dataBase support - it can trend a simple historian for a week internally but not store images in a DB etc
1 Like

Thank you
We will use standard Ignition

I have tried all sorts of combinations with “system.util.execute()” on windows PC bat cannot make it work. Advice appreciated

Wrap the external script in a web API and run it as a service. Use system.net.httpClient() in Ignition to interact with the web API.

Why on Windows? RPi doesn't run Windows, so your experiments won't be valid. Also, are you taking into account that gateway and perspective script run as part of the service. On windows, that service has numerous security and user-interface limitations.

Thanks Phil
I was using windows to familiarize with “system.util.execute()” since it was conveniently available.

Are you suggesting this function can’t be used on Raspbian?

It can, but executable access controls and PATH rules are different, and the service environment is different. In my opinion, testing on Windows for a future Linux environment is wasted time.

2 Likes