Perspective Session calling something else to run Python3 code

Hello,

I am relatively new to coding, ignition, and basically everything that relates to those things, so I may not know the correct terminology of things as I ask this question. My company does have more experienced personnel to support, but I am finding that I need a more directed request of what I need their help with setting up.

I am developing a Perspective system that is performing a lot of data manipulation, and then needs to perform some actions to some .dxf files. I have a python3 function that can perform this task, but I believe it will not work in ignition due to the packages being used (numpy, ezdxf).

My question is: has anyone had a python3 script set up (somewhere?) and had a perspective session send input information to that “something” and had that script run? How was that done, and what additional software or tools are needed to do that?

Thank you very much!

This document describes in brief an approach to running Python 3 code by making RPC calls to a Flask API that does the actual work in Python 3, with whatever incompatible libraries, and just returns the results.

3 Likes

Depending on your skill level (or adventure level) you may want to consider creating your own 3rd party custom module to accomplish this task in Java instead of Python.

Start here: