Dug this out. It depends on the background thread management (clientserial.py) described in this post:
The above can be modified to run in the gateway with regular tags instead of client tags... I recommend that for most processes. It also needs an update to use the LifeCycle module instead of system.util.getGlobals()
. See this topic for details:
So, prereqs satisfied, this is the script, lightly edited for NDA compliance and copyright statement:
https://www.automation-pros.com/ignition/ethernetMettlerToledo.py
Have fun!