public string connection_state(string plc_type, string plc_ip, string plc_rack, string plc_slot)
{
CpuType cpu = (CpuType)Enum.Parse(typeof(CpuType), plc_type);
Plc plc = new Plc(cpu, plc_ip, rack: Convert.ToInt16(plc_rack), slot: Convert.ToInt16(plc_slot));
string plc_con = plc.IsConnected.ToString();
return plc_con;
}