my_opc_class module¶
Class for Handling all OPC UA communications between PLC and PC
-
class
my_opc_class.
Opc_Client
(end_point_url='opc.tcp://192.168.142.197:4840')¶ Bases:
object
Client Class Object
-
close
()¶ Disconnect the opc client
-
collecting_pressures
()¶ To collect all the four pressures that is output of the FESTO valves in mbar
- Returns
(list of int) four pressure values
-
connect
()¶ To connect to the server defined at end_point_url
-
get_pressure_nodes
()¶ Gets the four pressure nodes :return: (list of nodes) pressure nodes
-
send_pressures
(pressure_values=[0, 0, 0, 0])¶ https://github.com/FreeOpcUa/python-opcua/blob/master/examples/client-minimal.py To set value you need to know the dataValue and type to send in the values of same variant type and datavalue
- Parameters
pressure_values – (list of int) four pressure values
-
-
my_opc_class.
main
()¶ Example of use of opc class