引用
引用第1樓030403118于2020-06-05 08:13發(fā)表的 :
缺少引用的控件
怎么讓它讀取帶小數(shù)的值了,
現(xiàn)在只能定義為Short能行整數(shù)
定義為double就報(bào)錯(cuò)
short D0, D1, D2, D3, D4, D5, D6, D7, D8, D470,D10;
try
{
this.axActUtlType.ActLogicalStationNumber = 0;
this.axActUtlType.ActPassword = null;
int rtn = this.axActUtlType.Open();
if (rtn == 0)
{
PLCcom1.Text = "PLC1鏈接成功";
iReturnCode = axActUtlType.ReadDeviceBlock2("D470", 1, out D470);
textBox1.Text = D470.ToString();
iReturnCode = axActUtlType.ReadDeviceBlock2("D10", 1, out D10);
textBox2.Text = D10.ToString();
PLC1conn = true;
}