產(chǎn)品展示
聯(lián)系我們
聯(lián)系人:麥女士
手機:+86 15270269218
電話:
Q Q:3136378118
郵箱:stodcdcs@gmail.com
地址:江西省九江市瑞昌市東益路23號賽湖農(nóng)商城401號
3708E
從MCM復制數(shù)據(jù)。數(shù)據(jù)。將數(shù)據(jù)[0]和[1]讀入數(shù)據(jù)類型為REAL的標簽ENERGY\u CONSUMPTION。在梯形圖邏輯中使用COP語句。這里有一個例子。因為標簽MCM。數(shù)據(jù)。READDATA[0]只能在上述命令中使用,可以使用無條件COP語句。請注意,COP語句的長度值為1。在羅克韋爾自動化處理器中,COP語句將復制所需數(shù)量的“源”值,以填充指定長度的“Dest”標記。因此,上述語句將復制ReadData[0]和[1],以填充標簽“Energy\u Consumption”所需的32位。注意:不要使用MOV語句。MOV將數(shù)據(jù)從源寄存器轉換為目標寄存器數(shù)據(jù)類型。這將創(chuàng)建一個數(shù)據(jù)轉換語句,并將導致原始數(shù)據(jù)的丟失或損壞。下表是讀取多個浮點值和設備地址的示例。該表顯示了7個連續(xù)的浮點值(14個Modbus地址)。值說明類型40261 KW需求(功率)浮子。高位16位40263無功功率浮點。上16位40265 VA視在功率浮點。高16位40267功率因數(shù)浮點。高位16位40269伏電壓,線對線浮動。高位16位40271伏電壓,線路至中性點浮動。上16位40273安培電流浮動。高16位將命令配置為讀取這7個浮點,如下所示。如下圖所示,在ControlLogix處理器內(nèi)配置7個浮點數(shù)組。以下COP語句將從MCM復制數(shù)據(jù)。數(shù)據(jù)。將數(shù)據(jù)[0]至[13]讀入陣列MCM\U FLOAT\U DATA[0]至[6]。“Length”參數(shù)設置為必須從MCM復制的浮點值的數(shù)目。數(shù)據(jù)。READDATA數(shù)組。



Copy data from the MCM.DATA.READDATA[0] and [1] into the tag ENERGY_CONSUMPTION that has a data type of REAL. Use a COP statement within the ladder logic. Here is an example. Because the tag MCM.DATA.READDATA[0] should only be used within the above command, an unconditional COP statement can be used. Notice the length of the COP statement is a value of 1. Within a Rockwell Automation processor, a COP statement will copy the required amount of "Source" values to fill the "Dest" tag for the Length specified. Therefore, the above statement will copy ReadData[0] and [1] to fill the 32 bits required for the tag "Energy_Consumption". Note: Do not use a MOV statement. A MOV will convert the data from the Source register to the destination register data type. This would create a data casting statement and will result in the loss or corruption of the original data.The following table is an example to read Multiple Floating-Point values and device addresses. The table shows 7 consecutive floating-point values (14 Modbus addresses). Value Description Type 40261 KW Demand (power) Float. upper 16 bits 40263 VAR Reactive Power Float. upper 16 bits 40265 VA Apparent Power Float. upper 16 bits 40267 Power Factor Float. upper 16 bits 40269 VOLTS Voltage, line to line Float. upper 16 bits 40271 VOLTS Voltage, line to neutral Float. upper 16 bits 40273 AMPS Current Float. upper 16 bits Configure the command to read these 7 floats as follows. Configure an array of 7 floats within the ControlLogix processor as shown in the following illustration. The following COP statement will copy the data from MCM.DATA.READDATA[0] TO [13] into the array MCM_FLOAT_DATA[0] TO [6]. The "Length" parameter is set to the number of Floating-Point values that must be copied from the MCM.DATA.READDATA array.
相關產(chǎn)品