这是我的C#代码,txt中放了两个坐标,[坐标值1]x=100y=200z=0r=20[坐标值2]x=0y=0z=0r=30
但是只发送第一个坐标,之后不执行第二个坐标,去掉sleep也没有用
for(int i=1;i<=2;i++)
{
string valuex = @""""+ini.IniReadValue("坐标值" + i, "x")+ @"""";
string valuey = @""""+ini.IniReadValue("坐标值" + i, "y")+ @"""";
string valuez = @""""+ini.IniReadValue("坐标值" + i, "z")+ @"""";
string valuer = @""""+ini.IniReadValue("坐标值" + i, "r")+ @"""";
sd = Encoding.UTF8.GetBytes(@"{""c"":""run""," + @"""x"":" + valuex + "," + @"""y"":" + valuey + "," + @"""z"":" + valuez + "," + @"""r"":" + valuer + "," + @"""v"":""322""}");
serialPort.Write(sd, 0, sd.Length);
Thread.Sleep(5000);
}