Exemplo n.º 1
0
        void Turn_Click(object sender, RoutedEventArgs e)
        {
            Button bt  = sender as Button;
            string lay = bt.Tag.ToString();

            PLC_SP.TurnTo(int.Parse(lay));
        }
Exemplo n.º 2
0
        void b_Click(object sender, RoutedEventArgs e)
        {
            Button bt  = sender as Button;
            int    lay = int.Parse(bt.Tag.ToString());

            PLC_SP.TurnTo(lay);
        }
Exemplo n.º 3
0
        private void Test()
        {
            int nowLay = PLC_SP.ReadNowLay();

            if (ToLay == 0 || nowLay == ToLay)
            {
                Random r = new Random();
                int    i = r.Next(11);
                i = (i * 2) - 1;
                PLC_SP.TurnTo(i);
            }
        }