using S7;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Timers;
namespace SiemensPLC
{
class SiemensS7Demo
{
private S7Client Client ;
private int Rack = 0;
private int Slot = 2;
private string Ip = "172.37.93.11";
private int TimerInterval = 1000;
private System.Timers.Timer timerSender = new System.Timers.Timer();
public SiemensS7Demo()
{
Client = new S7Client();
}
public void Start()
{
ShowResult(Client.ConnectTo(Ip, Rack, 2));
timerSender.Elapsed += TimerSender_Elapsed;
timerSender.Interval =