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.
69 lines
1.7 KiB
C#
69 lines
1.7 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 WriteA()
|
|
{
|
|
var siemensS7Net = PlcConnect.Instance;
|
|
int start = 3384;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", 0);
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", 0);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", 0);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", 0);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", 0);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void WriteB()
|
|
{
|
|
var siemensS7Net = PlcConnect.Instance;
|
|
int start = 3394;
|
|
|
|
|
|
siemensS7Net.Write($"{DbName}.{start}.0", 0);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", 0);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", 0);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", 0);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", 0);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", 0);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", 0);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", 0);
|
|
|
|
start += 2;
|
|
siemensS7Net.Write($"{DbName}.{start}.0", 0);
|
|
}
|
|
}
|
|
}
|