HIMA K9203備件模塊,DCS工控模塊備件
數字輸入掩碼的字節計數(一個字節)、指示所請求的數字輸入狀態的位掩碼(一個或兩個字節)和CRC(兩字節)。注意:CRC以兩字節數字的形式發送,先發送低位字節。示例1:請求從屬設備11響應數字輸入5至9的狀態:示例2:請求從屬11響應數字輸出1至4的狀態:數字輸入狀態數字輸入狀態D1:訪問關閉D7:可分配輸入2關閉D2:測試打開D8:可指定輸入3關閉D3:啟動器狀態打開D9:可指派輸入4關閉D4:緊急重啟打開位掩碼(LSB)0111 0001 D5:遠程重置閉合位掩碼(MSB)0000 0001 D6:可分配輸入1閉合主傳輸:BYTES示例/描述從機11功能代碼1 02讀取數字輸入狀態STARTING digital Input 2 00 05從數字輸入5 NUMBER OF DIGITAAL Input 2 0 05 5數字輸入(即D5、D6、D7、D8、D9)CRC 2 A8 A2 CRC,由主從機計算響應:字節示例/描述從機11的從機地址1 0B響應消息功能代碼1 02讀取繼電器線圈狀態字節計數1 02 2字節位掩碼位掩碼2 71 01請求數字輸入CRC的位掩碼2 C5 B9 CRC由從機數字輸入狀態數字輸入狀態D1計算:訪問關閉D6:可分配輸入1關閉D2:測試打開D7:可指定輸入2關閉D3:啟動器狀態打開D8:可分配輸入3打開D4:緊急重啟打開D9:可指定輸入4關閉D5:遠程重置閉合位掩碼(LSB)0111 0001主傳輸:BYTES示例/描述從機11功能代碼1 02的從機地址1 0B消息讀取數字輸入狀態從數字輸入1數字輸入數量2 00 04 4數字輸入開始啟動數字輸入2 00 01(即D1、D2、D3、D4)CRC 2 28 A3由主從機響應計算的CRC:BYTES示例/描述從機11功能代碼1 02讀取繼電器線圈狀態BYTE COUNT 1 01 2字節位掩碼位掩碼2所請求數字輸入的01位掩碼CRC 2 63 90由從機GE Multilin 469電機管理繼電器6-5 6通信6.2 MODBUS計算的CRC功能6 6.2.3功能代碼03/04:讀取設定值/實際值Modbus實現:讀取輸入和保持寄存器469實現:讀取設定點和實際值對于Modbus的469實現,這些命令可用于讀取任何設定值(“保持寄存器”)或實際值(“輸入寄存器”)。保持寄存器和輸入寄存器是16位(兩字節)值,先以高位字節傳輸。因此,所有469個設定值和實際值都作為兩個字節發送。一次傳輸中可讀取的最大寄存器數為125。功能代碼03和04被配置為可互換地讀取設定值或實際值,因為某些PLC不支持這兩個功能代碼。從機對這些功能碼的響應是從機地址、功能碼、后續數據字節數的計數、數據本身和CRC。每個數據項都以兩字節的形式發送,首先發送高階字節。CRC以兩字節數的形式發送,低位字節先發送。消息格式和示例:請求從機11以地址0308開始的2個寄存器進行響應。在本例中,這些地址中的寄存器數據為:地址數據0308 0064 0309 000A主傳輸:BYTES示例/描述從站地址1 0B消息從站11功能代碼1 03讀取寄存器數據起始地址2 03 08數據起始于0308設置點數量2 00 02 2個寄存器(共4字節)CRC 2 45 27 CRC,由主從站響應計算:BYTES示例/描述從機11的從機地址1 0B響應消息功能代碼1 03讀取寄存器字節計數1 04 2寄存器=地址0308中的4字節數據1 2 00 64值數據2 00 0A地址0309中的值CRC 2 EB 91 CRC由從機6-6 469電機管理繼電器GE Multilin 6.2 MODBUS功能6通信6 6.2.4功能代碼05計算:
byte count of digital input mask (one byte), bit mask indicating the status of requested digital inputs (one or two bytes), and CRC (two bytes). Note: the CRC is sent as a two byte number with the low order byte sent first. Example 1: Request slave 11 to respond with status of digital inputs 5 to 9: Example 2: Request slave 11 to respond with status of digital inputs 1 to 4: Digital Input Status Digital Input Status D1: Access Closed D7: Assignable Input 2 Closed D2: Test Open D8: Assignable Input 3 Closed D3: Starter Status Open D9: Assignable Input 4 Closed D4: Emergency Restart Open Bit Mask (LSB) 0111 0001 D5: Remote Reset Closed Bit Mask (MSB) 0000 0001 D6: Assignable Input 1 Closed MASTER TRANSMISSION: BYTES EXAMPLE / DESCRIPTION SLAVE ADDRESS 1 0B message for slave 11 FUNCTION CODE 1 02 read digital input status STARTING DIGITAL INPUT 2 00 05 starting at digital input 5 NUMBER OF DIGITAL INPUTS 2 00 05 5 digital inputs (i.e. D5, D6, D7, D8, D9) CRC 2 A8 A2 CRC calculated by the master SLAVE RESPONSE: BYTES EXAMPLE / DESCRIPTION SLAVE ADDRESS 1 0B response message from slave 11 FUNCTION CODE 1 02 read relay coil status BYTE COUNT 1 02 2 byte bit mask BIT MASK 2 71 01 bit mask of requested digital input CRC 2 C5 B9 CRC calculated by the slave Digital Input Status Digital Input Status D1: Access Closed D6: Assignable Input 1 Closed D2: Test Open D7: Assignable Input 2 Closed D3: Starter Status Open D8: Assignable Input 3 Open D4: Emergency Restart Open D9: Assignable Input 4 Closed D5: Remote Reset Closed Bit Mask (LSB) 0111 0001 MASTER TRANSMISSION: BYTES EXAMPLE / DESCRIPTION SLAVE ADDRESS 1 0B message for slave 11 FUNCTION CODE 1 02 read digital input status STARTING DIGITAL INPUT 2 00 01 starting at digital input 1 NUMBER OF DIGITAL INPUTS 2 00 04 4 digital inputs (i.e. D1, D2, D3, D4) CRC 2 28 A3 CRC calculated by the master SLAVE RESPONSE: BYTES EXAMPLE / DESCRIPTION SLAVE ADDRESS 1 0B response message from slave 11 FUNCTION CODE 1 02 read relay coil status BYTE COUNT 1 01 2 byte bit mask BIT MASK 2 01 bit mask of requested digital input CRC 2 63 90 CRC calculated by the slave GE Multilin 469 Motor Management Relay 6-5 6 COMMUNICATIONS 6.2 MODBUS FUNCTIONS 6 6.2.3 FUNCTION CODES 03/04: READ SETPOINTS / ACTUAL VALUES Modbus implementation: Read Input and Holding Registers 469 Implementation: Read Setpoints and Actual Values For the 469 implementation of Modbus, these commands can be used to read any Setpoint ("holding registers") or Actual Value ("input registers"). Holding and input registers are 16 bit (two byte) values transmitted high order byte first. Thus all 469 Setpoints and Actual Values are sent as two bytes. The maximum number of registers that can be read in one transmission is 125. Function codes 03 and 04 are configured to read setpoints or actual values interchangeably because some PLCs do not support both function codes. The slave response to these function codes is the slave address, function code, a count of the number of data bytes to follow, the data itself and the CRC. Each data item is sent as a two byte number with the high order byte sent first. The CRC is sent as a two byte number with the low order byte sent first. MESSAGE FORMAT AND EXAMPLE: Request slave 11 to respond with 2 registers starting at address 0308. For this example the register data in these addresses is: Address Data 0308 0064 0309 000A MASTER TRANSMISSION: BYTES EXAMPLE / DESCRIPTION SLAVE ADDRESS 1 0B message for slave 11 FUNCTION CODE 1 03 read registers DATA STARTING ADDRESS 2 03 08 data starting at 0308 NUMBER OF SETPOINTS 2 00 02 2 registers (4 bytes total) CRC 2 45 27 CRC calculated by the master SLAVE RESPONSE: BYTES EXAMPLE / DESCRIPTION SLAVE ADDRESS 1 0B response message from slave 11 FUNCTION CODE 1 03 read registers BYTE COUNT 1 04 2 registers = 4 bytes DATA 1 2 00 64 value in address 0308 DATA 2 2 00 0A value in address 0309 CRC 2 EB 91 CRC calculated by the slave 6-6 469 Motor Management Relay GE Multilin 6.2 MODBUS FUNCTIONS 6 COMMUNICATIONS 6 6.2.4 FUNCTION CODE 05: