日本特级淫片免费看-日本特级黄色-日本特级黄录像片-日本视频中文字幕-成年偏黄网站站免费-成年人福利

qxf0218
級別: 探索解密
精華主題: 0
發帖數量: 18 個
工控威望: 135 點
下載積分: 607 分
在線時間: 3(小時)
注冊時間: 2014-03-24
最后登錄: 2016-07-11
查看qxf0218的 主題 / 回貼
樓主  發表于: 2014-07-01 11:01
西門子S7-300 BCC數據效驗和             誰有用過的程序?分享一份。謝謝
學無止境
zjiori
級別: 正式會員
精華主題: 0
發帖數量: 4 個
工控威望: 94 點
下載積分: 578 分
在線時間: 3(小時)
注冊時間: 2014-12-09
最后登錄: 2014-12-31
查看zjiori的 主題 / 回貼
1樓  發表于: 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    

主站蜘蛛池模板: 中文字幕精品一区二区精品 | 久久精品国产亚洲网站 | 亚洲国产片在线观看 | 久久99国产精品视频 | 成人看片毛片免费播放器 | 亚洲综合丁香婷婷六月香 | 在线观看视频网站www色 | 久久国产成人精品 | 综合五月网 | 欧美日韩中文国产一区二区三区 | 国产zzzwww在线观看视频 | 亚洲视频一区二区三区四区 | www视频在线观看天堂 | 视色视频在线 | 亚洲精品视频在线播放 | 国内自拍99 | 欧美疯狂性猛xxxx另类 | 高清视频在线免费 | 亚洲综合美腿丝国产一区 | 97一区二区三区 | 欧美性精品hd在线观看 | 欧美一区二区在线 | 久久综合日韩亚洲精品色 | 麻豆国产一区二区在线观看 | 夜色视频一区二区三区 | 国产日韩欧美在线观看 | 久久久精品3d动漫一区二区三区 | 黄色一级短视频 | 成年网站视频在线观看 | 视频在线高清完整免费观看 | 色狠狠网 | 91精品国产高清91久久久久久 | 日韩欧美亚洲一区精选 | 中文字幕一区二区日产乱码 | 亚洲欧美日韩综合久久久久 | 日本伊人久久 | 日韩精品在线一区 | 91免费福利视频 | 国产精品一二三区 | 四虎永久免费在线观看 | 麻豆传奇 |