예제 #1
0
        public EngineTest()
        {
            var plcCommunication = PLCFactory.GetPLCS71500("127.0.0.1");

            _plc = new ProgrammableLogicController(plcCommunication);
            _plc.MapBitVariable("StartButton", 2, 0, 0)
            .MapBitVariable("Engine", 4, 0, 0);
        }
        public StationOneBottleMachineTest()
        {
            var plcCommunication = PLCFactory.GetPLCS71500("127.0.0.1");

            _plc = new ProgrammableLogicController(plcCommunication);
            _plc.MapBitVariable("Sensor1", 2, 0, 1)
            .MapBitVariable("Sensor2", 2, 0, 2)
            .MapBitVariable("Engine1", 4, 0, 1);
        }
예제 #3
0
 static void Main(string[] args)
 {
     using (var plc = new ProgrammableLogicController(new PLCS71500("127.0.0.1")))
     {
         plc.MapBitVariable("BotaoLigaMotor", 2, 0, 0)
         .MapBitVariable("Motor", 2, 0, 1)
         .SetValueByTag("BotaoLigaMotor", false)
         .GetValueByTag("Motor");
     }
 }