|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace DataBlockHelper.DBHelpers
|
|
|
|
|
{
|
|
|
|
|
public class DB2107WriteHelper
|
|
|
|
|
{
|
|
|
|
|
static string DbName = "DB2107";
|
|
|
|
|
public static void CleanSpare(int no)
|
|
|
|
|
{
|
|
|
|
|
int dian = no + 1;
|
|
|
|
|
var siemensS7Net = PlcConnect.Instance;
|
|
|
|
|
siemensS7Net.Write($"{DbName}.8.{dian}", false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void CleanWater(int no)
|
|
|
|
|
{
|
|
|
|
|
int dian = no + 1;
|
|
|
|
|
var siemensS7Net = PlcConnect.Instance;
|
|
|
|
|
siemensS7Net.Write($"{DbName}.5.{dian}", false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void Spare1(bool b)
|
|
|
|
|
{
|
|
|
|
|
var siemensS7Net = PlcConnect.Instance;
|
|
|
|
|
siemensS7Net.Write($"{DbName}.4.5", b);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void Spare2(bool b)
|
|
|
|
|
{
|
|
|
|
|
var siemensS7Net = PlcConnect.Instance;
|
|
|
|
|
siemensS7Net.Write($"{DbName}.4.6", b);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void Spare3(bool b)
|
|
|
|
|
{
|
|
|
|
|
var siemensS7Net = PlcConnect.Instance;
|
|
|
|
|
siemensS7Net.Write($"{DbName}.4.7", b);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void Spare4(bool b)
|
|
|
|
|
{
|
|
|
|
|
var siemensS7Net = PlcConnect.Instance;
|
|
|
|
|
siemensS7Net.Write($"{DbName}.5.0", b);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|