private void button_read_double_Click(object sender, EventArgs e)
 {
     // 读取double变量
     if (textBox12.Text == "1")
     {
         DemoUtils.ReadResultRender(melsecSerial.ReadDouble(textBox3.Text), textBox3.Text, textBox4);
     }
     else
     {
         DemoUtils.ReadResultRender(melsecSerial.ReadDouble(textBox3.Text, ushort.Parse(textBox12.Text)), textBox3.Text, textBox4);
     }
 }
Ejemplo n.º 2
0
 private void test3( )
 {
     short  d100_short  = melsecSerial.ReadInt16("D100").Content;
     ushort d100_ushort = melsecSerial.ReadUInt16("D100").Content;
     int    d100_int    = melsecSerial.ReadInt32("D100").Content;
     uint   d100_uint   = melsecSerial.ReadUInt32("D100").Content;
     long   d100_long   = melsecSerial.ReadInt64("D100").Content;
     ulong  d100_ulong  = melsecSerial.ReadUInt64("D100").Content;
     float  d100_float  = melsecSerial.ReadFloat("D100").Content;
     double d100_double = melsecSerial.ReadDouble("D100").Content;
     // need to specify the text length
     string d100_string = melsecSerial.ReadString("D100", 10).Content;
 }
Ejemplo n.º 3
0
 private void button_read_double_Click(object sender, EventArgs e)
 {
     // 读取double变量
     DemoUtils.ReadResultRender(melsecSerial.ReadDouble(textBox3.Text), textBox3.Text, textBox4);
 }