You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lj_plc/DataBlockHelper/DBHelpers/DB2107WriteHelper.cs

56 lines
1.3 KiB
C#

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);
}
}
}