Łukasz Posted November 30, 2021 Report Share Posted November 30, 2021 I'm using LabVIEW python nodes to call a python script, which creates an instance of OPC Server class. def initServer(url): server = Server() server.set_endpoint(url) ... The Server object cannot be serialized to JSON as well as cannot be pickled (TypeError: cannot pickle '_thread.RLock' object), so I can hardly see the way how to transfer Server object to LabVIEW. In that case I managed to store Server as a global variable in python script. This solutions works - I can call functions (ex. start/stop running) that simply use a global Server object. However, this solution is not secure - because if I lost the python session (due to the LabVIEW issue), I have no access to my Server. That leads to the question: Is there any more secure way to handle that? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.