private void button_read_bool_Click(object sender, EventArgs e) { // 读取bool变量 if (textBox12.Text == "1") { DemoUtils.ReadResultRender(melsecSerial.ReadBool(textBox3.Text), textBox3.Text, textBox4); } else { DemoUtils.ReadResultRender(melsecSerial.ReadBool(textBox3.Text, ushort.Parse(textBox12.Text)), textBox3.Text, textBox4); } }
private void test1() { OperateResult <bool[]> read = melsecSerial.ReadBool("M100", 10); if (read.IsSuccess) { bool m100 = read.Content[0]; // and so on bool m109 = read.Content[9]; } else { // failed } }
private void button_read_bool_Click(object sender, EventArgs e) { // 读取bool变量 readResultRender(melsecSerial.ReadBool(textBox3.Text), textBox3.Text, textBox4); }