Communication between Gateway Jython Script and External Python Script

Hello,

I understand scripting in ignition is based on Jython and therefore such library like SciPy, NumPy and Pandas cannot be imported.

As a workaround, is there a way to perform the following from a Jython ‘Web Dev’ script :

  1. Run an external python script (located on the gateway host machine filesystem).
  2. Considering this script process some calculatory functions based on Scipy/ Pandas / NumPy, it then return back its output (let’s say a float) into a variable of the ignition gateway Jython script.

Any idea if this can be worked out ?

Thanks.
Emilien

Yes, you can use java or jython subprocess functions to run the external script, controlling its standard input and capturing its standard output.

2 Likes

It is possible to integrate with ignition server and python application on ignition server or other server thru sockets . We do have a module for that. Webdev allows communication thru a browser and server . What data do you want to exchange between the two applications and at what interval ? It all depends upon that .

1 Like