c# 数据写入三菱PLC
2021-04-14 11:25
标签:ted AC exception exce size string str nbsp c# public void Data_Write_Value(int[] m_write_data) string[] AddressArray = new string[18] { "D720", "D721", "D722", "D723", "D724", "D725", "D726", "D727", "D728", "D729" for (int k = 0; k { if (ReturnValue != 0) //返回0,写入成功。 } c# 数据写入三菱PLC 标签:ted AC exception exce size string str nbsp c# 原文地址:https://www.cnblogs.com/MrMo/p/8961595.html
{
int lSize = 2;
,"D730", "D731", "D732", "D733", "D734", "D735", "D736", "D737"};
int ReturnValue;
lock (lockobj)
{
ReturnValue = _ActUtlType.WriteDeviceBlock(AddressArray[k], lSize, m_write_data[k]);
}
{
throw new Exception("PC Left Write Data Error!");
}
}