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/DB2108HelperWriteNew.cs

57 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataBlockHelper.DBHelpers
{
public class DB2108HelperWriteNew
{
private static readonly string DbName = "DB2108";
public static void Inser(Time2108 time)
{
var siemensS7Net = PlcConnect.Instance;
int start = 26;
siemensS7Net.Write($"{DbName}.{start}.0", time.VibSiloOn);
start += 2;
siemensS7Net.Write($"{DbName}.{start}.0", time.VibSiloOff);
start += 2;
siemensS7Net.Write($"{DbName}.{start}.0", time.VibDaybinOn);
start += 2;
siemensS7Net.Write($"{DbName}.{start}.0", time.VibDaybinOff);
start += 2;
siemensS7Net.Write($"{DbName}.{start}.0", time.VibHopperOn);
start += 2;
siemensS7Net.Write($"{DbName}.{start}.0", time.VibHopperOff);
//38
start += 2;
siemensS7Net.Write($"{DbName}.{start}.0", time.PlsSiloOn);
start += 2;
siemensS7Net.Write($"{DbName}.{start}.0", time.PlsSiloOff);
start += 2;
siemensS7Net.Write($"{DbName}.{start}.0", time.PlsDaybinOn);
start += 2;
siemensS7Net.Write($"{DbName}.{start}.0", time.PlsDaybinOff);
start += 2;
siemensS7Net.Write($"{DbName}.{start}.0", time.PlsHopperOn);
start += 2;
siemensS7Net.Write($"{DbName}.{start}.0", time.PlsHopperOff);
}
}
}