Example #1
0
 private void test4( )
 {
     melsecSerial.Write("D100", (short)5);
     melsecSerial.Write("D100", (ushort)5);
     melsecSerial.Write("D100", 5);
     melsecSerial.Write("D100", (uint)5);
     melsecSerial.Write("D100", (long)5);
     melsecSerial.Write("D100", (ulong)5);
     melsecSerial.Write("D100", 5f);
     melsecSerial.Write("D100", 5d);
     // length should Multiples of 2
     melsecSerial.Write("D100", "12345678");
 }
 private void button24_Click(object sender, EventArgs e)
 {
     // bool写入
     try
     {
         writeResultRender(melsecSerial.Write(textBox8.Text, bool.Parse(textBox7.Text)), textBox8.Text);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 private void button24_Click(object sender, EventArgs e)
 {
     // bool写入
     DemoUtils.WriteResultRender(() => melsecSerial.Write(textBox8.Text, bool.Parse(textBox7.Text)), textBox8.Text);
 }