private void button_read_short_Click(object sender, EventArgs e) { // 读取short变量 if (textBox12.Text == "1") { DemoUtils.ReadResultRender(melsec_net.ReadInt16(textBox3.Text), textBox3.Text, textBox4); } else { DemoUtils.ReadResultRender(melsec_net.ReadInt16(textBox3.Text, ushort.Parse(textBox12.Text)), textBox3.Text, textBox4); } }
private void thread_test2( ) { int count = 500; while (count > 0) { if (!melsec_net.Write("D100", (short)1234).IsSuccess) { failed++; } if (!melsec_net.ReadInt16("D100").IsSuccess) { failed++; } count--; } thread_end( ); }
private void button_read_short_Click(object sender, EventArgs e) { // 读取short变量 readResultRender(melsec_net.ReadInt16(textBox3.Text), textBox3.Text, textBox4); }