private void button_read_long_Click(object sender, EventArgs e)
 {
     // 读取long变量
     if (textBox12.Text == "1")
     {
         DemoUtils.ReadResultRender(melsecSerial.ReadInt64(textBox3.Text), textBox3.Text, textBox4);
     }
     else
     {
         DemoUtils.ReadResultRender(melsecSerial.ReadInt64(textBox3.Text, ushort.Parse(textBox12.Text)), textBox3.Text, textBox4);
     }
 }
 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;
 }
示例#3
0
 private void button_read_long_Click(object sender, EventArgs e)
 {
     // 读取long变量
     DemoUtils.ReadResultRender(melsecSerial.ReadInt64(textBox3.Text), textBox3.Text, textBox4);
 }