using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DataBlockHelper.DBHelpers { public class DB120WriteHelp { private static readonly string DbName = "DB120"; public DB120WriteHelp() { } public static void AddABCDEF(Uhd uhd) { int start = 0; var siemensS7Net = PlcConnect.Instance; var sss=siemensS7Net.Write($"{DbName}.{start}.0", uhd.A); siemensS7Net.Write($"{DbName}.{start + 4}.0", uhd.B); siemensS7Net.Write($"{DbName}.{start + 8}.0", uhd.C); siemensS7Net.Write($"{DbName}.{start + 12}.0", uhd.D); siemensS7Net.Write($"{DbName}.{start + 16}.0", uhd.E); siemensS7Net.Write($"{DbName}.{start + 20}.0", uhd.F); siemensS7Net.Write($"{DbName}.{start + 24}.0", uhd.G); siemensS7Net.Write($"{DbName}.{start + 28}.0", uhd.H); siemensS7Net.Write($"{DbName}.{start + 32}.0", uhd.I); siemensS7Net.Write($"{DbName}.{start + 36}.0", uhd.J); siemensS7Net.Write($"{DbName}.{start + 40}.0", uhd.K); siemensS7Net.Write($"{DbName}.{start + 44}.0", uhd.L); siemensS7Net.Write($"{DbName}.{start + 48}.0", uhd.M); siemensS7Net.Write($"{DbName}.{start + 52}.0", uhd.N); siemensS7Net.Write($"{DbName}.{start + 56}.0", uhd.O); siemensS7Net.Write($"{DbName}.{start + 60}.0", uhd.Delay1); siemensS7Net.Write($"{DbName}.{start + 62}.0", uhd.Delay2); siemensS7Net.Write($"{DbName}.{start + 64}.0", uhd.Delay3); } } }