免费国精产品自偷自偷免费看_在线看片成人_www.77伦理bt.com_特级黄色一级片_免费夜色污私人影院在线观看_国严精品久久久久久亚洲影视

qxf0218
級別: 探索解密
精華主題: 0
發(fā)帖數(shù)量: 18 個(gè)
工控威望: 135 點(diǎn)
下載積分: 607 分
在線時(shí)間: 3(小時(shí))
注冊時(shí)間: 2014-03-24
最后登錄: 2016-07-11
查看qxf0218的 主題 / 回貼
樓主  發(fā)表于: 2014-07-01 11:01
西門子S7-300 BCC數(shù)據(jù)效驗(yàn)和             誰有用過的程序?分享一份。謝謝
學(xué)無止境
zjiori
級別: 正式會員
精華主題: 0
發(fā)帖數(shù)量: 4 個(gè)
工控威望: 94 點(diǎn)
下載積分: 578 分
在線時(shí)間: 3(小時(shí))
注冊時(shí)間: 2014-12-09
最后登錄: 2014-12-31
查看zjiori的 主題 / 回貼
1樓  發(fā)表于: 2014-12-16 16:00
接口: IN: DB_NO  INT  DB number
           LEN    INT  Length of source area
       OUT:RETVAL INT  RETVAL
       TEMP:w_db_no  Word  DB number
            w_bcc_value  Word   actual BCC value
            w_temp_val   Word   temporary value
            d_loop_akt   DWord  actual value of the loop counter
            d_loop       DWord  loop counter

  L     #LEN                        // load length                  
      L     2                           // decrement length by 2
      -I                                // last 2 bytes are reserved for BCC
      SLD   3                           // calculate bit offset
      T     #d_loop                     // save the last bit address

      L     #DB_NO                      // load DB number
      T     #w_db_no
      OPN   DB [#w_db_no]               // and open DBs

      L     0
      T     #d_loop_akt                 // initialize loop counter
      T     #w_bcc_value                // initialize the BCC

// loop for calculating the BCC for (LEN - 2) bytes
// abort if d_loop_akt = d_loop

LOOP: L     DBB [#d_loop_akt]           // load byte from DB
      L     #w_bcc_value                // load actual BCC
      XOW                               // EXOR
      T     #w_bcc_value                // and save

      L     8                           // increment the bit address by 8
      L     #d_loop_akt                 // to address the next byte
      +D    
      T     #d_loop_akt

      L     #d_loop
      <I    
      JC    LOOP

// load the actual BCC
// and compare with the last two bytes of the source DB
// example: #LEN      22
//           0..19     data bytes
//           20,21     BCC-HI, BCC-LO

      L     #w_bcc_value                // load BCC
      AW    W#16#F0                     //separate the most significant nibble
      SLW   4                           // shift the least significant nibble to the highbyte
      OW    W#16#3000                   // OR 30h to Highbyte to receive ASCII character
      T     #w_temp_val                 // and save temporary

      L     #w_bcc_value                // load BCC
      AW    W#16#F                      //separate the least significant nibble
      OW    W#16#30                     // OR 30h to Lowbyte to receive ASCII character
      L     #w_temp_val
      OW    

      L     DBW [#d_loop_akt]           // Load BCC from DB
      ==I                               // and compare
      L     0                           // value of RETVAL, if comparison ok
      JC    ENDE

      L     -1                          // value of RETVAL, if comparison not ok
ENDE: T     #RETVAL

      BE    

主站蜘蛛池模板: 人人爽爽爽 | 精品国产乱码 | 黄色在线免费观看视频网站 | 亚洲人成人网站色www | 亚洲片国产一区一级在线观看 | 操操操干干 | 办公室揉弄高潮嗯啊免费视频 | 中文字幕精品一区二区三区精品 | 久久综合狠狠综合久久激情 | 久久午夜福利免费无码 | 国产偷窥厕所视频在线 | 91精品国产色综合久久不8 | 欧美性13| 亚州AⅤ中文Aⅴ无码Aⅴ | 国产精品高潮呻吟久久 | 18禁超污无遮挡无码免费动态图 | 成人综合视频在线 | 国产无遮挡又黄又爽动态图 | 2019亚洲日韩新视频 | 久久厕所偷拍视频 | 男人边吻奶边挵进去成人网站 | 男人操女人视频网站 | 欧美性猛交视频 | 欧美韩一区二区 | 欧美亚洲色偷另类图片欧美 | 国产黄在线观看免费观看不卡 | 亚洲国产天堂久久久久久 | 午夜香港三级A三级三点 | 夜夜草专业av导航 | 曰本一级毛片 | 亚洲VA欧美VA天堂V国产综合 | 成人性生生活性生交全黄 | 亚洲自拍小视频 | 干干干综合网 | 亚洲视频在线免费播放 | 韩国裸体美女 | 又大又硬又爽免费视频 | 亚洲不卡网 | 欧美一级片在线播放 | 国产一级a爱片在线观看视频 | 久久人体rtys |