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.
59 lines
1.6 KiB
C#
59 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace DataBlockHelper.DBHelpers
|
|
{
|
|
public class DB2110WriteHelper
|
|
{
|
|
private static readonly string DbName = "DB2110";
|
|
|
|
public static void Write(Db2110Help help)
|
|
{
|
|
var siemensS7Net = PlcConnect.Instance;
|
|
int start = 3384;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", help.queA0);
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", help.queA1);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", help.queA2);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", help.queA3);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", help.queA4);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", help.queB0);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", help.queB1);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", help.queB2);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", help.queB3);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", help.queB4);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", help.queB5);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", help.queB6);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", help.queB7);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", help.queB8);
|
|
}
|
|
}
|
|
}
|