freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

c松下plc通訊協(xié)議標(biāo)準(zhǔn)類代碼-資料下載頁(yè)

2024-10-10 00:17本頁(yè)面

【導(dǎo)讀】usingSystem;using;using;using;using;using;using;publicstaticdouble[]DTValue=null;publicstatic[]arrXYMValue=null;=strPort;=19200;=7;="\r\n";returntrue;returnfalse;SetTextCallbackd=newSetTextCallback(SetText);(d,newobject[]{text});=text+"\r\n"+;inti=0;stringreadText="";(1);readText=();stringsHead=(0,4);//"%01$;stringsValues="";stringtValue="";byte[]tXYMValue=null;Int32iValue=0;SetText("[PLC->PC]:"+readText);sValues=(6,-8);DTValue=newdouble[/4];tValue=(i*4,4);DTValue[i]=(double)((2,2)+(0,2),16)/100;("DT"+()+":"+DTValue[i].ToString());break;sValues=(6,-8);//XYMValue=newInt32[/4];4];tValue=(i*4,4);(0,2),16);tXYMValue=(iValue);(tXYMValue);arrXYMValue[i][i].ToString());

  

【正文】 (value[i] * 1000)).ToString()。 sValue = (sValue).ToString(X4)。 sValue = (2, 2) + (0, 2)。 sValues += sValue。 } // string outStr = 。 outStr = %01WD + sAddr + sValues。 outStr = outStr + bcc(outStr) + \r。 (outStr)。 SetText([PCPLC]: + outStr)。 return。 } /// summary /// 本命令只是發(fā)送,取值,取值在 OnDataReceived里 /// readDT(string DTaddr1, string DTaddr2) /// DTaddr1:寄存器起始地址 /// DTaddr2:寄存器結(jié)束地址 /// 如 :readDT(D1,D4)。 /// /summary /// param name=chkString/param /// returns/returns public static void readDT(string DTaddr1, string DTaddr2) { //地址轉(zhuǎn)換 string sReg = (0, 1)。 //獲取 D string sA1 = (1, 1)。 //DT1中的 1 string sA2 = (1, 1)。 //DT4中的 4 int iLen = (sA2) (sA1) + 1。 //41 sA1 = (5).Replace( , 0)。 sA2 = (5).Replace( , 0)。 string sAddr = sReg + sA1 + sA2。 //地址 :D0000100004 // string outStr = 。 outStr = %01RD + sAddr。 outStr = outStr + bcc(outStr) + \r。 (outStr)。 SetText([PCPLC]: + outStr)。 return 。 } private static string bcc(string chkString) { int chkSum = 0。 string chkSums = 。 int k。 for (k = 0。 k 。 k++) { chkSum = chkSum ^ Asc((k, 1))。 } chkSums = (chkSum, 16)。 return ( 2, 2).ToUpper()。 } private static int Asc(string character) { if ( == 1) { asciiEncoding = new ()。 int intAsciiCode = (int)(character)[0]。 return (intAsciiCode)。 } else { throw new Exception(Character is not valid.)。 } } } }
點(diǎn)擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1