|
|
@ -19,7 +19,7 @@ IHost host = Host.CreateDefaultBuilder(args)
|
|
|
|
string sqlConect = context.Configuration.GetConnectionString("Sql");
|
|
|
|
string sqlConect = context.Configuration.GetConnectionString("Sql");
|
|
|
|
string Plc = context.Configuration.GetConnectionString("Plc");
|
|
|
|
string Plc = context.Configuration.GetConnectionString("Plc");
|
|
|
|
|
|
|
|
|
|
|
|
services.AddSingleton(() => new SiemensS7Net(SiemensPLCS.S200Smart)
|
|
|
|
services.AddSingleton<SiemensS7Net>(_ => new SiemensS7Net(SiemensPLCS.S200Smart)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
IpAddress = Plc,
|
|
|
|
IpAddress = Plc,
|
|
|
|
Port = 102
|
|
|
|
Port = 102
|
|
|
|