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

74 lines
1.8 KiB
C#

6 months ago
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";
6 months ago
public static void WriteA()
6 months ago
{
var siemensS7Net = PlcConnect.Instance;
int start = 3384;
6 months ago
ushort a = 0;
siemensS7Net.Write($"{DbName}.{start}.0", a);
6 months ago
start += 2;
6 months ago
siemensS7Net.Write($"{DbName}.{start}.0", a);
6 months ago
start += 2;
6 months ago
siemensS7Net.Write($"{DbName}.{start}.0", a);
6 months ago
start += 2;
6 months ago
siemensS7Net.Write($"{DbName}.{start}.0", a);
6 months ago
start += 2;
6 months ago
siemensS7Net.Write($"{DbName}.{start}.0", a);
siemensS7Net.Write($"{DbName}.3412.0", a);
6 months ago
6 months ago
}
public static void WriteB()
{
var siemensS7Net = PlcConnect.Instance;
int start = 3394;
6 months ago
ushort a = 0;
siemensS7Net.Write($"{DbName}.{start}.0",a);
6 months ago
start += 2;
6 months ago
siemensS7Net.Write($"{DbName}.{start}.0", a);
6 months ago
start += 2;
6 months ago
siemensS7Net.Write($"{DbName}.{start}.0", a);
6 months ago
start += 2;
6 months ago
siemensS7Net.Write($"{DbName}.{start}.0", a);
6 months ago
start += 2;
6 months ago
siemensS7Net.Write($"{DbName}.{start}.0", a);
6 months ago
start += 2;
6 months ago
siemensS7Net.Write($"{DbName}.{start}.0", a);
6 months ago
start += 2;
6 months ago
siemensS7Net.Write($"{DbName}.{start}.0", a);
6 months ago
start += 2;
6 months ago
siemensS7Net.Write($"{DbName}.{start}.0", a);
6 months ago
start += 2;
6 months ago
siemensS7Net.Write($"{DbName}.{start}.0", a);
siemensS7Net.Write($"{DbName}.3414.0", a);
6 months ago
}
}
}