hi, is there a way for me to check using a python script if the simulation is connected to OPC UA and if it is connected, to enable certain process flow statements?
Not directly, but you could connect some simulation signal value to the server such that if it doesn’t have the default value (false, 0, empty string) then you know the connection is being used.
You can then just use GetSignal and If-else statements in the PM processes to compare the signal value, no need for scripting.