| Algorithm 1: System Connection |
|
1. Given: OPC UA server, Modbus TCP server, error text field 2. Initialize: opcClient= new OpcClient(“opc.tcp://192.168.1.5:4840”) modbusClient=new ModbusClient(“192.168.1.42”, 502) error = false 3. function Start 4. try 5. opcClient.Connect() 6. modbusClient.Connect() 7. Log(“Industrial devices connected”) 8. error.text ← “Industrial devices connected” 9. catch Exception e 10. error ← true 11. Log(“Failed to connect: “ + e.Message) 12. error.text ← “Failed to connect: “ + e.Message 13. end try 14. return error 15. end function |