Process Emulator
Process Emulator Instantiation Example
import pypidtune
process_emulator = pypidtune.ProcessEmulator(
comm_type="opc",
init_logix_ip_address="192.168.1.100",
init_logix_slot=1,
init_opc_address="opc.tcp://localhost:4840",
init_sp_tag="SP_Tag",
init_pv_tag="PV_Tag",
init_cv_tag="CV_Tag",
init_model_gain=2.5,
init_model_tc=75.5,
init_model_dt=10.5,
init_model_bias=13.5,
)
process_emulator.root.mainloop()
In this example:
- comm_type is set to ‘opc’, specifying the communication type.
- init_logix_ip_address is set to ‘192.168.1.100’, initializing the IP address for Logix communication.
- init_logix_slot is set to 1, setting the initial slot for Logix communication.
- init_opc_address is set to ‘opc.tcp://localhost:4840’, initializing the address for OPC communication.
- init_sp_tag, init_pv_tag, and init_cv_tag are initialized with specific tags for setpoint, process variable, and control variable.
- init_model_gain, init_model_tc, init_model_dt, and init_model_bias are initialized with default values for the process model.