所有textBox
的命名为t1
-t6
需要在tableLayOutPanel
中取出所有的textBox
控件,然后从plc中读取连续的寄存器,一一对应插入textBox
private void button8_Click(object sender, EventArgs e)
{
//取出一组数据
OperateResult<float[]> result1 = busTcpClient.ReadFloat("0", 6);
if (result1 == null || !result1.IsSuccess)
return;
foreach (var item in result1.Content)
{
//测试取出的数据是否正确
Console.WriteLine(item);
}
//for循环 按照顺序取出textBox