rm新时代理财官网有限公司

<th id="kav76"></th>

    <thead id="kav76"></thead>

    
    
  1. <del id="kav76"></del>

    <sup id="kav76"><form id="kav76"></form></sup>
    歡迎光臨大柏電子科技(上海)有限公司
    當前位置
    首頁(yè) > 新聞中心
    西門(mén)子STL程序中使用UC調用FB塊的地址寄存器2問(wèn)題
    2020/11/11 21:16:36

    西門(mén)子STL程序中使用UC調用FB塊的地址寄存器2問(wèn)題

    +AR2  P#168.0      UC    "TON"      +AR2  P#8024.0    這段程序中, +AR2  P#168.0在地址寄存器2為0的情況下,將指針地址指向了TON功能塊的多重背景數據塊的起始地址,那么+AR2  P#8024.0是將地址寄存器2中的數據清零嗎?在調用TON功能塊前后這兩個(gè)地址偏移之和是8192.0,我看其它調用的時(shí)候也說(shuō)這樣,這樣做是如何實(shí)現地址寄存器2清零的?

    不會(huì )清零,
    LAR2 loads address register AR2 with the contents ACCU 1 (32-bit pointer).
    ACCU 1 and ACCU 2 remain unchanged. The instruction is executed without regard to, and without affecting, the status bits.
    Status word 

     BR CC 1 CC 0 OV OS OR STA RLO /FC 

    TAR2 transfers the contents of address register AR2 into ACCU 1 (32-bit pointer). The contents of ACCU 1 were previously saved into ACCU 2. The instruction is executed without regard to, and without affecting, the status bits.
    Status word 

     BR CC 1 CC 0 OV OS OR STA RLO /FC 

    +AR2 (add to AR2) adds an offset specified either in the instructionor in ACCU 1-L to the contents of AR. The integer (16 bit) is initially expanded to 2 bits with its correct sign and then added to the least significant 24 bits of AR2 (part of the relative address in AR2). The part of the area ID in AR2 (bits 24, 25, and 26) remains unchanged. The instruction is executed without regard to, and without affecting, the status bits.
    +AR2: The integer (16 bit) to be added to the contents of AR2 is specified by the value in ACCU 1-L. Values from -32768 to +32767 are permissible.
    +AR2 : The offset to be added is specified by the  address.
    Status word 

     BR CC 1 CC 0 OV OS OR STA RLO /FC 

    writes: - - - - - - - - - 


    Example 1 

    STL Explanation 

    L  +300 //Load the value in ACCU 1-L. 

    +AR1  //Add ACCU 1-L (integer, 16 bit) to AR2. 


    Example 2 

    STL Explanation 

    +AR1 P#300.0 //Add the offset 30.0 to AR2.

    聯(lián)系方式
    CONTACT US

    電話(huà):15721373211

    郵箱:15721373211@139.com

    網(wǎng)址:http://www.exuetong.cn/

    地址:上海青浦區北青公路7171號111-112室

    用手機掃描二維碼關(guān)閉
    rm新时代理财官网有限公司
    <th id="kav76"></th>

      <thead id="kav76"></thead>

      
      
    1. <del id="kav76"></del>

      <sup id="kav76"><form id="kav76"></form></sup>
      <th id="kav76"></th>

        <thead id="kav76"></thead>

        
        
      1. <del id="kav76"></del>

        <sup id="kav76"><form id="kav76"></form></sup>
        rm新时代体育平台 RM新时代新项目-百度知道 rm新时代爆单 新时代app游戏 rm新时代是什么时候开始的 RM新时代投资官网 RM平台 rm资金盘 新时代RM|登录网址 新时代RM|国际平台