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