您当前的位置:五五电子网电子知识plc技术plc应用欧姆龙plc应用基于C++Builder API函数的欧姆龙PLC串行通 正文
基于C++Builder API函数的欧姆龙PLC串行通

基于C++Builder API函数的欧姆龙PLC串行通

点击数:7133 次   录入时间:03-04 11:51:55   整理:http://www.55dianzi.com   欧姆龙plc应用
  word=“@00rd”+address+value;

  if(hcomm==0) return(0);

  temp=outchecksum(word);

  senddata=temp.c_str();

  bs=temp.length();

  loop:

  if(++i《=3)

  {

  writefile(hcomm,senddata,bs,&lrc,null);

  sleep(100);

  if(hcomm==invalid_handle_value) return(0);

  clearcommerror(hcomm,&dwerror,&cs);

  if(cs.cbinque》sizeof(inbuff))

  {

  purgecomm(hcomm,purge_rxclear);

  return(0);

  }

  cs.cbinque=4*strtoint(value)+11;

  readfile(hcomm,inbuff,cs.cbinque,&nbytesread,null);

上一页  [1] [2] [3] [4] [5] [6]  下一页


本文关键字:欧姆龙  欧姆龙plc应用plc技术 - plc应用 - 欧姆龙plc应用