Esempio n. 1
0
        private void TimerWrite_Tick(object sender, EventArgs e)
        {
            ushort value = (ushort)(Math.Sin(2 * Math.PI * timerValue / 100) * 100 + 100);

            cipServer.Write(timerAddress, value);
            timerValue++;
        }
 private void button24_Click(object sender, EventArgs e)
 {
     // bool写入
     try
     {
         cipServer.Write(textBox8.Text, bool.Parse(textBox7.Text));
         writeResultRender(textBox8.Text);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }