예제 #1
0
 /// <summary>
 /// Create a plc that will connect to localhost (Snap 7 server) and connect to it
 /// </summary>
 public S7NetTests()
 {
     plc = new Plc(CpuType.S7300, "127.0.0.1", 0, 2);
     //ConsoleManager.Show();
     ShutDownServiceS7oiehsx64();
     S7TestServer.Start();
     plc.Open();
 }
예제 #2
0
        public void T25_IsAvailableReturnsTrueIfIPAddressIsReachable()
        {
            plc.Close();
            S7TestServer.Stop();
            S7TestServer.Start(TestServerPort);

            var reachablePlc = CreatePlc();

            Assert.IsTrue(reachablePlc.IsAvailable);
        }
예제 #3
0
        public void T25_IsAvailableReturnsTrueIfIPAddressIsReachable()
        {
            plc.Close();
            S7TestServer.Stop();
            S7TestServer.Start();

            var reachablePlc = new Plc(CpuType.S7300, "127.0.0.1", 0, 2);

            Assert.IsTrue(reachablePlc.IsAvailable);
        }
예제 #4
0
 public void Setup()
 {
     S7TestServer.Start(TestServerPort);
     plc.Open();
 }
예제 #5
0
 public void SetupAsync()
 {
     S7TestServer.Start();
     plc.Open();
 }